William Stein on Mon, 15 Aug 2011 03:38:56 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: MacOs X Lion compiler and PARI


On Sun, Aug 14, 2011 at 3:59 PM, Bill Allombert
<Bill.Allombert@math.u-bordeaux1.fr> wrote:
> On Sat, Aug 06, 2011 at 09:15:01AM -0700, William Stein wrote:
>> On Fri, Aug 5, 2011 at 5:30 AM, Bill Allombert
>> <Bill.Allombert@math.u-bordeaux1.fr> wrote:
>> > Hello PARI developers,
>> >
>> > I received reports that MacOs X Lion default compiler is unable to compile PARI
>> > correctly. Precisely this version:
>> >
>> > GNU compiler version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
>> >
>> > So far I got two kind of issues:
>> > With --with-gmp, PARI build, but the resulting code is broken (see bug #1222)
>> > With --without-gmp, PARI fails to build (see
>> > <http://pari.math.u-bordeaux.fr/buildlogs/dac98dec-af1e-4e54-97ba-f001b69bf7a9>)
>> >
>> > Concerning, the first issue, I do not have access to such a system and in any
>> > case I cannot fix Apple compiler, so I would appreciate if one of you Mac OS X
>> > users would report the problem to Apple.
>
>> To encourage porting efforts to Lion, I setup a computer with the
>> latest OS and XCode 4.1 on it.
>
> Thanks a lot, this has allowed to confirm that the problem
> is a compiler issue that cause the file 'src/kernel/none/gcdll.c'
> (included in mp.c) to be miscompiled with -O1 and up.
> The symptom is that
> bezout(7,2) return [0, 1, 2] instead of [1, -3, 1].
>
>> By the way, Mike Hansen was able to build the PARI that is in Sage
>> (along with its dependency MPIR) on this machine and it works:
>
> Did you use the default compiler ?
> Did you use the default optimization level ?

I believe he did use the default compiler.  However, I think that he
hasn't yet built some other component of Sage (Maxima), which means he
hasn't run the Sage test suite, so perhaps wouldn't have seen the
bezout issue you mention above.   (Yes, he could run the pari test
suite independently, but that wasn't the top priority -- first we want
to see how much of Sage builds.)

 -- William

>
> Cheers,
> Bill.
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org