[C++-sig] Boost.Python exception problems on AIX 5.3 (compiled with gcc 3.4.3, 64 bit)
J. Michael Owen
mikeowen at llnl.gov
Thu Dec 21 22:49:00 CET 2006
Hi Ralf,
Yeah, I use that dlopen hack myself on all the platforms where I'm
using gcc. I've already tried this to handle this exception problem --
at least I think I've done it correctly. On AIX you can find the
definitions for these things in /usr/include/dlfcn.h, where I see
#define RTLD_NOW 0x00000002 /* Load object and
dependents now. */
#define RTLD_GLOBAL 0x00010000 /* Make symbols in this
module
visible to other dlopens.
*/
So I've tried setting the following before importing my own test
modules:
import sys
sys.setdlopenflags(0x00000002|0x00010000)
Unfortunately this has no effect on the problem. Am I missing
something in how I'm setting this?
Mike.
> Under Linux I'm importing all extension modules with RTLD_GLOBAL. This
> is a very old workaround for exception handling problems similar to
> what you describe, but I'm not sure about the details anymore (e.g.
> which gcc was the trouble maker).
>
> This is roughly how I import our extensions:
>
> previous_dlopenflags = sys.getdlopenflags()
> sys.setdlopenflags(0x100|0x2)
> import myext
> sys.setdlopenflags(previous_dlopenflags)
>
> The bit masks are platform specific, RTLD_GLOBAL | RTLD_NOW. If any of
> this applies to AIX (?) you have to find out somehow what the correct
> bit masks are.
>
> HTH,
> Ralf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1538 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20061221/06e87b99/attachment.bin>
More information about the Cplusplus-sig
mailing list