Skip to content Skip to sidebar Skip to footer

Dynamic Symbol Lookup Fails With Statically Embedded Python On Mac Os X

I'm building a Mac OS X application that is to embed Python. My application is technically a bundle (i.e. its main executable is MH_BUNDLE); it's a plug-in for another application.

Solution 1:

The “update” I made suggests it right: the main plug-in bundle is loaded locally (RTLD_LOCAL), so nobody can see any symbols there, unless using explicit dlopen followed by dlsym.

If it were Linux I could promote the bundle to the global namespace by dlopening it again with the RTLD_GLOBAL flag, but under Mac OS X this doesn't work. But Mac OS X nicely packs stuff into bundles, so I just made a dynamic library and put it into the plug-in bundle directory. The library loads automatically as RTLD_GLOBAL and all Python symbols are available.

Post a Comment for "Dynamic Symbol Lookup Fails With Statically Embedded Python On Mac Os X"