By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,095 Members | 1,658 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,095 IT Pros & Developers. It's quick & easy.

Distutils spawn on unix acting strange

P: n/a

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

Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.