Distutils spawn on unix acting strange

T

Travis Oliphant

I have a normal looking setup.py file with a single extension module.
When distutils runs (python setup.py build), the module compiles fine,
but an error is issued that seems to indicate that gcc is being called
with a "blank" input file (and gives an error).

It appears that the spawn process inside of distutils is generating two
calls: one that succeeds in compiling the module (it takes a while to
compile) and another that is giving an error.

Here is a typical output:

unning install
running build
running build_py
creating build
creating build/lib.linux-i686-2.3
creating build/lib.linux-i686-2.3/ndarray
copying Lib/numeric.py -> build/lib.linux-i686-2.3/ndarray
copying Lib/numeric_version.py -> build/lib.linux-i686-2.3/ndarray
copying Lib/numerictypes.py -> build/lib.linux-i686-2.3/ndarray
copying Lib/array_printer.py -> build/lib.linux-i686-2.3/ndarray
copying Lib/__init__.py -> build/lib.linux-i686-2.3/ndarray
running build_ext
building 'ndarray/multiarray' extension
creating build/temp.linux-i686-2.3
creating build/temp.linux-i686-2.3/Src
cc -fno-strict-aliasing -DNDEBUG -O2 -fomit-frame-pointer -pipe
-march=i586 -mtune=pe ntiumpro -g -fPIC
-DSIZEOF_LONG_DOUBLE=12 -IInclude -I/usr/include/python2.3 -c
Src/m ultiarraymodule.c -o
build/temp.linux-i686-2.3/Src/multiarraymodule.o
cc: : No such file or directory
[snip]
error: command 'cc' failed with exit status 1

The error is apparently coming from cc (gcc) which states "no such file
or directory", but there is no file given so apparently cc is being
called with a "blank" file (not just no file, but a "blank" file).

The trouble is, the module is actually compiling fine (I can run python
setup.py install again and
it finds the recent build and goes forward). I also don't get the
mysterious errror when I just cut-and-paste the
compile line.

I am very confused. Has anyone seen this or anything like this before?
Any help appreciated.

-Travis Oliphant
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top