<div dir="ltr">Hi Maciej, <div><br></div><div>I had a look at the problem.</div><div><br></div><div>The thing is that the socket binary module, _socket.so, is only linked against libpython alhtought it needs symbols from libsocket.so.</div>
<div>So importing this module will only work if the importer already loaded these libraries.</div><div><br></div><div>It worked before because libpython.so.2.6 was linked against libsocket.so even if it doesn't use any of its symbols. </div>
<div>But the "-z ignore" removed the useless dependencies from libpython and libsocket was one of them.</div><div><br></div><div>I am not sure yet what is the proper way to fix this:</div><div>
<br></div><div> 1. we can fix the build system to ensure _socket.so is linked against libsocket.so.</div><div> Some other modules do it, for instance nis.so is linked against libnsl.so.1 even if libpython.so.2.6 can provide it.</div>
<div><br></div><div> 2. force libpython to be linked against some libraries even if it doesn't use them.</div><div> It's possible to do this specifically for libpython, but we need precise control on the build command line which is not always easy.</div>
<div><br></div><div><br></div><div>I would think that 1. is the good way to do it, but I don't know what are the best practices for module.</div><div><br></div><div><br></div><div>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.<br>
</div><div><br></div><div>So I think we should rather:</div><div><br></div><div> - 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.</div>
<div><br></div><div> - report the problem upstream so that is fixed properly there.</div><div><br></div><div>What do you think ?</div><div><br></div><div style><br></div><div style>Anyway I will document this case on the wiki.</div>
<div style><br></div><div><br></div><div>BTW, I discovered that Debian also wants to enable the same kind of option for wheezy: <a href="http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries" target="_blank">http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries</a></div>
<div><br></div><div>So they might have already created some patches or reported the problem upstream. </div><div><br></div><div><br></div><div>Yann <br></div><div><br></div><div><br>
</div><div><br></div><div><br></div><div><br></div><div> </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>
<div><br></div><div>
<br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/1/10 Yann Rouillard <span dir="ltr"><<a href="mailto:yann@pleiades.fr.eu.org" target="_blank">yann@pleiades.fr.eu.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Maciej,<div><br></div><div>Does this _socket module import problem happens everytime or just for this program ?</div>
<div><br></div><div>FYI, the direct binding error are a side effect of the "unused soname" error. </div>
<div>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.</div><div>I will fix that case. No need to have two checkpkg errors for one real error.</div>
<div><br></div><div>For the real problem, I will try to reproduce it to understand what is wrong.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Yann</div><div><br></div><div><br></div><div><br></div>
<div>
<br></div><div><br></div><div><br></div></font></span></div>
</blockquote></div><br></div>