From: Robert K. <rob...@gm...> - 2006-06-01 16:47:30
|
Nadav Horesh wrote: > I recently upgraded to gcc4.1.1. When I tried to compile scipy from today's svn repository it halts with the following message: > > Traceback (most recent call last): > File "setup.py", line 50, in ? > setup_package() > File "setup.py", line 42, in setup_package > configuration=configuration ) > File "/usr/lib/python2.4/site-packages/numpy/distutils/core.py", line 170, in > setup > return old_setup(**new_attr) > File "/usr/lib/python2.4/distutils/core.py", line 149, in setup > dist.run_commands() > File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands > self.run_command(cmd) > File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > cmd_obj.run() > File "/usr/lib/python2.4/distutils/command/build.py", line 112, in run > self.run_command(cmd_name) > File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command > self.distribution.run_command(command) > File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > cmd_obj.run() > File "/usr/lib/python2.4/site-packages/numpy/distutils/command/build_ext.py", > line 109, in run > self.build_extensions() > File "/usr/lib/python2.4/distutils/command/build_ext.py", line 405, in build_e > xtensions > self.build_extension(ext) > File "/usr/lib/python2.4/site-packages/numpy/distutils/command/build_ext.py", > line 301, in build_extension > link = self.fcompiler.link_shared_object > AttributeError: 'NoneType' object has no attribute 'link_shared_object' > > ---- > > The output of gfortran --version: > > GNU Fortran 95 (GCC) 4.1.1 (Gentoo 4.1.1) Hmm. The usual suspect (not finding the version) doesn't seem to be the problem here. >>> from numpy.distutils.ccompiler import simple_version_match >>> m = simple_version_match(start='GNU Fortran 95') >>> m(None, 'GNU Fortran 95 (GCC) 4.1.1 (Gentoo 4.1.1)') '4.1.1' > I have also the old g77 compiler installed (g77-3.4.6). Is there a way to force numpy/scipy to use it? Sure. python setup.py config_fc --fcompiler=gnu build_src build_clib build_ext build -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |