Issue 840065: Incorrect shared library build (original) (raw)

Created on 2003-11-11 16:29 by jrevans, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg60420 - (view) Author: James Evans (jrevans) Date: 2003-11-11 16:29
The shared library is built and linked incorrectly resulting in errors. The proper method for linking a shared library is to link it against all libraries it is dependant upon. This puts entries into a shared library's dependency table (which can be seen using 'ldd' on linux or 'objdump' on other systems). The result of this is that any application that is linked againg a particular library does not need to be aware of any of its dependencies at link time, it merely links against what it is directly dependant upon. This can be thought of as building a dependancy tree. Getting a full list of all libraries an executable (or shared library) are dependant upon is as simple as using 'ldd' as this will list the full dependancy tree. The problem with the python shared library is that it is not linked during your build process against any of the libraries it is dependant upon. For example when building with the tk, readline, and expat modules compiled into python, the library needs to be linked against the respective libraries. In this way the shared library resolves all of its own dependancies. This is something that I have been doing for several years, including always having rebuilding the python library as a shread library by hand. For example: > ar -x libpythonX.X.a > g++ -shared *.o -o libpythonX.X.so -L/path/to/libs - lexpat -lreadline -ltk however since you have introduced the configure flag for shared library support (finally) it would be nice to be able to use it.
msg60421 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-11-11 20:14
Logged In: YES user_id=21627 Would you be willing to contribute a patch? This feature is essentially unmaintained, and only updated when users contribute updates.
msg60422 - (view) Author: James Evans (jrevans) Date: 2003-11-11 22:38
Logged In: YES user_id=158456 Okay, I'll take a crack at it.
msg61329 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-01-20 19:01
The user hasn't provided a patch in more than 4 years. Please open a new issue if you are still interested in the feature.
History
Date User Action Args
2022-04-11 14:56:01 admin set github: 39538
2008-01-20 19:01:23 christian.heimes set status: open -> closednosy: + christian.heimesresolution: out of datemessages: +
2003-11-11 16:29:47 jrevans create