Ticket #7021 (closed enhancement: fixed)
[with patch; positive review] Update prereq from 0.3 to 0.4
|Reported by:||drkirkby||Owned by:||tbd|
|Cc:||was, mvngu||Work issues:|
|Report Upstream:||Reviewers:||Georg S. Weber|
|Authors:||David Kirkby, Minh Nguyen||Merged in:|
Description (last modified by drkirkby) (diff)
This is an updated version of the code which does the preliminary checks of the Sage build.
The update consists of two files, which should be installed as:
Note there is no need to extract the tar file, and so have a directory $SAGE_HOME/spkg/base/prereq-0.4, though this was done on prereq-0.3. The tar files contents gets extracted to $SAGE_HOME/spkg/build/prereq-0.4 during the build process.
The tar file contains a configure script, configure.ac, and several macros.
Changes to the configure script
- Adds AC_COPYRIGHT([GPL version 2])
- Uses several autoconf macros, mainly taken from the autoconf macro archive. This are better written than the pseudo-autoconf macros of the earlier configure.ac file. The macros get extracted to the directory $SAGE_HOME/spkg/build/prereq-0.4/m4
- The configure script allows one to try to build Sage with a non GNU compiler. A warning is issued, but the configure script does not exit as before.
- If gcc is used as the C compiler, the configure script checks it is at least gcc 4.0.1
- If gcc is used as the C compiler, the configure script checks that g++ is used as the C++ compiler. You are not permitted to mix GNU and non-GNU compilers.
- If gcc and g++ are used, the configure script checks they are of the same version. It is not easily possible to do this with the Fortran compiler.
- If SAGE_FORTRAN is set, the configure script checks the binary actually exists.
- If SAGE_FORTRAN_LIB is set, the configure script checks the library actually exists.
- The configure script checks perl is at least version 5.6.0. I could not work out what the original code was supposed to do, but 5.6.0 is quite old, so everyone should have at least that.
- Tests for the Sun linker. I'm not sure the test is very good, and while it attempts to export SAGE_LINKER, I'm not sure whether this will actually work. (It probably needs a bit more work, but I'll leave it for now).
Changes to prereq-0.4-install
- Issue a warning on OS X to use Apple's latest XCode, and provide a link to http://developer.apple.com/TOOLS/Xcode/
- Specific messages are issued if one tries to build Sage on any of these operating systems, to encourage developers. A 'catch-all' is used for other operating systems. SAGE_PORT needs to be set to a non-empty value to proceed with any of these.
- Exit codes on errors are changed from -1 to 1, as -1 is an invalid value.
- Less checks are performed on a makefile. More is done in the configure script.
- Changes comments about Sage being support on Cygwin several months ago (around March 2007), to several years ago.
- VirtualBox? gets a mention if one tries to use cygwin
- If one of the important commands are not found, the script says to install them or put them in your path. The previous wording said they had to be installed, but in some cases might not be in the path. (m4 on Solaris is in /usr/ccs/bin, which many people may not know about)
Testing The Sun T5240 't2' would be a good place to test this. Try these things, remembering to type 'make distclean' after any test.
- Set CC to /usr/sfw/bin/gcc which is an old C compiler
- Set CXX to /usr/sfw/bin/g++ which is an old C++ compiler
The configure script should exit, and say you need at least gcc 4.0.1
- Make one of the compilers a Sun compiler, while leaving the other a GNU one. The Sun C compiler is /opt/SUNWspro/bin/cc and the C++ compiler is /opt/SUNWspro/bin/CC
It should exit with a message that you can't mix compilers.
Set CC=/opt/SUNWspro/bin/cc and CXX to /opt/SUNWspro/bin/CC and try to build Sage with the Sun compiler.
Test 4 Set CC and CXX to be different version of gcc. You should see something like this.
checking gcc version... 4.2.4 checking if g++ accepts -dumpversion option... yes checking g++ version... 4.4.1 configure: WARNING: gcc (4.2.4) and g++ (4.4.1) are not the same version configure: WARNING: which they must be. Check your setting of CC and CXX configure: error: Exiting since the C and C++ compilers have different versions
- Cc mvngu added
- Authors changed from David Kirkby to David Kirkby, Minh Nguyen
- Priority changed from major to blocker
- Milestone changed from sage-4.1.3 to sage-4.1.2
comment:10 Changed 4 years ago by GeorgSWeber
- Summary changed from [with patch; needs review] Update prereq from 0.3 to 0.4 to [with patch; needs work] Update prereq from 0.3 to 0.4
comment:14 Changed 4 years ago by GeorgSWeber
- Reviewers set to Georg S. Weber
- Summary changed from [with patch; needs work] Update prereq from 0.3 to 0.4 to [with patch; positive review] Update prereq from 0.3 to 0.4
comment:16 Changed 4 years ago by was
- Status changed from positive_review to closed
- Resolution set to fixed