[Numpy-discussion] Fortran 95 compiler (from gcc 4.1.1) is not recognized by scipy (original) (raw)
Darren Dale dd55 at cornell.edu
Thu Jun 8 09:43:07 EDT 2006
- Previous message (by thread): [Numpy-discussion] Re: Fortran 95 compiler (from gcc 4.1.1) is not recognized by scipy
- Next message (by thread): [Numpy-discussion] Suggestions for NumPy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thursday 01 June 2006 12:46, Robert Kern wrote:
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 ? > setuppackage() > File "setup.py", line 42, in setuppackage > configuration=configuration ) > File "/usr/lib/python2.4/site-packages/numpy/distutils/core.py", line > 170, in setup > return oldsetup(**newattr) > File "/usr/lib/python2.4/distutils/core.py", line 149, in setup > dist.runcommands() > File "/usr/lib/python2.4/distutils/dist.py", line 946, in runcommands > self.runcommand(cmd) > File "/usr/lib/python2.4/distutils/dist.py", line 966, in runcommand > cmdobj.run() > File "/usr/lib/python2.4/distutils/command/build.py", line 112, in run > self.runcommand(cmdname) > File "/usr/lib/python2.4/distutils/cmd.py", line 333, in runcommand > self.distribution.runcommand(command) > File "/usr/lib/python2.4/distutils/dist.py", line 966, in runcommand > cmdobj.run() > File > "/usr/lib/python2.4/site-packages/numpy/distutils/command/buildext.py", > line 109, in run > self.buildextensions() > File "/usr/lib/python2.4/distutils/command/buildext.py", line 405, in > builde xtensions > self.buildextension(ext) > File > "/usr/lib/python2.4/site-packages/numpy/distutils/command/buildext.py", > line 301, in buildextension > link = self.fcompiler.linksharedobject > AttributeError: 'NoneType' object has no attribute 'linksharedobject' > > ---- > > 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 simpleversionmatch >>> m = simpleversionmatch(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 configfc --fcompiler=gnu buildsrc buildclib buildext build
I am able to build numpy/scipy on a 64bit Athlon with gentoo and gcc-4.1.1. I get one error with scipy 0.5.0.1940:
FAIL: check_random_complex_overdet (scipy.linalg.tests.test_basic.test_lstsq)
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/scipy/linalg/tests/test_basic.py",
line 413, in check_random_complex_overdet
assert_array_almost_equal(x,direct_lstsq(a,b),3)
File "/usr/lib64/python2.4/site-packages/numpy/testing/utils.py", line 233,
in assert_array_almost_equal
assert cond,
AssertionError:
Arrays are not almost equal (mismatch 77.7777777778%):
Array 1: [[-0.0137+0.0173j 0.0037-0.0173j -0.0114+0.0119j]
[ 0.0029-0.0356j 0.0086-0.034j 0.033 -0.0879j]
[ 0.0041-0.0097j ...
Array 2: [[-0.016 +0.0162j 0.003 -0.0171j -0.0148+0.009j ]
[-0.0017-0.0405j 0.003 -0.036j 0.0256-0.0977j]
[ 0.0038-0.0112j ...
Also, there may be a minor bug in numpy/distutils. I get error messages during the build:
customize GnuFCompiler Couldn't match compiler version for 'GNU Fortran 95 (GCC) 4.1.1 (Gentoo 4.1.1)\nCopyright (C) 2006 Free Software Foundation, Inc.\n\nGNU Fortran comes with NO WARRANTY, to the extent permitted by law.\nYou may redistribute copies of GNU Fortran\nunder the terms of the GNU General Public License. \nFor more information about these matters, see the file named COPYING\n' customize CompaqFCompiler customize IntelItaniumFCompiler customize IntelEM64TFCompiler customize Gnu95FCompiler customize Gnu95FCompiler
This error message is returned because the fc_exe executable defined in GnuFCompiler returns a successful exit status to GnuFCompiler.get_version, but GnuFCompiler explicitly forbids identifying Fortran 95. I only bring it up because the build yields an error message that might confuse people.
Darren
- Previous message (by thread): [Numpy-discussion] Re: Fortran 95 compiler (from gcc 4.1.1) is not recognized by scipy
- Next message (by thread): [Numpy-discussion] Suggestions for NumPy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]