Numeric-13 build failure on Python 1.6a2
Randall Hopper
aa8vb at yahoo.com
Mon Apr 17 12:13:50 EDT 2000
I'm getting a build failure with Numeric-13 with Python 1.6a2. There
seem to be two problems at work here:
---------------------------------------------------------------------------
1) The first problem is the linker tries to link for the wrong architecture.
When makesetup writes $(LDSHARED) command-lines, it doesn't include
$(LDFLAGS) on that command-line. In Python's config/Makefile,
LDFLAGS=-n32 here on IRIX.
It's this line in makesetup that writes these link lines:
rule="$rule; \$(LDSHARED) $objs $libs -o $file"
If I add \$(LDFLAGS) to it, we're past that hurdle.
---------------------------------------------------------------------------
2) The second problem is that in Python's config/Makefile, it has:
LDSHARED= ld
But it should be:
LDSHARED= ld -shared
As a result, when Numeric goes to link a shared object, it inadvertantly
tries to link it as an executable, which of course fails.
Changing this declaration as described above fixes problem #2.
---------------------------------------------------------------------------
Before I add this to the bug database, could someone confirm that these are
the right fixes for this problem?
Thanks,
Randall
==============================================================================
ERROR #1:
...
cc -n32 -I./Include -O -KPIC -OPT:Olimit=0 -I/home/rhh/bin/../software/python-1.6/include/python1.6 -I/home/rhh/bin/../software/python-1.6/PLATFORM/plat-irix646-n32/include/python1.6 -DHAVE_CONFIG_H -c ./Src/ufuncobject.c
ld _numpymodule.o arrayobject.o ufuncobject.o -o _numpymodule.so
ld: FATAL 12 : Expecting o32 objects: _numpymodule.o is n32.
*** Error code 4 (bu21)
==============================================================================
ERROR #2:
...
ld -n32 _numpymodule.o arrayobject.o ufuncobject.o -o _numpymodule.so
ld32: ERROR 33 : Unresolved text symbol "Py_InitModule4" -- 1st referenced by _numpymodule.o.
ld32: ERROR 33 : Unresolved text symbol "PyModule_GetDict" -- 1st referenced by _numpymodule.o.
ld32: ERROR 33 : Unresolved text symbol "PyCObject_FromVoidPtr" -- 1st referenced by _numpymodule.o.
...
==============================================================================
More information about the Python-list
mailing list