William Stein wrote: > On Tue, Jun 30, 2009 at 4:39 AM, Dr. David > Kirkby<[email protected]> wrote: >> Jason Moxham wrote: >>> ----- Original Message ----- From: "Jason Moxham" >>> <[email protected]> >>> To: "mpir-devel" <[email protected]> >>> Sent: Monday, June 29, 2009 8:46 PM >>> Subject: [mpir-devel] Re: Fwd: [sage-devel] Strange problem on t2 - pari >>> fails to build, but fine on my home machine. >>> >>> >>>> On T2 we had pass for these options >>>> --enable-cxx --enable-gmpcompat >>>> which I think is how sage builds mpir , and this was under gcc/g++ , and >>>> also Sun's cc and their linker >>>> /usr/ccs/bin/sparcv9/ld >>>> >>>> Can you run make check on the MPIR build ? >>>> >>>> Thanks >>>> Jason >> >> Thank you Jason for the suggestion to run the mpir test suite. >> >> The mpir test suite runs fine. In fact, I'm pretty certain mpir is not >> to blame at all. >> >> I posted the output from Sage (not all 94,000 lines) on >> comp.unix.solaris to seek assistance. Someone noticed the flag -fPIC had >> not been used when compiling the pari object files. It should have been >> on the SPARC processor. From the gcc manual: >> >> ---------------------------------------------------------------- >> -fPIC >> If supported for the target machine, emit position-independent >> code, suitable for dynamic linking and avoiding any limit on the size of >> the global offset table. This option makes a difference on the m68k, >> PowerPC and SPARC. >> ---------------------------------------------------------------- >> >> Looking in the spkg-install for Sage, I see this little bit of code: >> >> # PARI doesn't set PIC correctly on Solaris, so we do this. >> if [ `uname` = "SunOS" ]; then >> CFLAGS=$CFLAGS" -fPIC" >> export CFLAGS >> fi >> >> So someone has tried to add -fPIC to CFLAGS, but it seems not to have >> propagated properly, as the object files are not being compiled with >> -fPIC. I suspect the missing flag is the issue, though I have not >> confirmed it yet. >> >> It's not clear why pari should build on my Sun Blade 2000, but not on >> 't2' My Sun has a SPARC processors too - I'm not using Solaris x86 >> except on my laptop. >> >> I just tried the option -fPIC to gcc on a linux box and gcc just accepts >> it without any complaints at all. If passing the flag only on Solaris >> SPARC is going to be difficult, I might as well just pass it on all >> systems, as it appears to be ignored. > > Note that if you pass it on OSX, then you'll get a big ugly warning > every time gcc compiles a file, since on OSX *all* code is PIC. > > William
Thank you for that information. I've produced a patch which is specific to Solaris. The patch now needs review - see http://sagetrac.org/sage_trac/ticket/6445 Hopefully, if you execute: $ source /usr/local/gcc-4.4.0-sun-linker/gcc440sun it should set up an environment where you can test all my Solaris patches, many of which are only needed with the Sun linker. This particular patch would have been needed with either linker, though I gather the GNU linker would have generated a helpful error message, indicating the fact code needed compiling with -fPIC. Solaris specific patches I've submitted, which need review include: http://sagetrac.org/sage_trac/ticket/6399 (a 2nd atlas patch of mine) http://sagetrac.org/sage_trac/ticket/6437 (polybori) http://sagetrac.org/sage_trac/ticket/6445 (pari; this one) http://sagetrac.org/sage_trac/ticket/6443 (zn_polly) Note, unless you stick that 'soure' command above in your .bashrc or similar, it will need to be run every time you open a new shell. 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-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
