[Numpy-discussion] 1.3.0 rc1 MATHLIB env variable / bad compiler flags

Mark Sienkiewicz sienkiew@stsci....
Wed Apr 1 11:56:05 CDT 2009


I have this configuration:

numpy 1.3.0 rc1
Solaris 10
Python 2.5.4 compiled as a 64 bit executable

When I try to install numpy, it says:

C compiler: cc -DNDEBUG -O -xarch=native64 -xcode=pic32

compile options: '-Inumpy/core/src -Inumpy/core/include 
-I/usr/stsci/Python-2.5.4/include/python2.5 -c'
cc: _configtest.c
cc _configtest.o -lm -o _configtest
ld: fatal: file _configtest.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to _configtest
ld: fatal: file _configtest.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to _configtest
failure.

  ...

    mathlibs = check_mathlib(config_cmd)
  File "numpy/core/setup.py", line 253, in check_mathlib
    raise EnvironmentError("math library missing; rerun "
EnvironmentError: math library missing; rerun setup.py after setting the 
MATHLIB env variable

Of course, the problem is that it is using the wrong compiler flags 
during the link phase, so nothing I set MATHLIB to can possibly work.

I found that I can get it to compile by creating these shell scripts:

% cat cc
#!/bin/sh
/opt/SUNWspro-6u2/bin/cc -xarch=native64 -xcode=pic32 $*

% cat f90
#!/bin/sh
/opt/SUNWspro-6u2/bin/f90 -xarch=native64 -xcode=pic32 $*

I think this looks like a bug.  I thought I might try to make a patch 
(since this is all about installing, so, in principle, you don't need to 
know much about numpy), but I did not get very far in figuring out how 
the install works.

The good news is that once you get it to build, it seems to work.  
(IIRC, rc1 fails the same test that it had problems with in my other 
email.  The fix on the trunk also works in 64 bit solaris.)

Mark S.



More information about the Numpy-discussion mailing list