On Sun, Nov 22, 2009 at 2:20 PM, Dr. David Kirkby <[email protected]> wrote: > William Stein wrote: >> On Sun, Nov 22, 2009 at 5:41 AM, Dr. David Kirkby >> <[email protected]> wrote: >>> In a recentish update to the prereq script (from 0.3 0.4) >>> >>> http://trac.sagemath.org/sage_trac/ticket/7021 >>> >>> I added a check on gcc version. The following happens. >>> >>> 1) gcc 4.0.0 exits, saying its buggy. >>> 2) gcc >= 4.0.1, runs ok >>> 3) gcc < 4.3, saying its too old. >>> 4) 4.3.x, issues a warning, but allows to continue. >>> >>> >>> I've just run it on my Ultra 27, and without changing the compilers, it >>> uses the >>> default gcc (a 3.4.x), and so I got to case 4. >>> >>> The warning is as clear as I could make it. >>> >>> checking gcc version... 3.4.3 >>> checking if g++ accepts -dumpversion option... yes >>> checking g++ version... 3.4.3 >>> configure: Good, gcc and g++ are the same version (3.4.3) >>> configure: Later, it will be checked if GCC 3.4.3 is suitable >>> configure: WARNING: ****************************************************** >>> configure: WARNING: ****************************************************** >>> configure: WARNING: ****************************************************** >>> configure: WARNING: GCC 3.4.3 is too old and can not build Sage. >>> configure: WARNING: Please use a gcc of at least 4.0.1 >>> configure: WARNING: if you just want Sage to build without problems. >>> configure: WARNING: >>> configure: WARNING: However, rather than exit as this point, the Sage >>> configure: WARNING: build will continue, in case you want to debug >>> configure: WARNING: a package, that will not build without a later GCC, >>> configure: WARNING: but you want to try getting it to work with >>> configure: WARNING: GCC 3.4.3. At the time of writing, (28th Sept 2009) >>> configure: WARNING: 'ratpoints' was a program, needing GCC 4.0.1 >>> configure: WARNING: which is later than would be ideal. >>> configure: WARNING: ****************************************************** >>> configure: WARNING: ****************************************************** >>> configure: WARNING: ****************************************************** >>> >>> >>> That is pretty clear, but it flies past so quick on my Ultra 27 that I >>> think it >>> could easily be missed. I'm wondering if we should exit if gcc < 4.0.1, and >>> only >>> allow gcc 4.3.x versions to continue if some environment variable is set. >>> >>> So it instead issues a message telling someone to set the environment >>> variable >>> >>> SAGE_LET_ME_USE_OLD_GCC to "yes" if they wish to use a gcc 4.3.x. >>> >> >> Can we reuse and existing environment variable? E.g,. SAGE_PORT="yes" >> allows you to do anything. >> >> William >> > > No, since to build on Solaris x86, (on any other unsupported platform), one > already needs to have SAGE_PORT set to something non-empty. Since I was > building > on Solaris x86, I'd already needed to set SAGE_PORT. But on a fast x86 box, > the > warning about an old gcc will not be seen. > > I did consider insisting SAGE_PORT was set to something specific, like > "SAGE_PORT=permit_old_gcc", but the fact SAGE_PORT is then non-empty, would > mean > a ton of other checks would not be performed, or would at least need > complicated > re-writes. > > I know its not a good idea to add endless environment variables, but in this > case, we do not even need to bother documenting SAGE_LET_ME_USE_OLD_GCC, as > the > configure script would essentially be self-documenting. I'd suggest something > like: > > configure: WARNING: GCC 3.4.3 is too old and can not build Sage. > configure: WARNING: Please use a gcc of at least 4.0.1 > configure: WARNING: if you just want Sage to build without problems. > configure: WARNING: > configure: WARNING: If you insist on using a gcc which is known to > configure: WARNING: fail to build Sage, then set the > configure: WARNING: environment variable PERMIT_OLD_GCC to "yes". > configure: WARNING: > configure: WARNING: The only reason to do this, would be if you want to > configure: WARNING: make changes to Sage which allow it to build > configure: WARNING: with older versions of gcc. > configure: WARNING: > configure: ERROR: Exiting, as gcc is too old. > > (I think 'PERMIT_OLD_GCC' or 'SAGE_PERMIT_OLD_GCC', is better than > 'SAGE_LET_ME_USE_OLD_GCC'). > > From a practical point of view, is anyone actually going to try to get Sage > working with gcc 3.4.x?
Based on my experience with the Sage project, I think the probability somebody is going to serious try to get Sage to build with GCC 3.4.x, and that they will call it "porting" is... 100%. > On a related point, on Solaris one *must* install a GCC with Fortran support, > as > the sage_fortran binary in Sage has no compiler for Solaris. In which case, > perhaps we should consider exiting on Solaris, AIX, HP-UX, IRIX and Tru64 > unless > there is a Fortran compiler. (i.e. if gcc is used, we check it supports > Fortran). I'm not sure what binaries that does contain (Linux and OS X > perhaps??). I think in sage-4.3 on, we should *only* include fortran compilers for OS X, and *nothing* else. William -- To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
