Solaris Indiana Fails python side

johnthawk@excite.com wrote:

I seem to be unable to complete wxPython build on the python side on Solaris x86 Indiana python-2.4 I get the below error:

Any greatly appreciated

jhawk@opensolaris wxPython>python setup.py build_ext --inplace --debug
WARNING: WXWIN not set in environment. Assuming '..'
Found wx-config: /opt/wx/2.8/bin/wx-config
    Using flags: --toolkit=gtk2 --unicode=yes --version=2.8
Preparing CORE...
Preparing GLCANVAS...
Preparing STC...
Preparing GIZMOS...
running build_ext
building '_core_' extension
/usr/lib/python2.4/pycc -DNDEBUG -g -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXGTK__ -D_REENTRANT -Iinclude -Isrc -I/opt/wx/2.8/lib/wx/include/gtk2-unicode-debug-2.8 -I/opt/wx/2.8/include/wx-2.8 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/X11/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/include/libpng12 -I/usr/include/python2.4 -c src/helpers.cpp -o build-gtk2.unicode/temp.solaris-2.11-i86pc-2.4/src/helpers.o -pthreads -g -O0
cc: No input file specified, no output generated
error: command '/usr/lib/python2.4/pycc' failed with exit status 1

Is /usr/lib/python2.4/pycc a wrapper around Sun's cc or GNU's gcc? If the former then the problem is probably the fact that you are trying to compile a C++ file with a C compiler, and Sun's cc front end isn't smart enough to launch the C++ compiler for you. By default Python's distutils will just use whatever compiler Python itself was compiled with when building extension modules. You can get it to switch what command it uses for compiles by setting the CC environment variable. The wx-config has an option where it will spit out the C++ compiler used when building wxWidgets, so you can do something like this:

CC=`wx-config --cxx` python setup.py build_ext --inplace --debug

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!