[Numpy-discussion] Ctypes required? Fails to build.

James Turner jturner@gemini....
Fri Jul 4 19:47:35 CDT 2008


Thanks, Robert and Stefan for your helpful replies. It makes
a big difference to know which problem I need to solve and which
I don't :-).

Unfortunately I'm still getting those undefined symbol errors
for certain maths functions. I tried "python setup.py build_ext
-lm build" and don't have $LDFLAGS defined, though I am setting
LD_LIBRARY_PATH and LD_RUN_PATH. But I think the compiler is
actually finding libm because "-lm" is included on some lines
without any complaint. Oddly enough, when I do numpy.test() in
Python, everything passes except for ctypes, so maybe it's OK?
I'll include the relevant output below in case anyone has ideas.

I also found a second problem that I was able to solve but I'm
wondering whether it's a bug? The C compiler failed with a
syntax error on line 1518 of numpy/core/src/umathmodule.c.src
because of a C++ style comment ("//"). When I remove the comment
it works. Should NumPy coding style cater for my eccentric C
compiler or is this all above board?

Hope I'm not being stupid with the first thing.

Thanks,

James.

---

cc: _configtest.c
cc _configtest.o -L/astro/iraf/solsparc/gempylocal/lib -L/usr/local/lib 
-L/usr/lib -o _configtest
_configtest
success!
removing: _configtest.c _configtest.o _configtest
C compiler: cc -DNDEBUG -O -xcode=pic32

compile options: '-Inumpy/core/src -Inumpy/core/include 
-I/astro/iraf/solsparc/gempylocal/include/python2.5 -c'
cc: _configtest.c
cc _configtest.o -o _configtest
Undefined                       first referenced
  symbol                             in file
exp                                 _configtest.o
ld: fatal: Symbol referencing errors. No output written to _configtest
Undefined                       first referenced
  symbol                             in file
exp                                 _configtest.o
ld: fatal: Symbol referencing errors. No output written to _configtest
failure.
removing: _configtest.c _configtest.o
C compiler: cc -DNDEBUG -O -xcode=pic32

compile options: '-Inumpy/core/src -Inumpy/core/include 
-I/astro/iraf/solsparc/gempylocal/include/python2.5 -c'
cc: _configtest.c
cc _configtest.o -lm -o _configtest
_configtest
success!
removing: _configtest.c _configtest.o _configtest
C compiler: cc -DNDEBUG -O -xcode=pic32

compile options: '-Inumpy/core/src -Inumpy/core/include 
-I/astro/iraf/solsparc/gempylocal/include/python2.5 -c'
cc: _configtest.c
"_configtest.c", line 4: undefined symbol: expl
cc: acomp failed for _configtest.c
"_configtest.c", line 4: undefined symbol: expl
cc: acomp failed for _configtest.c
failure.
removing: _configtest.c _configtest.o
C compiler: cc -DNDEBUG -O -xcode=pic32

compile options: '-Inumpy/core/src -Inumpy/core/include 
-I/astro/iraf/solsparc/gempylocal/include/python2.5 -c'
cc: _configtest.c
"_configtest.c", line 4: undefined symbol: expf
cc: acomp failed for _configtest.c
"_configtest.c", line 4: undefined symbol: expf
cc: acomp failed for _configtest.c
failure.
removing: _configtest.c _configtest.o
C compiler: cc -DNDEBUG -O -xcode=pic32

compile options: '-Inumpy/core/src -Inumpy/core/include 
-I/astro/iraf/solsparc/gempylocal/include/python2.5 -c'
cc: _configtest.c
cc _configtest.o -lm -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
C compiler: cc -DNDEBUG -O -xcode=pic32
compile options: '-Inumpy/core/src -Inumpy/core/include 
-I/astro/iraf/solsparc/gempylocal/include/python2.5 -c'
cc: _configtest.c
cc _configtest.o -lm -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
C compiler: cc -DNDEBUG -O -xcode=pic32
 

compile options: '-Inumpy/core/src -Inumpy/core/include 
-I/astro/iraf/solsparc/gempylocal/include/python2.5 -c'
cc: _configtest.c
cc _configtest.o -lm -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
C compiler: cc -DNDEBUG -O -xcode=pic32
 

compile options: '-Inumpy/core/src -Inumpy/core/include 
-I/astro/iraf/solsparc/gempylocal/include/python2.5 -c'
cc: _configtest.c
"_configtest.c", line 4: undefined symbol: atanhf
cc: acomp failed for _configtest.c
"_configtest.c", line 4: undefined symbol: atanhf
cc: acomp failed for _configtest.c
failure.
removing: _configtest.c _configtest.o
C compiler: cc -DNDEBUG -O -xcode=pic32
 

compile options: '-Inumpy/core/src -Inumpy/core/include 
-I/astro/iraf/solsparc/gempylocal/include/python2.5 -c'
cc: _configtest.c
cc _configtest.o -lm -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
C compiler: cc -DNDEBUG -O -xcode=pic32
 

compile options: '-Inumpy/core/src -Inumpy/core/include 
-I/astro/iraf/solsparc/gempylocal/include/python2.5 -c'
cc: _configtest.c
"_configtest.c", line 4: undefined symbol: isinf
cc: acomp failed for _configtest.c
"_configtest.c", line 4: undefined symbol: isinf
cc: acomp failed for _configtest.c
failure.
removing: _configtest.c _configtest.o
C compiler: cc -DNDEBUG -O -xcode=pic32
 

compile options: '-Inumpy/core/src -Inumpy/core/include 
-I/astro/iraf/solsparc/gempylocal/include/python2.5 -c'
cc: _configtest.c
cc _configtest.o -lm -o _configtest
success!
removing: _configtest.c _configtest.o _configtest



More information about the Numpy-discussion mailing list