[Numpy-discussion] rc2 for NumPy 1.4.1 and Scipy 0.7.2

Bruce Southey bsouthey@gmail....
Mon Apr 12 08:53:05 CDT 2010


On 04/12/2010 04:25 AM, David wrote:
> On 04/12/2010 06:03 PM, Nadav Horesh wrote:
>    
>> Tried of install numy-1.4.1-rc2 on python-2.7b1 and got an error:
>>
>> (64 bit linux on core2, gcc4.4.3)
>>
>>
>> compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/usr/local/include/python2.7 -c'
>> gcc: _configtest.c
>> _configtest.c:1: warning: conflicting types for built-in function ‘exp’
>> gcc -pthread _configtest.o -o _configtest
>> _configtest.o: In function `main':
>> /dev/shm/numpy-1.4.1rc2/_configtest.c:6: undefined reference to `exp'
>> collect2: ld returned 1 exit status
>> _configtest.o: In function `main':
>> /dev/shm/numpy-1.4.1rc2/_configtest.c:6: undefined reference to `exp'
>> collect2: ld returned 1 exit status
>> Traceback (most recent call last):
>>     File "setup.py", line 187, in<module>
>>       setup_package()
>>     File "setup.py", line 180, in setup_package
>>       configuration=configuration )
>>     File "/dev/shm/numpy-1.4.1rc2/numpy/distutils/core.py", line 186, in setup
>>       return old_setup(**new_attr)
>>     File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup
>>       dist.run_commands()
>>     File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
>>       self.run_command(cmd)
>>     File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
>>       cmd_obj.run()
>>     File "/dev/shm/numpy-1.4.1rc2/numpy/distutils/command/build.py", line 37, in run
>>       old_build.run(self)
>>     File "/usr/local/lib/python2.7/distutils/command/build.py", line 127, in run
>>       self.run_command(cmd_name)
>>     File "/usr/local/lib/python2.7/distutils/cmd.py", line 326, in run_command
>>       self.distribution.run_command(command)
>>     File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
>>       cmd_obj.run()
>>     File "/dev/shm/numpy-1.4.1rc2/numpy/distutils/command/build_src.py", line 152, in run
>>       self.build_sources()
>>     File "/dev/shm/numpy-1.4.1rc2/numpy/distutils/command/build_src.py", line 163, in build_sources
>>       self.build_library_sources(*libname_info)
>>     File "/dev/shm/numpy-1.4.1rc2/numpy/distutils/command/build_src.py", line 298, in build_library_sources
>>       sources = self.generate_sources(sources, (lib_name, build_info))
>>     File "/dev/shm/numpy-1.4.1rc2/numpy/distutils/command/build_src.py", line 385, in generate_sources
>>       source = func(extension, build_dir)
>>     File "numpy/core/setup.py", line 658, in get_mathlib_info
>>       mlibs = check_mathlib(config_cmd)
>>     File "numpy/core/setup.py", line 328, in check_mathlib
>>       if config_cmd.check_func("exp", libraries=libs, decl=True, call=True):
>>     File "/dev/shm/numpy-1.4.1rc2/numpy/distutils/command/config.py", line 310, in check_func
>>       libraries, library_dirs)
>>     File "/usr/local/lib/python2.7/distutils/command/config.py", line 251, in try_link
>>       libraries, library_dirs, lang)
>>      
> Looks like another distutils regression in 2.7 to me - try_link should
> never cause an error if it fails linking, that's the whole point of the
> function.
>
> cheers,
>
> David
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>    
Hi,
I think this is due to the error: 'NameError: global name 
'DistutilsExecError' is not defined'
from:
   File 
"/home/bsouthey/python/numpy-1.4.1rc2/numpy/distutils/ccompiler.py", 
line 64, in CCompiler_spawn
     raise DistutilsExecError,\

This is a bug in numpy that was fixed in SVN - scipy.org is slow (or 
down) so I can not find the actual ticket.

The following lines *must* be added to the numpy 1.4.1 version of 
"numpy/distutils/ccompiler.py":
from distutils.errors import DistutilsExecError, DistutilsModuleError, \
                              DistutilsPlatformError



Bruce




More information about the NumPy-Discussion mailing list