[Numpy-discussion] build failure with macosx-10.5-fat64-2.6

David Warde-Farley dwf@cs.toronto....
Tue May 19 19:26:02 CDT 2009


I've just tried a "fat 64" build (with a Python 2.6.2 that had been  
built similarly),  and I'm getting this weird behaviour. The command I  
used was:

CFLAGS="-O3 -Wall -DNDEBUG -g -fwrapv -Wstrict-prototypes -arch x86_64  
-arch ppc64" python setup.py build

It looks as though for some reason, numpy distutils is executing gcc  
without any -arch flags, and falling back to the guessed architecture  
ppc (which in my cases is not even partially correct, as I was  
building x86_64 and ppc64 only).

Building with CC="gcc -arch x86_64 -arch ppc64" fixes things, but I  
guess this is a bug in numpy distutils if it's not respecting CFLAGS  
during these config tests. Output is below.

Cheers,

David

------------

C compiler: gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -O3 - 
Wall -DNDEBUG -g -fwrapv -Wstrict-prototypes -arch x86_64 -arch ppc64

compile options: '-Inumpy/core/src -Inumpy/core/src/multiarray -Inumpy/ 
core/src/umath -Inumpy/core/include -I/Library/Frameworks/ 
Python64.framework/Versions/2.6/include/python2.6 -c'
gcc: _configtest.c
_configtest.c:1: warning: conflicting types for built-in function ‘exp’
_configtest.c:1: warning: conflicting types for built-in function ‘exp’
gcc _configtest.o -o _configtest
ld warning: in _configtest.o, missing required architecture ppc in file
Undefined symbols:
   "_main", referenced from:
       start in crt1.10.5.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
ld warning: in _configtest.o, missing required architecture ppc in file
Undefined symbols:
   "_main", referenced from:
       start in crt1.10.5.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
failure.
removing: _configtest.c _configtest.o
C compiler: gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -O3 - 
Wall -DNDEBUG -g -fwrapv -Wstrict-prototypes -arch x86_64 -arch ppc64

compile options: '-Inumpy/core/src -Inumpy/core/src/multiarray -Inumpy/ 
core/src/umath -Inumpy/core/include -I/Library/Frameworks/ 
Python64.framework/Versions/2.6/include/python2.6 -c'
gcc: _configtest.c
_configtest.c:1: warning: conflicting types for built-in function ‘exp’
_configtest.c:1: warning: conflicting types for built-in function ‘exp’
gcc _configtest.o -lm -o _configtest
ld warning: in _configtest.o, missing required architecture ppc in file
Undefined symbols:
   "_main", referenced from:
       start in crt1.10.5.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
ld warning: in _configtest.o, missing required architecture ppc in file
Undefined symbols:
   "_main", referenced from:
       start in crt1.10.5.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
failure.
removing: _configtest.c _configtest.o
C compiler: gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -O3 - 
Wall -DNDEBUG -g -fwrapv -Wstrict-prototypes -arch x86_64 -arch ppc64

compile options: '-Inumpy/core/src -Inumpy/core/src/multiarray -Inumpy/ 
core/src/umath -Inumpy/core/include -I/Library/Frameworks/ 
Python64.framework/Versions/2.6/include/python2.6 -c'
gcc: _configtest.c
_configtest.c:1: warning: conflicting types for built-in function ‘exp’
_configtest.c:1: warning: conflicting types for built-in function ‘exp’
gcc _configtest.o -lcpml -o _configtest
ld: library not found for -lcpml
collect2: ld returned 1 exit status
ld: library not found for -lcpml
collect2: ld returned 1 exit status
failure.
removing: _configtest.c _configtest.o
Traceback (most recent call last):
   File "setup.py", line 172, in <module>
     setup_package()
   File "setup.py", line 165, in setup_package
     configuration=configuration )
   File "/Users/dwf/src/numpy-svn/numpy/distutils/core.py", line 184,  
in setup
     return old_setup(**new_attr)
   File "/Library/Frameworks/Python64.framework/Versions/2.6/lib/ 
python2.6/distutils/core.py", line 152, in setup
     dist.run_commands()
   File "/Library/Frameworks/Python64.framework/Versions/2.6/lib/ 
python2.6/distutils/dist.py", line 975, in run_commands
     self.run_command(cmd)
   File "/Library/Frameworks/Python64.framework/Versions/2.6/lib/ 
python2.6/distutils/dist.py", line 995, in run_command
     cmd_obj.run()
   File "/Users/dwf/src/numpy-svn/numpy/distutils/command/build.py",  
line 37, in run
     old_build.run(self)
   File "/Library/Frameworks/Python64.framework/Versions/2.6/lib/ 
python2.6/distutils/command/build.py", line 134, in run
     self.run_command(cmd_name)
   File "/Library/Frameworks/Python64.framework/Versions/2.6/lib/ 
python2.6/distutils/cmd.py", line 333, in run_command
     self.distribution.run_command(command)
   File "/Library/Frameworks/Python64.framework/Versions/2.6/lib/ 
python2.6/distutils/dist.py", line 995, in run_command
     cmd_obj.run()
   File "/Users/dwf/src/numpy-svn/numpy/distutils/command/ 
build_src.py", line 130, in run
     self.build_sources()
   File "/Users/dwf/src/numpy-svn/numpy/distutils/command/ 
build_src.py", line 147, in build_sources
     self.build_extension_sources(ext)
   File "/Users/dwf/src/numpy-svn/numpy/distutils/command/ 
build_src.py", line 250, in build_extension_sources
     sources = self.generate_sources(sources, ext)
   File "/Users/dwf/src/numpy-svn/numpy/distutils/command/ 
build_src.py", line 307, in generate_sources
     source = func(extension, build_dir)
   File "numpy/core/setup.py", line 337, in generate_config_h
     mathlibs = check_mathlib(config_cmd)
   File "numpy/core/setup.py", line 281, in check_mathlib
     raise EnvironmentError("math library missing; rerun "
EnvironmentError: math library missing; rerun setup.py after setting  
the MATHLIB env variable



More information about the Numpy-discussion mailing list