Following a patch to pari

http://sagetrac.org/sage_trac/ticket/6579

which needs review, Sage 4.1.2 will now build completely on Solaris with 
no manual intervention.

I've built it on my own Solaris box, and a build is in progress on t2 
now at

/scratch/kirkby/gcc32/sage-4.1.2/

(no prizes for guess what package it building now, which takes hours on t2.)

I've also tested this on bsd.math and sage.math. It should have no 
effect on those platforms, as the patch is specific to Solaris. It 
consists of:

    if [ `uname` = "SunOS" ]; then
        set -e
        echo "Patching include/pari/paripriv.h so it works on Solaris"
        echo "The changes are much smaller than needed on OS X"
        cp  "$TOP"/patches/paripriv-Solaris.h 
$SAGE_LOCAL/include/pari/paripriv.h
        set +e
     fi


I noticed a similar, but much larger change was needed on OS X - the 
pari.spkg file had already been modified to install a specific header 
file for OS X.

I built gcc myself, but I believe this has a high probability of 
building with the gcc from Blastwave too, as that has Fortran support. 
It should in fact build with any reasonable gcc. The requirements are

* Use GNU make
* Use GNU tar
* Ensure that whatever linker gcc uses, that linker must be in your path 
  before any other linker. In other words, as this is built using gcc 
using the Sun linker, that must be in the path before any program called 
'ld' from the GNU binutils.

I have set up a Solaris 10 03/2005 machine here (the first release of 
Solaris 10). I will download the latest gcc from Blastwave, and see if 
that builds Sage. I suspect it will.


Note that /usr/ccs/bin is needed in the path, as it contains programs 
like 'ar', 'ld', 'as' etc. It also contains Sun's 'make', which is 
useless for building Sage. Hence the need to have a directory (in this 
case /usr/local/bin2/ containing the GNU versions of tar and make. They 
must be in the path before /usr/bin (where Sun's tar is) and before 
/usr/ccs/bin (where Sun's make is). However, if the GNU binutils are 
installed, then they must be after /usr/ccs/bin, so the Sun linker and 
assembler are found, and not the GNU ones.

If GCC was built to use the GNU linker and assembler, then files in GNU 
binutils would need to be near the front of the path. As building on t2, 
there is no need for the GNU binutils, as all Sun's programs are used.

kir...@t2:[~] $ echo $PATH
/usr/local/gcc-4.4.1-sun-linker/bin:/usr/local/bin2:/usr/bin:/usr/ccs/bin:/usr/local/bin:/usr/sfw/bin:/bin:/usr/sbin
kir...@t2:[~] $ ls /usr/local/bin2
make  tar


Suitable version of GNU tar and GNU make come with Solaris in 
/usr/sfw/bin. However, the commands are called gmake and gtar, so need 
to be copied somewhere else, and renamed to make and tar.

Hopefully, if that pari patch can get a positive review, building Sage 
4.2 on Solaris should not be too hard. Then I'll try to get some other 
parties interested in making it work with the Sun compiler.

There is still the issue of Solaris x86 support. That is a bit flaky at 
best. I should soon have a Sun Ultra 27 with a quad core 3.333 GHz Xeon, 
which should make building/testing the x86 version very quick.



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
-~----------~----~----~----~------~----~------~--~---

Reply via email to