[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

how to correctly link a python extension ?



[please CC me as I'm not subscribed]

  Hi,

  One of my package is building a python extension (with swig). I would
like to know what is the right way to find the correct linkage for a
python version. My package is using "python-configX.Y --libs", so
-lpythonX.Y is added. But "-lpthread -ldl -lutil -lm" are also added and
unnecessary according to dpkg-shlibdeps:
dpkg-shlibdeps: avertissement:
debian/python-ow/usr/lib/python2.7/dist-packages/ow/_OW.so ne devrait
pas être lié avec libpthread.so.0 (il n'utilise aucun de ses symboles).
[...and so on for the other libs]

  So it seems that only -lpythonX.Y is required. Is it a bug in
pythonX.Y-config ? Is "pythonX.Y-config --libs" another thing (libs
linked by the python interpreter itself) ? ...
  For now, I continue to link to all the libs told by "pythonX.Y-config
--libs" but if you know better, please tell me.

  Regards,
    Vincent

-- 
Vincent Danjean       GPG key ID 0x9D025E87         vdanjean@debian.org
GPG key fingerprint: FC95 08A6 854D DB48 4B9A  8A94 0BF7 7867 9D02 5E87
Unofficial pkgs: http://moais.imag.fr/membres/vincent.danjean/deb.html
APT repo:  deb http://people.debian.org/~vdanjean/debian unstable main


Reply to: