-
-
Notifications
You must be signed in to change notification settings - Fork 519
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
Update sage-env #7818
Comments
Author: David Kirkby |
comment:3
Just to make the point, -m64 in sage should not need to be replaced by 'CLFAG64' in general. In 99% of cases, simply removing all the -m64's that litter Sage will do the trick, as the right option will be added automatically. In some cases, it may be necessary to keep such a flag on linking. In those rare cases (ECL is the only example I can think of), then use CFLAG64 instead of -m64. But this will allow 99% of the -m64's to be removed and forgotten about, as they will be added only where necessary. |
comment:4
Oopsn, I mean in rare cases, -m64 might need to be replaced by $CFLAG64. |
comment:5
Should line 87 be changed from
to
(adding an equals sign)? In line 380:
change "to" to "so", I think. As far as a careful review goes, I'm not enough of an expert in the Sage build process to do that. An expert should take a good look at this. |
comment:6
Thank you for the feedback. I'll make the couple o changes you suggest. I take your point about needing an expert of the build process. William and I wrote this many years ago, but its changed a lot since then. If you have some spare time, (and I know building Sage can take some time), could you try a build with the sage-env script? First unpack the sources, then exchange spkg/base/sage-env for this one before trying a build. The build should proceed as normal. You might notice an extra -Wall or -g flag here or there, but there should be no huge changes. What it will give is a bunch of variables that can at a later date be used inside files like spkg-install. Dave |
comment:7
Replying to @sagetrac-drkirkby:
One more question: should this also be included in sage-scripts? That is, should the file
Sure, I'll start that right now. |
comment:8
It built just fine on my OS X 10.6 machine. I'm trying on sage.math now (or boxen.math or whatever it is these days). In case you missed my earlier question:
|
comment:9
Note, there are still some occurrences of ;-a' and '-o' here. I tried not too change too much of the original file, to make the review somewhat easier. So some things I don't feel are perfect, I have left unchanged. They almost certainly make no difference whatsoever here, but its a good habbit to write scripts in such a way they work reliably, irrespective of what shell someone happens to use. Dave |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:12
The patch applies cleanly to the scripts repository and produces the correct file (that is, SAGE_LOCAL/bin/sage-env and spkg/base/sage-env are the same). For some reason, the one in local/bin wasn't executable, so I had to fix that manually. Building with the new sage-env works just fine on sage.math, by the way. |
comment:13
Replying to @jhpalmieri:
It's good to hear it builds fine. I don't envisage anything that it does should screw up the build. It will mean in some packages there will be two -m64's on the command line, but they are harmless. Then hopefully we can remove all the SAGE64 stuff from the files. I just re-checked the permissions on the file when I created the ticket and they were executable. I don't know if there was anything I should have done which I did not.
Dave |
comment:15
For historical reasons I suggest you keep the 2005 date in the file! And maybe stupid where can I find the file testcc.sh?
Jaap |
comment:16
Ok, found the testcc.sh and testcxx.sh This new sage-env does a great job. On my Open Solaris in VirtualBox I could add
I would give it a positive review, but will wait for the other testers. Jaap |
Reviewer: Jaap Spies |
comment:17
Ok, positive review! Jaap |
comment:18
Is $RM defined anywhere now? Or $LN? Or $MKDIR? They still seem to be used by the gap spkg, so I can't figure out why that package installs correctly with this version of sage-env. |
comment:19
Replying to @jhpalmieri:
I'm not sure if Or $RM, $LN or $MKDIR are defined elsewhere, or if the bits in gap don't work, but it is not apparent they are not working. But there does seem to be no point in having variables for such basic commands, as agreed here. I left 'cp', as potentially the GNU version of CP has some extra options over some other implementations of CP which might make it useful in some cases, though I'd much prefer any GNUisms were avoided. But there really is no point in having variable for 'ln' or 'mkdir' They are all part of POSIX, the 2008 edition of which can be found here http://www.opengroup.org/onlinepubs/9699919799/ I'm not a great fan of GNU standards and I don't agree with some of it here, but even they agree one can rely on rm, ln and mkdir. http://www.gnu.org/prep/standards/standards.html#Utilities-in-Makefiles I've created a ticket for their removal from 'gap' - see #7873 . I'll fix that very shortly. Dave |
comment:20
I fixed any potential gap issue. If someone could review #7873 it would be appreciated. Dave |
comment:21
I'm sticking this to needs work, why I put back definitions such as
just in case they unsetting these causes any problems in any package. I believe all packages are covered by patches, but if one is not, then this could cause problems. Dave |
comment:23
This changes make sense.
This will not break any code. I'll test this with reinstalling the affected spkgs mercurial, singular, ntl, gap and pari. Ok so far. Positive review. |
Attachment: sage-env.patch.gz Patch file which should hopefully commit, as Robert Miller said the previous one had a problem. |
Merged: sage-4.3.1.rc0 |
Changed merged from sage-4.3.1.rc0 to none |
comment:26
This patch inadvertently removes the |
comment:27
I'll take my hands off. This is much more trickier than I thought! Jaap |
comment:28
Setting RM="rm" breaks newer libtools, namely the ones in Fedora 12 (libtool 2.2.6, autoconf 2.63, automake 1.11.1). They assume that $RM is either unset or RM="rm -f". One of the symptoms of this breakage is that configure ends with
Compile will break later on... |
comment:29
I think this can be closed as "wontfix" as the issues resolved in this ticket are very complex and I think for the foreseeable future, this will not be resolved. |
comment:30
I think we should keep this ticket open and gradually fix spgks. For example the Singular spkg needs to be updated soon for gcc-4.6 so we'll remove any Also, is there any other issue except the |
Changed author from David Kirkby to none |
comment:31
Replying to @sagetrac-drkirkby:
It is also a typical "fix everything" ticket, which is almost impossible to get merged. |
Changed reviewer from Jaap Spies to David Kirkby, Jaap Spies |
This is an update to the sage-env file. It should allow a much improved build process, simplifying the code in spkg install files, as much of it will be taken care of. The code will also be more portable.
The changes mainly affect the 3 variables for compiler flags - CFLAGS, CXXFLAGS and FCFLAGS.
The user may set CFLAGS, CXXFLAGS and FCFLAGS, but the following will be appended.
== General flags ==
== 64-bit Flags ==
If SAGE64 is "yes"
A variable CFLAG64 is set to the correct option for building 64-bit binaries with the C compiler. So if -m64 is replaced by $CFLAG64, the code will work on any C compiler.
(Some compilers may require a different option for C and C++ files. The names CXXFLAG64 and FCFLAG64 are reserved for this, but its not suggested they are used now)
== C++ library flags ==
Due to changes in the C++ standard, it is impossible for compiler vendors to distribute a C++ runtime library which is both compatible with the old standard and the new one. Both HP and Sun use the older library by default, and need a switch added to enable the newer libraries, which more closely follow the latest C++ standard. See:
http://developers.sun.com/solaris/articles/cmp_stlport_libCstd.html
http://docs.hp.com/en/14487/faq.htm
Therefore
== Shared Library Flags ==
Five new variables are set in sage-env. These are for building shared libraries and take on names very similar to the GNU names for the flags.
A reviewer may notice two further variable names used. These options can be linker dependent and will be finalized once some code to detect the linker is in place.
== Extension for shared libraries ==
Many systems have to be linked against a library, who extension changes depending on what plaform one is using. A variable 'SHARED_LIBRARY_EXTENSION' is set to one of the following:
CC: @williamstein @jaapspies
Component: porting
Reviewer: David Kirkby, Jaap Spies
Issue created by migration from https://trac.sagemath.org/ticket/7818
The text was updated successfully, but these errors were encountered: