[Numpy-discussion] Ctypes required? Fails to build.
Wed Jul 2 17:10:06 CDT 2008
On Wed, Jul 2, 2008 at 16:43, James Turner <email@example.com> wrote:
> I'm trying to build Python 2.5.1 on Solaris 9 with the Sun
> WorkShop 6 compiler, but it is failing to build the ctypes
> extension. Can anyone tell me whether NumPy 1.1 (or 1.04) can
> work without ctypes, please?
It should work unless if you specifically use the ctypes features.
Some tests related to that functionality might fail, but you can
> What about SciPy 0.6?
> that's a silly question, but I can't see how to make it
> compile so I'm a bit stuck!
> I have been through one previous iteration where I tried
> building NumPy 1.0.4 after ignoring the ctypes problem and it
> produces undefined symbol errors for various math functions
> like "exp" and "sqrt".
You may need to link in your system's math library explicitly.
Typically, the link flags provided from Python during the build
process have this, but your system may be atypical. Try this:
python setup.py build_ext -lm build
If your system's math library is not named "libm.so" (or .a or
whatever extension is appropriate), then replace "m" in "-lm" with the
Your problem may also be that you have the environment variable
$LDFLAGS defined. This can override the default link flags when
building numpy, so only do so if you know exactly what flags need to
go there. Instead, use the -L and -l flags as above if you just need
to change those.
"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
More information about the Numpy-discussion