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

distutils problem: using wrong compiler and specs

P: n/a
I've got a system where I try to install extensions using

/usr/local/bin/python setup.py install

But, it fails when it tries to use a non-existant compiler path
and specs file. I suspect it's trying to use the compieler
that was used to build /usr/bin/python.

How do I get it to use the compiler settings that were used for
/usr/local/bin/python?

Here's an example of the failure when I try to install pygame:

~/pygame/pygame-1.7.1release ~/pygame
sh: line 1: smpeg-config: command not found
Using UNIX configuration...

WARNING, No "Setup" File Exists, Running "config.py"

Hunting dependencies...
WARNING: "smpeg-config" failed!
SDL : found 1.2.12
FONT : not found
IMAGE : not found
MIXER : not found
SMPEG : not found
NUMERIC : not found
Warning, some of the pygame dependencies were not found. Pygame can still
compile and install, but games that depend on those missing dependencies
will not run. Would you like to continue the configuration? [Y/n]:
If you get compiler errors during install, doublecheck
the compiler flags in the "Setup" file.
Continuing With "setup.py"
running build
running build_py
creating build
creating build/lib.linux-arm-2.3
creating build/lib.linux-arm-2.3/pygame
copying lib/__init__.py -build/lib.linux-arm-2.3/pygame
copying lib/color.py -build/lib.linux-arm-2.3/pygame
copying lib/colordict.py -build/lib.linux-arm-2.3/pygame
copying lib/cursors.py -build/lib.linux-arm-2.3/pygame
copying lib/locals.py -build/lib.linux-arm-2.3/pygame
copying lib/macosx.py -build/lib.linux-arm-2.3/pygame
copying lib/pkgdata.py -build/lib.linux-arm-2.3/pygame
copying lib/sprite.py -build/lib.linux-arm-2.3/pygame
copying lib/sysfont.py -build/lib.linux-arm-2.3/pygame
copying lib/version.py -build/lib.linux-arm-2.3/pygame
running build_ext
building 'pygame.base' extension
creating build/temp.linux-arm-2.3
creating build/temp.linux-arm-2.3/src

gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local//lib/wx/include/gtk2-unicode-debug-2.8 -I/usr/local//include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D__WXDEBUG__ -D__WXGTK__ -pthread -fPIC -D_GNU_SOURCE= -D_REENTRANT -I/usr/local/include/SDL -I/scratchbox/tools/include/python2.3 -c src/base.c -o build/temp.linux-arm-2.3/src/base.o
In file included from /scratchbox/tools/include/python2.3/Python.h:8,
from src/pygame.h:57,
from src/base.c:24:
/scratchbox/tools/include/python2.3/pyconfig.h:831:1: warning: "_GNU_SOURCE" redefined
<command line>:9:1: warning: this is the location of the previous definition
/scratchbox/compilers/host-gcc/bin/gcc -specs=/scratchbox/compilers/host-gcc/host-gcc.specs -pthread -shared --asdf -I/usr/local//lib/wx/include/gtk2-unicode-debug-2.8 -I/usr/local//include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D__WXDEBUG__ -D__WXGTK__ -pthread build/temp.linux-arm-2.3/src/base.o -L/usr/local/lib -lSDL -lpthread -o build/lib.linux-arm-2.3/pygame/base.so -Wl,-rpath,/usr/local/lib
unable to execute /scratchbox/compilers/host-gcc/bin/gcc: No such file or directory
error: command '/scratchbox/compilers/host-gcc/bin/gcc' failed with exit status 1
--
Nov 17 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.