[SciPy-user] Installation from source on OS X: 'NoneType' object has no attribute 'link_shared_object'

Michael Williams williams@astro.ox.ac...
Tue Sep 23 09:23:28 CDT 2008


Hi,

I'm having trouble installing scipy-0.6.0.tar.gz according to the  
instructions on http://www.scipy.org/Installing_SciPy/Mac_OS_X.

When I run "python setup.py build_src build_clib --fcompiler=gnu95  
build_ext --fcompiler=gnu95 build" I get the following error (email  
continues below):

Traceback (most recent call last):
   File "setup.py", line 53, in <module>
     setup_package()
   File "setup.py", line 45, in setup_package
     configuration=configuration )
   File "/System/Library/Frameworks/Python.framework/Versions/2.5/ 
Extras/lib/python/numpy/distutils/core.py", line 174, in setup
     return old_setup(**new_attr)
   File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/distutils/core.py", line 151, in setup
     dist.run_commands()
   File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/distutils/dist.py", line 974, in run_commands
     self.run_command(cmd)
   File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/distutils/dist.py", line 994, in run_command
     cmd_obj.run()
   File "/System/Library/Frameworks/Python.framework/Versions/2.5/ 
Extras/lib/python/numpy/distutils/command/build_ext.py", line 121, in  
run
     self.build_extensions()
   File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/distutils/command/build_ext.py", line 416, in build_extensions
     self.build_extension(ext)
   File "/System/Library/Frameworks/Python.framework/Versions/2.5/ 
Extras/lib/python/numpy/distutils/command/build_ext.py", line 312, in  
build_extension
     link = self.fcompiler.link_shared_object
AttributeError: 'NoneType' object has no attribute 'link_shared_object'

Relevant version information follows:

asosx40:~$ gfortran --version
GNU Fortran (GCC) 4.3.0 20070810 (experimental)
asosx40:~$ gcc --version
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5484)
asosx40:~$ python --version
Python 2.5.1

(This is the stock OS X 10.5 Python installation.)

I get the same error when I try this with the current scipy from svn.

I get a different error when I try to build using g77 by doing "python  
setup.py build_src build_clib --fcompiler=gnu build_ext -- 
fcompiler=gnu build":

creating build/lib.macosx-10.5-i386-2.5/scipy/fftpack
/usr/local/bin/g77 -g -Wall -undefined dynamic_lookup -bundle build/ 
temp.macosx-10.5-i386-2.5/build/src.macosx-10.5-i386-2.5/scipy/fftpack/ 
_fftpackmodule.o build/temp.macosx-10.5-i386-2.5/scipy/fftpack/src/ 
zfft.o build/temp.macosx-10.5-i386-2.5/scipy/fftpack/src/drfft.o build/ 
temp.macosx-10.5-i386-2.5/scipy/fftpack/src/zrfft.o build/ 
temp.macosx-10.5-i386-2.5/scipy/fftpack/src/zfftnd.o build/ 
temp.macosx-10.5-i386-2.5/build/src.macosx-10.5-i386-2.5/ 
fortranobject.o -L/usr/local/lib/gcc/i686-apple-darwin8.8.1/3.4.0 - 
Lbuild/temp.macosx-10.5-i386-2.5 -ldfftpack -lg2c -lcc_dynamic -o  
build/lib.macosx-10.5-i386-2.5/scipy/fftpack/_fftpack.so
ld: library not found for -lcc_dynamic
collect2: ld returned 1 exit status
ld: library not found for -lcc_dynamic
collect2: ld returned 1 exit status
error: Command "/usr/local/bin/g77 -g -Wall -undefined dynamic_lookup - 
bundle build/temp.macosx-10.5-i386-2.5/build/src.macosx-10.5-i386-2.5/ 
scipy/fftpack/_fftpackmodule.o build/temp.macosx-10.5-i386-2.5/scipy/ 
fftpack/src/zfft.o build/temp.macosx-10.5-i386-2.5/scipy/fftpack/src/ 
drfft.o build/temp.macosx-10.5-i386-2.5/scipy/fftpack/src/zrfft.o  
build/temp.macosx-10.5-i386-2.5/scipy/fftpack/src/zfftnd.o build/ 
temp.macosx-10.5-i386-2.5/build/src.macosx-10.5-i386-2.5/ 
fortranobject.o -L/usr/local/lib/gcc/i686-apple-darwin8.8.1/3.4.0 - 
Lbuild/temp.macosx-10.5-i386-2.5 -ldfftpack -lg2c -lcc_dynamic -o  
build/lib.macosx-10.5-i386-2.5/scipy/fftpack/_fftpack.so" failed with  
exit status 1

I would be very grateful for any suggestions!

Thanks,

-- 
Michael Williams
http://www-astro.physics.ox.ac.uk/~williams/


More information about the SciPy-user mailing list