[C++-sig] help finding solution to lack of exception handling with boost python on open solaris 64 bit
Jim Bosch
talljimbo at gmail.com
Fri Dec 3 02:13:10 CET 2010
On 12/02/2010 02:23 PM, Dane Springmeyer wrote:
> Hello,
>
> I recently recompiled my C++ app (mapnik.org, which uses boost python for python binding) with -m64 flags for 64 bit operation and this broke the boost python exception handling.
>
> Instead of C++ exceptions being propagated to python exceptions, I get segmentation faults (core dump).
>
> I have a long dependency chain that all needs to be 64 bit, so I'm really stuck unless I can find a way to restore boost python's ability to handle exceptions without crashing.
>
> Exceptions are very common during setup of mapnik, and are needed to report basic configuration issues as a user gets set up.
>
> I'm desperate to try anything that might help - anyone have any suggestions?
>
> What i have tried so far:
>
> 1) recompiling all apps with -02 instead of -03
> 2) making sure all apps are compiled with the exact same version of gcc (at least all the C++ libraries I have compiled from source)
> 3) ensured that all dynamic libraries link to the same libgcc_s.so.1 and libstdc++.so.6.
> 4) tried with both boost 1.44 and 1.45
>
> I'm out of ideas - anyone have suggestions to try?
>
I'm not running Solaris, so I can't help too much specifically, but it
sounds like you might learn a lot from trying exceptions in a non-Boost
Python module compiled in C++. Perhaps just take the first example here:
http://docs.python.org/extending/
and add a function that throws and catches an exception.
If that succeeds, try throwing and catching in a shared library that's
linked to your Python module, and then try throwing and catching across
the library boundary.
You might also want to check the compile flags for Python itself, just
in case there's something obviously different there between 64-bit and
32-bit on Solaris.
Good luck!
Jim Bosch
More information about the Cplusplus-sig
mailing list