-
-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove the spkg/base repo! #11073
Comments
comment:1
I will take care of removing |
comment:2
I never realised this was this duplication - it is clearly very stupid. If nothing else, copies could be replaced with links, but it would be better to do away with the repository if possible. If the repositories can be merged, then I think that's a good idea. I don't like the idea of having a repository as a suppository of another - I think it would just add unnecessary complications. From reading about the subrepositories, I don't feel they are designed to address a need we have. |
comment:3
From what I understand of such things, using subrepositories is a huge mess. The "proper" usage case of a subrepository is basically what the tl;dr I too support merging the repositories or getting rid of one of them over maintaining one as a subrepository of the other. |
comment:6
Dave: in the base repository, can you explain what the files stdint.h_Solaris9, testcc.sh, and testcxx.sh are for? I know what the last two do, but are they actually used anywhere? I can't find any reference to them in SAGE_ROOT/local/bin or SAGE_ROOT/spkg. Are they called by various spkg-install files? Right now, testcc.sh and testcxx.sh are copied (by the file spkg/install) to SAGE_ROOT/local/bin. If we're doing away with the base repository, should they be tracked in the Sage root repository or the scripts repository? Since they're scripts which might be useful in general, the scripts repo might make sense. But if they're only used in the installation process -- I don't know where they're used -- maybe the root repo makes sense. Any opinions? |
comment:7
Replying to @jhpalmieri:
I'm not aware of what stdint.h_Solaris9 was supposed to do. I think Micheal added that. It's pretty dumb, as it forces a long to be 4 bytes with:
which is obviously invalid on 64-bit builds. I recall having to create a ticket to stop including that file, as it was screwing up attempts to build Sage 64-bit on Solaris. Given Solaris 10 came out in 2005, I don't think there's much point in worrying about Solaris 9 anyway. As such, I think that stdint.h_Solaris9 should be deleted and if there is any issues it creates, we fix them. But I don't think it will create any problems. The testcc.sh and testcxx.sh scripts are used in a few .spkg files. There's several .spkg files which have tests for the compilers, which would be much simplified if replaced by those scripts.
I think the scrips repository will be ok. If nothing else, it is consistent with much of the rest of Sage. I don't think either of those scripts gets used before the sage-scripts package is installed, but I'm not 100% sure on that. |
comment:8
Replying to @sagetrac-drkirkby:
It is invalid, but not for the reason you state. The problem is that
In fact, on my 64-bit Linux laptop, the types |
comment:9
I tried grepping through all of the spkgs and the rest of Sage. I find no mention of stdint.h_Solaris9, so I think we should delete it. testcxx.sh doesn't get used anywhere, but it could be useful, so we'll keep it. testcc.sh gets used in the spkg-install file for libm4ri, so if we add testcc.sh to the scripts repo, then we need to make sure that the scripts spkg is a prerequisite for libm4ri. |
comment:10
Regarding the files sage-env, sage-make_relative, and sage-spkg: these are currently in the scripts repo (and it makes a lot of sense for them to be there), but they get used in the Sage build process right from the start. (There have been complaints about the role of sage-make_relative, and those might have some validity to them, but this is not the ticket to deal with that.) Right now, the script sage-sdist copies them from the scripts repo to the base directory so they're in the right place in a new source distribution. One of the first things that spkg/install does is to copy them back to local/bin/ so they're in the right place to be executed. So: what should be done with these? Move them to root repo and put links to them in local/bin? That seems to make a lot of sense, but it doesn't feel right for some reason. Any other ideas? |
comment:11
Assuming I understand correctly what is going on here, why don't we keep them in local/bin and copy them to spkg/base during the -sdist process without putting the copies under revision control? spkg/install will copy them back to local/bin when building a new sage installation from source, but once we install the scripts repo, they will sync with the copy we keep under revision control in local/bin anyway. If we take |
comment:12
Replying to @jhpalmieri:
If feels right to me... |
comment:13
Replying to @jdemeyer:
On Solaris the int_fast_32 remains at 32-bits, even on 64-bit code, so what actually caused Sage to fail to compile was certainly the size rather than the sign. That little bit of header file was included in Sage well after Sage built reliably 32-bit. It was only when I tried a 64-bit build of Sage that this became a problem. (I think a 64-bit Sage on Solaris is looking further away now, as we don't have a good solution for making sure modules are initialized properly before anything is imported from them.) Test program
Create a 32-bit executable and execute it
Create a 64-bit executable and execute it
As you can see, that's not so on Solaris, int_fast32_t remains 32-bits, even in 64-bit code. I recall using a Cray Y-MP with Unicos, where
The Cray is the only system I've come across where shorts are 64-bit. That tripped me up, as some code I'd written assumed shorts were 2 bytes. Dave |
comment:14
Replying to @jhpalmieri:
Having thought about this more, I think it would be better if they were in the root repository. There are lots of bits of code in Sage which are testing if the compilers are Sun or GNU. Those bits could be dramatically simplified by using the As such, I think it might be better if those scripts were available early on, which would be achieved by having them in the root repository. |
comment:15
Copying files between root and scripts repositories is horrible. We can't make relative symlinks from Patch instructions:
Some notes about files formerly in the spkg/base repository:
|
Author: Volker Braun |
This comment has been minimized.
This comment has been minimized.
comment:17
Forgot to delete |
Attachment: trac_11073_stubs_for_base.patch.gz Updated patch |
Updated patch |
Attachment: trac_11073_stop_copying_stuff.patch.gz Attachment: trac_11073_remove_base_repo.patch.gz Updated patch |
comment:90
Yes, perfectly. |
comment:91
Replying to @jdemeyer:
Yes, it appears to work perfectly. |
comment:92
Replying to @williamstein:
I'd like to test this out, too. Can you explain what you mean by the app bundle? Do you mean "sage --bdist ..." with "SAGE_APP_BUNDLE=yes" on a Mac? |
comment:93
Yes. |
comment:94
When I use the app bundle, I see this in the log file:
I wonder if there should be a place-holder script local/bin/sage-env which runs spkg/bin/sage-env. Otherwise, the file I do not see the wrong port, though: I see |
comment:95
Replying to @jhpalmieri:
I fixed precisely that error in attachment: 11073_extcode.patch. I assume you have an older version without that patch? |
comment:96
Mac App testers: please test This includes the latest version of this ticket. |
comment:97
If it's just the Mac App holding us back, I would prefer to have this ticket set to positive_review. The best way to further test this ticket is to merge it in sage-5.0.beta0. Any small remaining issues can still be fixed in later betas. |
Reviewer: John Palmieri, William Stein |
comment:98
Replying to @jdemeyer:
It worked for me, but only after I realized that I could no longer use an older external sage distribution because of the |
comment:99
Replying to @gvol:
What's an "external sage distribution"? |
comment:100
Replying to @jdemeyer:
Sorry for being unclear. You can point the app at any sage directory you want (SAGE_ROOT) instead of the one built in. I do this since when I build a new app for development I don't want to copy sage into it. It also allows me to upgrade sage independently of Sage.app. So I had told it to use an unpatched sage 4.7.2 which won't work. |
comment:101
iandrus: If that's what you do, I don't find it a problem that the Apps for sage-4.x and sage-5.x are incompatible. |
comment:102
I think it's very nice to be able to point the app at any Sage directory. It seems easy to avoid breaking that feature, so if not here, then we should have a follow-up ticket which tries diff --git a/sage/ext/mac-app/start-sage.sh b/sage/ext/mac-app/start-sage.sh
--- a/sage/ext/mac-app/start-sage.sh
+++ b/sage/ext/mac-app/start-sage.sh
@@ -38,7 +38,8 @@ cd /tmp/sage-mac-app || exit 1
# Set (i.e. "source") SAGE_ROOT and all the other environment settings
echo Setting environment variables >> "$SAGE_LOG"
-. ./spkg/bin/sage-env >> "$SAGE_LOG" 2>> "$SAGE_LOG"
+. ./spkg/bin/sage-env >> "$SAGE_LOG" 2>> "$SAGE_LOG" || \
+. ./local/bin/sage-env >> "$SAGE_LOG" 2>> "$SAGE_LOG"
export SAGE_ROOT
# Mac OS X app bundles are *intended* to be moved around, and/or given away Should we fix this here or on a followup? jdemeyer: you're right, I missed that patch. I read it and thought it made sense, but then forgot about it and didn't apply it. |
comment:103
OKay, new extcode patch for the Mac App, totally untested (I don't have a Mac). |
comment:104
Attachment: 11073_extcode.patch.gz This works for me. With an old version of Sage, a message about spkg/bin/sage-env not existing still shows up, but the server starts anyway, as it should. Any objections to giving this a positive review? |
Merged: sage-5.0.beta0 |
comment:105
Let's give this positive_review and release sage-5.0.beta0. |
Given the creation of the Sage root repo (see #9433), the repository in
SAGE_ROOT/spkg/base
should be combined with it.apply attachment: 11073_root_hgignore.patch to the root repo
apply attachment: 11073_root_after.patch and attachment: 11073_prereq_install.patch to the root repository.
apply attachment: 11073_scripts.patch to the scripts repo
apply attachment: 11073_sagelib_misc.patch to the main Sage repo.
apply attachment: 11073_extcode.patch to
data/extcode
.The file
stdint.h_Solaris9
is not used and therefore deleted.sage-env
,sage-spkg
andsage-sage
(renamed tosage
) are moved tospkg/bin
,sage-make_relative
to scripts (local/bin
).The script
sage-sage
is renamed tospkg/bin/sage
and$SAGE_ROOT
is no longer put in the $PATH, such that running "sage" aftersage-env
will run$SAGE_ROOT/spkg/bin/sage
.Fixes #10970 (do not generate
pipestatus
), see also #12102 (makebzip2
a standard package) and #12206 (installsage_scripts
earlier), #12311 (stop copying testcc.sh and testcxx.sh).Dependencies: sage-4.8.alpha6
CC: @jdemeyer @kini @nexttime @williamstein
Component: build
Keywords: scripts base hg
Author: Volker Braun, Jeroen Demeyer
Reviewer: John Palmieri, William Stein
Merged: sage-5.0.beta0
Issue created by migration from https://trac.sagemath.org/ticket/11073
The text was updated successfully, but these errors were encountered: