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

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

Reply via email to