Re: C++ extension module crashes on Solaris
The following message is a courtesy copy of an article that has been posted to comp.lang.python as well. Guido van Rossum <guido@python.org> writes:
It seems your shared library module doesn't see the symbols defined by the Python main app. Normally, these are being exported by default. I wonder if the trick of using g++ for the linker breaks this?
Yes, that turned out the to be the problem. I will take some time on Monday to prepare a more complete summary of what I learned (based upon _lots_ of helpful contributions), but to summarize: * Python must be linked with the option '-Wl,-E' passed to the linker. (That is, on Solaris, using g++, with the GNU binutils package.) Other advice involving compiling the extension with '-fPIC' also seemed relevant, but turned out to not make any difference. Now I'm not sure why '-fPIC' _isn't_ required! -- Steven E. Harris Primus Knowledge Solutions, Inc. http://www.primus.com
participants (1)
-
sharris@nospam.primus.com