
Hello Everyone,
If the lxml C extension links to libxml2 and libxslt; and zlib is used by libxml2 directly, then why does the extension itself need to link to libz ?
I was trying to compile the lxml on a CentOS 6 machine with my own builds of libxslt and libxml2, with libxml2 already having zlib.so in it's DT_NEEDED section. When I build lxml, the C extension generated also ended up having zlib.so in it's DT_NEEDED section. The lines related to this seem to be: https://github.com/lxml/lxml/blob/master/setupinfo.py#L271-L272
What's the reason behind doing this?
Cheers!
Nehal J Wani

Hi!
Nehal J Wani schrieb am 10.05.2018 um 21:20:
If the lxml C extension links to libxml2 and libxslt; and zlib is used by libxml2 directly, then why does the extension itself need to link to libz ?
It probably doesn't for the dynamic builds, but it does for the static builds, which is the usual way to build lxml wheels.
I'd accept a PR that removes it from the dynamic (Linux) builds.
Stefan
participants (2)
-
Nehal J Wani
-
Stefan Behnel