[Distutils] distutil or setup problem?

Berthold Höllmann hoel@germanlloyd.org
Tue Nov 21 08:34:02 2000


Hello,

Trying to use distutils 1.0.1 to build an extension module and an
accompanying library I have some problems. First, when I call

> python setup.py build

I get

  cg error (as) : cannot open output file "build/temp.solaris-2.7-sun4u-1.5/../mtxobj_spooles.o" 

under solaris and a similar message under WIN32. My library files are
in the parent directory to the directory where setup.py is. So in the
definitions for the library build i use "../mtxobj_spooles.c" which
leads distutils not to generate the "build/temp.*" directory.

But this is a minor problem compared to my second problem. I can't
belive it is a general distutils problem, but have no clue what else
can be wrong. After having made "build/temp.win32-1.5" by hand,
compiling the windows version fails with "unresolved external symbol"
errors like these:

spsolve.obj : error LNK2001: unresolved external symbol _PyErr_SetFromErrno
spsolve.obj : error LNK2001: unresolved external symbol _PyCObject_FromVoidPtr
spsolve.obj : error LNK2001: unresolved external symbol _PyArg_ParseTuple
spsolve.obj : error LNK2001: unresolved external symbol _PyCObject_AsVoidPtr
spsolve.obj : error LNK2001: unresolved external symbol _PyErr_SetString
spsolve.obj : error LNK2001: unresolved external symbol __imp__PyExc_TypeError
spsolve.obj : error LNK2001: unresolved external symbol __imp__PyCObject_Type
spsolve.obj : error LNK2001: unresolved external symbol _Py_BuildValue
spsolve.obj : error LNK2001: unresolved external symbol __imp__PyExc_ValueError
spsolve.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct
spsolve.obj : error LNK2001: unresolved external symbol _PyDict_GetItemString
spsolve.obj : error LNK2001: unresolved external symbol _PyModule_GetDict
spsolve.obj : error LNK2001: unresolved external symbol _PyImport_ImportModule
spsolve.obj : error LNK2001: unresolved external symbol _Py_InitModule4

now that seems strange to me though i thought the distutils take care
to link python15.lib to avoid these error messages. Could that be a
configuration problem on my side or is this a 1.0.1 bug?

Greetings

Berthold
-- 
       email: hoel@GermanLloyd.org
   )   tel. : +49 (40) 3 61 49 - 73 74
  (
C[_]  These opinions might be mine, but never those of my employer.