[csw-maintainers] Direct binding now active
Yann Rouillard
yann at pleiades.fr.eu.org
Fri Jan 11 18:06:29 CET 2013
Hi Maciej,
I had a look at the problem.
The thing is that the socket binary module, _socket.so, is only linked
against libpython alhtought it needs symbols from libsocket.so.
So importing this module will only work if the importer already loaded
these libraries.
It worked before because libpython.so.2.6 was linked against libsocket.so
even if it doesn't use any of its symbols.
But the "-z ignore" removed the useless dependencies from libpython and
libsocket was one of them.
I am not sure yet what is the proper way to fix this:
1. we can fix the build system to ensure _socket.so is linked against
libsocket.so.
Some other modules do it, for instance nis.so is linked against
libnsl.so.1 even if libpython.so.2.6 can provide it.
2. force libpython to be linked against some libraries even if it doesn't
use them.
It's possible to do this specifically for libpython, but we need
precise control on the build command line which is not always easy.
I would think that 1. is the good way to do it, but I don't know what are
the best practices for module.
That being said, even if we do 1. or 2., we could also run into problems
with external modules if they rely on the libpython.so.2.6 having loaded
some libraries.
So I think we should rather:
- disable "-z ignore" for python (which you did) to be sure not to
create side effects, moreover they weren't any surplus dependencies caused
by useless sonames in this case.
- report the problem upstream so that is fixed properly there.
What do you think ?
Anyway I will document this case on the wiki.
BTW, I discovered that Debian also wants to enable the same kind of option
for wheezy:
http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries
So they might have already created some patches or reported the problem
upstream.
Yann
2013/1/10 Yann Rouillard <yann at pleiades.fr.eu.org>
> Hi Maciej,
>
> Does this _socket module import problem happens everytime or just for this
> program ?
>
> FYI, the direct binding error are a side effect of the "unused soname"
> error.
> The "direct binding" test doesn't find any symbol with a direct binding,
> which is normal as the binary doesn't use any of the symbol of the library.
> I will fix that case. No need to have two checkpkg errors for one real
> error.
>
> For the real problem, I will try to reproduce it to understand what is
> wrong.
>
> Yann
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencsw.org/pipermail/maintainers/attachments/20130111/83077a8f/attachment-0001.html>
More information about the maintainers
mailing list