2009/6/9 Dr. David Kirkby <david.kir...@onetel.net>: > > I've created a tool chain for Solaris on t2, which I'm hoping solves the > gfortran issues. Certainly gcc-4.4.0 will compile fortran programs now > and it seems to get a long way to building Sage, although I do have an > error I hope to fix. > > If anyone wishes to use it, please sent the following variables. > > PATH=/home/kirkby/bin:/home/kirkby/dependencies/bin:/usr/bin > LD_LIBRARY_PATH=/home/kirkby/dependencies/lib > SAGE_FORTRAN=/home/kirkby/dependencies/bin/gfortran > SAGE_FORTRAN_LIB=/home/kirkby/dependencies/lib/libgfortran.so > > > > The basic strategy for building this gcc 4.4.0 toolchain was: > > 1) Remove the default PATH, LD_LIBRARY_PATH, SAGE_FORTRAN and > SAGE_FORTRAN_LIB. (I did not do this globally but only for myself. It is > not normal practice to set environment variables like this for all users). > > The following were in my path > > /home/kirkby/bin:/usr/sfw/bin:/usr/bin (This is NOT the same as I listed > above, for reasons which will become clear). > > This ensured gcc 3.4.3 in /usr/sfw/bin was picked up *before* gcc 4.0.4 > in /usr/bin. A full install of Solaris does not include gcc 4.0.4 in > /usr/bin, although gcc 4.0.4 might be on an optional 'companion' CD. > > Anyway, gcc 4.0.4 should not be assumed to exists on a Solaris system, > as it wont be there even on a full installation. > > Hence I started by using gcc 3.4.3 in /usr/sfw/bin, as that will exists > on any full install of Solaris, without the need for any optional CDs. > > 2) Create a directory $HOME/bin, and made the following links, so I had > copies of the GNU utilites, without the 'g' in front of them. (I'm > thinking this might cause less problems, if some bit of code expects to > find 'as' and does not look for 'gas') > > ar -> /usr/sfw/bin/gar > as -> /usr/sfw/bin/gas > ld -> /usr/sfw/bin/gld > m4 -> /usr/sfw/bin/gm4 > make -> /usr/sfw/bin/gmake > nm -> /usr/sfw/bin/gnm > ranlib -> /usr/sfw/bin/granlib > strip -> /usr/sfw/bin/gstrip > tar -> /usr/sfw/bin/gtar > > > 2) Build the latest gmp (4.3.1) with: > > $ ./configure --prefix=/home/kirkby/dependencies ABI=32 > $ make > $ make check (all passed) > $ make install. > > Note I installed it in a directory 'dependencies' off my home directory. > It used gcc 3.4.3 of course > > 3) Build the latest mpfr. > > $ ./configure --prefix=/home/kirkby/dependencies > --with-gmp-include=/home/kirkby/dependencies/include > --with-gmp-lib=/home/kirkby/dependencies/lib --with-gnu-ld > > > It was necessary to set the environment variable > LD_LIBRARY_PATH to /home/kirkby/dependencies/lib > so mpfr could find the gmp library. (This seems silly to me, as they are > given as arguments to the configure script, but it is necessary). > > $ make > $ make check (all 148 tests passed) > > Again gcc-3.4.3 was used to build mpfr > > 4) Build gcc-4.4.0 with: > > ../gcc-4.4.0/configure --with-gnu-as --with-as=/home/kirkby/bin/as > --with-gnu-ld --with-ld=/home/kirkby/bin/ld > --with-gmp=/home/kirkby/dependencies/ > --with-mpfr=/home/kirkby/dependencies/ --enable-languages=c,c++,fortran > --prefix=/home/kirkby/dependencies/ > > That built and installed with no hitches at all. > > 5) Set the path and environment variables as > > PATH=/home/kirkby/bin:/home/kirkby/dependencies/bin:/usr/bin > LD_LIBRARY_PATH=/home/kirkby/dependencies/lib > SAGE_FORTRAN=/home/kirkby/dependencies/bin/gfortran > SAGE_FORTRAN_LIB=/home/kirkby/dependencies/lib/libgfortran.so > > Note now I don't have /usr/sfw/bin in my path. > > 6) Attempt to build Sage. This gets quite a long way but does fail at > sqlite-3.5.3.p3. > > I'll put the compilation issues in another message, as I don't think it > is related to the build of gcc 4.4.0, but the order some libraries are > linked in sqlite - the error message has been seen by lots of people > using lots of software and appears to be related to what libraries are > linked in a particular order. >
Excellent work!!! Thanks so much for getting this setup. It will be very useful. The above failure is just something we will have to figure out. Sage never built with gcc 4.4.0 on solaris. William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---