wxPython build on AMD-64 RH

Hi,

I am attempting to build and install wxPython to my local area for
testing.
I am running Python 2.4.3.
I am not a linux software programmer - I'm a chip designer, so my
knowledge of gcc is close to zero.

I am at the following step in the build instructions on the wxWidgets
website, and am getting the error message that follows.

<<<--------------- snippet from build/install instructions ------>>>>
3. I also have a script to help me build wxPython and it is checked in
to the source repository as wxPython/b, but you probably don't want to
use it as it's very cryptic and expects that you want to run SWIG, so
if you don't have the latest patched up version of SWIG then you'll
probably get stuck. So in this document I'll just give the raw
commands instead.

We're not going to install the development version of wxPython with
these commands, so it won't impact your already installed version of
the latest release. You'll be able test with this version when you
want to, and use the installed release version the rest of the time.
If you want to install the development version please read
INSTALL.txt.

If you have more than one version of Python on your system then be
sure to use the version of Python that you want to use when running
wxPython programs to run the setup.py commands below. I'll be using
python2.5.

Make sure that the first wx-config found on the PATH is the one
belonging to the wxWidgets that you installed above, and then change
to the $WXDIR/wxPython dir and run the this command:

cd $WXDIR/wxPython
python2.5 setup.py build_ext --inplace --debug

<<<------------ result of executing the above command ------>>>>

WARNING: WXWIN not set in environment. Assuming '..'
Found wx-config: /usr/qlc/proj/quantum1/ejessen.wkerik_test/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
creating build-gtk2.unicode
creating build-gtk2.unicode/temp.linux-x86_64-2.4
creating build-gtk2.unicode/temp.linux-x86_64-2.4/src
creating build-gtk2.unicode/temp.linux-x86_64-2.4/src/gtk
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-
D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-
size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -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__ -Iinclude -Isrc -I/usr/qlc/proj/quantum1/
ejessen.wkerik_test/opt/wx/2.8/lib/wx/include/gtk2-unicode-debug-2.8 -
I/usr/qlc/proj/quantum1/ejessen.wkerik_test/opt/wx/2.8/include/wx-2.8 -
I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/
atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/
glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/
include/libpng12 -I/usr/include/python2.4 -c src/helpers.cpp -o build-
gtk2.unicode/temp.linux-x86_64-2.4/src/helpers.o -pthread -g -O0
cc1plus: error: unrecognized command line option "-fstack-protector"
cc1plus: error: invalid parameter `ssp-buffer-size'
src/helpers.cpp:1: error: bad value (generic) for -mtune= switch
error: command 'gcc' failed with exit status 1

The parameters it is complaining about came from Python's build config. If Python was built with those flags and they don't work on new extension module builds then there may be an issue with the Python binaries... perhaps they were built with a different compiler? You may want to look into how it was built and/or build a new Python for your system.

BTW, there may be some things in wxPython that won't work on Python 2.4 as I'm currently only supporting current versions back to Python 2.5.

···

On 12/23/10 10:19 AM, Erik wrote:

Hi,

I am attempting to build and install wxPython to my local area for
testing.
I am running Python 2.4.3.
I am not a linux software programmer - I'm a chip designer, so my
knowledge of gcc is close to zero.

I am at the following step in the build instructions on the wxWidgets
website, and am getting the error message that follows.

cd $WXDIR/wxPython
python2.5 setup.py build_ext --inplace --debug

cc1plus: error: unrecognized command line option "-fstack-protector"
cc1plus: error: invalid parameter `ssp-buffer-size'
src/helpers.cpp:1: error: bad value (generic) for -mtune= switch
error: command 'gcc' failed with exit status 1

--
Robin Dunn
Software Craftsman