sage-4.0.alpha0 build failure on OS X PPC

15 views
Skip to first unread message

Kevin Horton

unread,
May 19, 2009, 8:22:00 PM5/19/09
to sage-...@googlegroups.com
Should sage-4.0.alpha0 build on OS X 10.5 PPC? I tried on my trusty
PowerBook, and building GMP failed with:

gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -
DOPERATION_scan1 -I/sw/include -I/sw/include -c scan1.c -fno-common -
DPIC -o .libs/scan1.o
/bin/sh ../libtool --mode=compile --tag=CC ../mpn/m4-ccas --m4="m4"
gcc -std=gnu99 -c -DHAVE_CONFIG_H -I/sw/include -I/sw/include -
D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo popcount | sed 's/_$//'` -I. -
I. -I.. `test -f 'popcount.asm' || echo './'`popcount.asm
../mpn/m4-ccas --m4=m4 gcc -std=gnu99 -c -DHAVE_CONFIG_H -I/sw/
include -I/sw/include -D__GMP_WITHIN_GMP -I.. -DOPERATION_popcount -I.
-I. -I.. popcount.asm -fno-common -DPIC -o .libs/popcount.o
m4 -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_popcount -DPIC
popcount.asm >tmp-popcount.s
gcc -std=gnu99 -c -DHAVE_CONFIG_H -I/sw/include -I/sw/include -
D__GMP_WITHIN_GMP -I.. -DOPERATION_popcount -I. -I. -I.. tmp-
popcount.s -fno-common -DPIC -o .libs/popcount.o
tmp-popcount.s:127:vspltisb vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:128:vspltisb vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:129:vspltisb vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:130:lvx vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:131:lvx vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:132:vspltisb vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:137:lvx vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:140:lvx vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:141:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:147:vxor vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:150:vxor vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:172:lvx vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:174:lvx vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:176:vsr vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:177:vsr vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:179:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:180:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:181:vsububm vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:182:vsububm vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:183:vsr vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:184:vsr vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:185:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:186:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:187:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:188:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:189:vaddubm vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:190:vaddubm vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:191:vaddubm vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:192:vsr vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:193:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:194:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:195:vaddubm vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:196:vsum4ubs vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:202:lvx vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:203:vxor vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:207:vor vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:208:lvx vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:213:lvx vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:214:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:216:vsr vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:217:vsr vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:218:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:219:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:220:vsububm vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:221:vsububm vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:222:vsr vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:223:vsr vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:224:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:225:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:226:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:227:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:228:vaddubm vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:229:vaddubm vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:230:vaddubm vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:231:vsr vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:232:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:233:vand vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:234:vaddubm vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:235:vsum4ubs vector instruction is optional for the
PowerPC (not allowed without -force_cpusubtype_ALL option)
tmp-popcount.s:239:stvx vector instruction is optional for the PowerPC
(not allowed without -force_cpusubtype_ALL option)
make[4]: *** [popcount.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
Error building GMP.

real 7m36.832s
user 0m44.508s
sys 1m13.594s
sage: An error occurred while installing gmp-mpir-1.1.1
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
of /Applications/sage-4.0.alpha0/install.log. Describe your computer,
operating system, etc.
If you want to try to fix the problem, yourself *don't* just cd to
/Applications/sage-4.0.alpha0/spkg/build/gmp-mpir-1.1.1 and type 'make'.
Instead type "/Applications/sage-4.0.alpha0/sage -sh"
in order to set all environment variables correctly, then cd to
/Applications/sage-4.0.alpha0/spkg/build/gmp-mpir-1.1.1
(When you are done debugging, you can type "exit" to leave the
subshell.)
make[1]: *** [installed/gmp-mpir-1.1.1] Error 1

real 8m34.785s
user 0m53.398s
sys 1m18.621s
/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/
Python.app/Contents/MacOS/Python: can't open file '/Applications/
sage-4.0.alpha0/devel/sage/doc/common/builder.py': [Errno 2] No such
file or directory

--
Kevin Horton
Ottawa, Canada

mabshoff

unread,
May 19, 2009, 8:28:09 PM5/19/09
to sage-devel


On May 19, 5:22 pm, Kevin Horton <khorto...@rogers.com> wrote:
> Should sage-4.0.alpha0 build on OS X 10.5 PPC?

Yes, it should. What XCode release are you using?

> --
> Kevin Horton
> Ottawa, Canada

Cheers,

Michael

Kevin Horton

unread,
May 19, 2009, 8:34:12 PM5/19/09
to sage-...@googlegroups.com
Sorry about the last one - blasted Send button

On Tue, May 19, 2009 at 8:28 PM, mabshoff <mabs...@googlemail.com> wrote:



On May 19, 5:22 pm, Kevin Horton <khorto...@rogers.com> wrote:
> Should sage-4.0.alpha0 build on OS X 10.5 PPC?

Yes, it should. What XCode release are you using?

I've got XCode 3.1.2, and now that I check I see that gives me gcc 4.0.1, and the README says that is bad.  I'll look for a newer XCode, with at least gcc 4.1

Kevin

mabshoff

unread,
May 19, 2009, 8:55:03 PM5/19/09
to sage-devel


On May 19, 5:34 pm, Kevin Horton <khorto...@rogers.com> wrote:
> Sorry about the last one - blasted Send button
>
> On Tue, May 19, 2009 at 8:28 PM, mabshoff <mabsh...@googlemail.com> wrote:
>
> > On May 19, 5:22 pm, Kevin Horton <khorto...@rogers.com> wrote:
> > > Should sage-4.0.alpha0 build on OS X 10.5 PPC?
>
> > Yes, it should. What XCode release are you using?
>
> I've got XCode 3.1.2, and now that I check I see that gives me gcc 4.0.1,
> and the README says that is bad.

No, gcc 4.0.0 is bad in many cases, but XCode 3.1.2 should work.
Please post a link to the compressed install.log and I will take a
look.

> I'll look for a newer XCode, with at least
> gcc 4.1

There is none publicly available with any gcc post 4.0.1 by Apple
AFAIK. XCode 3.1.2 is that latest available for OSX 10.5. And the
problem is more likely to be an issue with the assembler IMHO anyway.
What CPU are you running on exactly?

> Kevin

Cheers,

Michael

Kevin Horton

unread,
May 19, 2009, 9:34:37 PM5/19/09
to sage-...@googlegroups.com
On 19 May 2009, at 20:55, mabshoff wrote:

>
> On May 19, 5:34 pm, Kevin Horton <khorto...@rogers.com> wrote:
>>
>> On Tue, May 19, 2009 at 8:28 PM, mabshoff <mabsh...@googlemail.com>
>> wrote:
>>
>>> On May 19, 5:22 pm, Kevin Horton <khorto...@rogers.com> wrote:
>>>> Should sage-4.0.alpha0 build on OS X 10.5 PPC?
>>
>>> Yes, it should. What XCode release are you using?
>>
>> I've got XCode 3.1.2, and now that I check I see that gives me gcc
>> 4.0.1,
>> and the README says that is bad.
>
> No, gcc 4.0.0 is bad in many cases, but XCode 3.1.2 should work.
> Please post a link to the compressed install.log and I will take a
> look.
>

The install log is at:
http://www.kilohotel.com/misc/install.log.gz

>> I'll look for a newer XCode, with at least
>> gcc 4.1
>
> There is none publicly available with any gcc post 4.0.1 by Apple
> AFAIK. XCode 3.1.2 is that latest available for OSX 10.5. And the
> problem is more likely to be an issue with the assembler IMHO anyway.
> What CPU are you running on exactly?

Its a G4, a 12" PowerBook.

Regards,

Kevin

gsw

unread,
May 21, 2009, 4:19:14 AM5/21/09
to sage-devel
Hi,

Sage-4.0.alpha0 did build fine on my G4 PowerBook 550Mhz with OS X
10.4.11 and Xcode 2.5. From the istall.log:

gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -
DOPERATION_scan1 -O2 -mpowerpc -no-cpp-precomp -force_cpusubtype_ALL -
c scan1.c -fno-common -DPIC -o .libs/scan1.o
/bin/sh ../libtool --mode=compile --tag=CC ../mpn/m4-ccas --m4="m4"
gcc -std=gnu99 -c -DHAVE_CONFIG_H -O2 -mpowerpc -no-cpp-precomp -
force_cpusubtype_ALL -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo
popcount | sed 's/_$//'` -I. -I. -I.. `test -f 'popcount.asm' || echo
'./'`popcount.asm
../mpn/m4-ccas --m4=m4 gcc -std=gnu99 -c -DHAVE_CONFIG_H -O2 -
mpowerpc -no-cpp-precomp -force_cpusubtype_ALL -D__GMP_WITHIN_GMP -I..
-DOPERATION_popcount -I. -I. -I.. popcount.asm -fno-common -DPIC -
o .libs/popcount.o
m4 -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_popcount -DPIC
popcount.asm >tmp-popcount.s
gcc -std=gnu99 -c -DHAVE_CONFIG_H -O2 -mpowerpc -no-cpp-precomp -
force_cpusubtype_ALL -D__GMP_WITHIN_GMP -I.. -DOPERATION_popcount -I. -
I. -I.. tmp-popcount.s -fno-common -DPIC -o .libs/popcount.o
/bin/sh ../libtool --tag=CC --mode=compile gcc -std=gnu99 -
DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo
hamdist | sed 's/_$//'` -O2 -mpowerpc -no-cpp-precomp -
force_cpusubtype_ALL -c -o hamdist.lo hamdist.c
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -
DOPERATION_hamdist -O2 -mpowerpc -no-cpp-precomp -force_cpusubtype_ALL
-c hamdist.c -fno-common -DPIC -o .libs/hamdist.o

As one can see, the compilation is done *with* the option "-
force_cpusubtype_ALL".

From the configuration output of the mpir package on my system:
...
checking build system type... powerpc7450-apple-darwin8.11.0
...
using ABI="32"
CC="gcc -std=gnu99"
CFLAGS="-O2 -mpowerpc -no-cpp-precomp -force_cpusubtype_ALL"
CPPFLAGS=""
CXX="g++"
CXXFLAGS="-O2 -mpowerpc -no-cpp-precomp -force_cpusubtype_ALL"
MPN_PATH=" powerpc32/vmx powerpc32 powerpc32 generic"

From the configuration output of the install.log you posted:
...
checking build system type... powerpc7450-apple-darwin9.7.0
...
using ABI="32"
CC="gcc -std=gnu99"
CFLAGS="-I/sw/include"
CPPFLAGS="-I/sw/include"
CXX="g++"
CXXFLAGS="-I/sw/include"
MPN_PATH=" powerpc32/vmx powerpc32 powerpc32 generic"

So there is some misconfiguration happening --- the mpir maintainers
probably will find a solution quickly.
(Beware, I'm uneasy about the occurence of the MacPorts (or Fink?)
path "-I/sw/include" here.)

Cheers,
gsw

mabshoff

unread,
May 22, 2009, 2:45:14 PM5/22/09
to sage-devel


On May 21, 1:19 am, gsw <GeorgSWe...@googlemail.com> wrote:
> Hi,

<SNIP>

> using ABI="32"
>       CC="gcc -std=gnu99"
>       CFLAGS="-O2 -mpowerpc -no-cpp-precomp -force_cpusubtype_ALL"
>       CPPFLAGS=""
>       CXX="g++"
>       CXXFLAGS="-O2 -mpowerpc -no-cpp-precomp -force_cpusubtype_ALL"
>       MPN_PATH=" powerpc32/vmx powerpc32 powerpc32 generic"
>
> From the configuration output of the install.log you posted:
> ...
> checking build system type... powerpc7450-apple-darwin9.7.0
> ...
> using ABI="32"
>       CC="gcc -std=gnu99"
>       CFLAGS="-I/sw/include"
>       CPPFLAGS="-I/sw/include"
>       CXX="g++"
>       CXXFLAGS="-I/sw/include"
>       MPN_PATH=" powerpc32/vmx powerpc32 powerpc32 generic"
>
> So there is some misconfiguration happening --- the mpir maintainers
> probably will find a solution quickly.
> (Beware, I'm uneasy about the occurence of the MacPorts (or Fink?)
> path "-I/sw/include" here.)

Yes, CFLAGS seems completely wrong. I have a patch that will not let
the user set custom [C|CPP|LD]FLAGS unless explicitly forcing Sage to
do so and it will print a big, fat warning in install.log. I doubt
this is Sage's fault, but I guess looking at MPIR's config.log in spkg/
build/gmp-mpir.../src/src should help.

Oh well.

> Cheers,
> gsw

Cheers,

Michael

Kevin Horton

unread,
May 22, 2009, 8:36:46 PM5/22/09
to sage-...@googlegroups.com

Yes, that looks suspicious. For that build, the sage install detect
the presence of fink, and offered two options:

You should make sure MacPorts and Fink cannot be found. Either:
(1) rename /opt/local and /sw, or
(2) change PATH and DYLD_LIBRARY_PATH

I elected option (2), and changed PATH to remove /sw/bin and /sw/
sbin. DYLD_LIBRARY_PATH was not set, so I left it alone. Maybe that
was a mistake, but I think it was an honest mistake, apt to be made by
users who don't know what values to set DYLD_LIBRARY_PATH.

After that build failed, sage-4.0.rc0 dropped, so I tried installing
it. This time I used option (1) - I renamed /sw, and the build went OK.

Perhaps the options when /sw is detected need to be reworked. Maybe
the user should be given specific direction on what value to set for
DYLD_LIBRARY_PATH.

gsw

unread,
May 23, 2009, 1:41:00 PM5/23/09
to sage-devel
Hi,

good to hear that you were able to build Sage at last!
From past discussions, and the bad experiences we had with MacPorts/
Fink intervening, I'd say "the glass is half full" rather than "the
glass is half empty".
It's quite a huge effort to make work "to build sage, simply type:
make", on a lot of systems at the same time. And something like a "no
custom C...Flags" patch might have problems on its own ...

Cheers,
gsw
Reply all
Reply to author
Forward
0 new messages