[wxPython] wxPython 2.2.x on Solaris

Hello,

As I noted on comp.lang.python, I have been having some difficulties building
wxPython 2.2.x on Solaris 2.6 with Python 1.5.2, wxGTK 2.2.2, and glib/gtk+
1.2.8, using gcc 2.95.1 and binutils 2.10. I have tried the following
combinations of flags and incantations:

  * Use -fPIC throughout, even specifying it in Python's Makefile's OPT
    variable, and making sure that the installed config/Makefile has it.

  * Use -Xlinker --enable-dynamic in Python's Modules/Makefile's
    LINKFORSHARED variable, and accepting the defaults for wxGTK (I think
    it uses -fPIC) and wxPython.

Using either approach, the demo will start and show the initial window, but then
a segmentation fault occurs. When tracing with gdb, various wxWindows methods
are shown to be the location of the crash, sometimes in wxString::IsEmpty,
supposedly.

Without either of the above approaches, any attempt to load the wxPython.wxc
library will fail, listing various Python symbols as being missing; the second
approach above is given in the Python FAQ as the remedy for this problem on
Solaris 2.7.

Laurent Pasquer was kind enough to give some advice after my comp.lang.python
posting, recommending a clean rebuild of Python with the configure option
--with-thread and with -D_REENTRANT added to Python's Makefile's OPT variable
(which I never seemed to need before). He then recommended a rebuild of wxGTK
with the configure options --with-gtk --enable-static --enable-permissive (I
didn't use --enable-static before). Finally, he gave more or less standard
instructions for building wxPython 2.2.1.

His advice is appropriate for wxPython 2.2.1 (thanks Laurent!), but building
wxPython 2.2.2 doesn't get us to the same point. With wxPython 2.2.1, the demo
runs satisfactorily - there is some strange background colouring repainting
issues in the main pane of the demo window, but that could be me running the
programs remotely.

So, what could be the crucial difference?

Regards,

Paul

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

As I noted on comp.lang.python, I have been having some difficulties

building

wxPython 2.2.x on Solaris 2.6 with Python 1.5.2, wxGTK 2.2.2, and

glib/gtk+

1.2.8, using gcc 2.95.1 and binutils 2.10. I have tried the following
combinations of flags and incantations:

There are a couple notes in BUILD.unix.txt on what I had to do to get
wxPython built and functioning on Solaris. Some more details:

* Solaris 2.7
* gcc 2.95.2
* Python 1.5.2 and 2.0 configured with just --with-thread and built
normally except for using the LINKCC=g++ as described in BUILD.unix.txt
* gtk+ 1.2.6, configured and built with defaults
* wxGTK 2.2.2 (from CVS) configured and built as described in BUILD.unix.txt
* wxPython 2.2.2 (from CVS) built as described in BUILD.unix.txt, including
tweaking the LDSHARED variable in Python's Makefile for Python 1.5.2.

I'm at least able to run everything, although sometimes there is a core dump
on exit when trying to call destructors. (I thought I had this fixed as
mentioned in BUILD.unix.txt, but it has come back again...)

  * Use -fPIC throughout, even specifying it in Python's Makefile's OPT
    variable, and making sure that the installed config/Makefile has it.

  * Use -Xlinker --enable-dynamic in Python's Modules/Makefile's
    LINKFORSHARED variable, and accepting the defaults for wxGTK (I think
    it uses -fPIC) and wxPython.

Using either approach, the demo will start and show the initial window,

but then

a segmentation fault occurs. When tracing with gdb, various wxWindows

methods

are shown to be the location of the crash, sometimes in wxString::IsEmpty,
supposedly.

Sounds like maybe static data isn't getting initialized or constructors for
global objects (there are a few in wxGTK) aren't getting called. I'm not
sure what might be the cause, nor what to do to fix...

So, what could be the crucial difference?

The switch to distutils from my clumsy homegrown build system. The net
result of the two is almost the same, but I'm sure there are little
differences in flags and such here and there.

If your Python build works with wxPython 2.2.1 but not 2.2.2 then it's
definitly a problem in how 2.2.2 was built. I would try building 2.2.1
again and take note of the command and flags that are used to compile the
.cpp files, as well as for linking the .so's. Then compare that with the
2.2.2 build and see what's different. Note that for 2.2.1 you'll see
`wx-config --cflags` and such on the command-lines, whereas with 2.2.2 the
expansion has already been done during the distutils setup so you'll see
some differences that aren't really different. The next step would be to
try and force 2.2.2 and distutils to use the same flags as 2.2.1. I can
probably help with that if you need it.

Good luck.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxPython.org Java give you jitters?
http://wxPROs.com Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users