The issue reported on sage-support makes me think we should insist that updates
are performed with the same version of gcc as that which was used to build gcc
in the first placed. Basically, two people have found
1) Install Sage with older gcc.
2) Install the latest gcc 4.4.3
3) Try to update Sage, and it fails
4) Build Sage from the start, using gcc 4.4.3 and it works.
This makes me think it would be desirable to store the version of gcc used to
build Sage some way, and then only let updates take place with that same
version. Getting the version is very easy
$ gcc -dumpversion
so it could be stored in a file when Sage is first built. Then any updates check
that the version of gcc has not changed.
My understanding was that you could mix objects from the same minor release i.e.
gcc x.y.z for any 'z' would be ok. But it would appear in practice this is not so.
In initial build:
gcc -dumpvesion > gcc-build-version
In updates
gcc -dumpversion > gcc-update-version
if [ `cksum gcc-build-version` != `cksum gcc-update-version` ] ; then
echo 2>&1 "Sorry, you must use the same version of gcc to update Sage as you
used when you built Sage."
echo 2>&1 "Sage was built with gcc version `cat gcc.-build-version` "
exit 1
fi
Using the cksum of the file is probably the easiest way of determining if the
version is the same. Saves messing around parsing a file.
BTW, not that it is important here, since you would only update Sage on the same
platform, but 'cksum' gives the same answer on any platform, as the algorithm is
specified by POSIX
http://www.opengroup.org/onlinepubs/9699919799/utilities/cksum.html
In contrast, 'sum', which exists on many systems, gives different answers on
different platforms (I got my fingers burnt over this is the past)
Dave
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org