On 06/11/10 10:51 PM, orca wrote:
Hi there,
I am a newbie to Sage, though I have some experience with Linux and
Python in general.
I have tried to build the latest 4.4.3 version of Sage from source,
but, after having checked that I apparently have all necessary program
dependencies satisfied, and issuing the command make under my Sage
root directory, the following error was reported:
configure: gcc (4.3.2) and g++ (4.2.4) are not the same version
configure: which they must be. Check your setting of CC and CXX
configure: error: Exiting since the C and C++ compilers have different
versions
ERROR: You do not have all of the prerequisites needed
to build Sage from source. See the errors above.
make[1]: *** [installed/prereq-0.7] Error 1
So what do you recommend? As far as I could check, there are deb files
for both the lower version of gcc and the higher version of g++, under
Debian lenny repositories and, indeed, my machine has both 4.3.2 and
4.2.4 gcc versions installed (SIC). The point is, if I install these
other versions, how do I force the use of a given version of gcc (or g+
+, for that matter) when building Sage?? If that is possible, is it
advisable?
Thanks in advance!!!
What do the following commands give you?
$ command -v gcc
$ command -v g++
$ command -v gfortran
$ gcc -v
$ g++ -v
$ gfortran -v
$ echo $PATH
give you?
You would certainly be advised to use the same version of gcc, g++ and gfortran.
I don't know what command may or may not exist in any given linux distribution,
but one can often get the commands one wants by suitably setting the path.
It's not possible to build g++ without building gcc, the g++ 4.2.4 must have had
a gcc 4.2.4 version at some point. Whether you only have g++ installed is
another matter, but it must have been built with C support.
I'd personally be inclined to suggest you
* Download the latest gmp
* Download the latest mpfr
* Download gcc 4.4.4 (not 4.5, as that is less well tested).
* Patch mpfr to get the latest updates (just read the readme)
* copy the mpfr directory under the gcc sources and rename it to "mpfr"
* copy the gmp sources under the gcc source directory and rename it gmp
so you get a diretory layout like this
gcc-4.4.4
gcc-4.4.4/gmp
gcc-4.4.4/mpfr
$ mkdir build
$ cd build
$ /path/to/gcc-4.4.4/configure --prefix=/somewhere/I/can/write/to
--enable-languages=c,c++,fortran
then go away and wait until you have a new gcc 4.4.4
(You should however read the gcc docs to see if there are some specific switches
recommended for your distro.
Do *not* make "build" under the gcc-4.4.4 source tree - it should be outside the
source tree.
Using a later gcc is probably your safest solution. If nothing else, Sage tends
to be more tested with late compiler releases, except on OS X, where many people
use the Apple-supplied gcc 4.0.1
Dave
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org