[Numpy-discussion] Compiling NumPy on 64 bit Solaris 10 sparc)
Mon Jun 14 22:06:28 CDT 2010
Firstly thanks to everyone that has helped bring NumPy to the point it
is today. Its an excellent bit of software.
I've recently managed to get NumPy to compile on a 64 bit Solaris 10
(sparc) machine. We've embedded 64 bit Python in some of our C code
using the Python C-API, and therefore require a 64 bit version of
I had to use a bit of a hack to get NumPy to compile in 64 bit mode,
and I'm just wondering if there's a more elegant way of doing it?
If I set CFLAGS to "-m64 -xcode=pic32", and CC to "/usr/bin/cc", it
will raise the following error:
... snipped most of backtrace ...
line 385, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 675, in get_mathlib_info
raise RuntimeError("Broken toolchain: cannot link a simple C program")
However, if I create a wrapper script and set CC to the path of the
wrapper, then it will build normally and create a NumPy module I can
use from the 64 bit version of Python installed on the system
(/usr/bin/sparcv9/python). Here's the wrapper:
/usr/bin/cc -m64 -xcode=pic32 $*
I did a bit of googling and couldn't find much information on this
issue (which is why I wanted to post this message, so others could
find it). I'm satisfied with the results, but wondering if there's a
better way to do it.
More information about the NumPy-Discussion