finding the library in which symbol is defined.
Jeffrey Holle
jeff.holle@verizon.net
Fri Jan 30 04:18:00 GMT 2004
Where are the "Py*" symbols defined on my system?
Good question, and for me a perplexing one.
I build python 2.3.3, so I have its source directory tree. No *.so
files are created in the process of building and installing it. I
searched through the entire directory tree for these symbols and the
only place I find them is either in various *.o files and python, the
actual executable.
The only idea I've come up with considering this fact is making a
libpython.so link to python and see what happens. Expect the linker to
crash. So I have not tried...
The most recent libpython*.so file I've got on my system is
libpython2.2.so. I've tried this and it resolves most, not all,
problems but I do not mix versions unless explitely instructed to.
This particular issue is something that I expect I need to get from
either python or boost.python fokes. So far no joy.
The only question I have of you is:
Is it normal that my simple cpptest exe has an appetite for the "Py*"
symbols, even though they are required by a used shared library and a
shared library which it uses?
I'd like to dramatically simply what I'm creating. Now it has an
abstract interface for some 40 classes, plus a pesty class factory
paridiagn because this was necessary for windows. As of boost::python
v2, python doesn't require it. The jury on gcc is still out.
The requested output of objdump is attached.
Ian Lance Taylor wrote:
> Jeffrey Holle <jeff.holle@verizon.net> writes:
>
>
>>Examples of the specific linker errors that are troubling me:
>>
>>/usr/local/lib/libboost_python.so.1.31.0: undefined reference to
>>`PySequence_DelSlice'
>>/usr/local/lib/libboost_python.so.1.31.0: undefined reference to
>>`PyNumber_InPlaceXor'
>>../cppTest/libUMLModel.so: undefined reference to `PyInt_FromLong'
>
>
> Where are those symbols defined on your system?
>
> If they are defined in, e.g, /usr/lib/libpython.so.*, have you tried
> adding -lpython to your link command?
>
> What is the output of
> objdump -p /usr/local/lib/libboost_python.so.1.31.0
> ?
>
> Ian
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: result
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20040130/e422ddfc/attachment.ksh>
More information about the Gcc-help
mailing list