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

Avoiding useless library dependencies



Hello,

I am trying to get rid of these warnings:

dh_makeshlibs -a
dh_shlibdeps -a
dpkg-shlibdeps: warning: dependency on libdl.so.2 could be avoided if "debian/python-llfuse/usr/lib/pyshared/python2.7/llfuse.so debian/python-llfuse/usr/lib/pyshared/python2.6/llfuse.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on librt.so.1 could be avoided if "debian/python-llfuse/usr/lib/pyshared/python2.7/llfuse.so debian/python-llfuse/usr/lib/pyshared/python2.6/llfuse.so" were not uselessly linked against it (they use none of its symbols).

The -lrt and -ldl flags in the linker invocation come from `pkg-config
fuse`, so I am hesitant to manually remove them. Instead, I have added
--as-needed in front of them:

gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.7/src/llfuse.o -o build/lib.linux-x86_64-2.7/llfuse.so --as-needed -pthread -lfuse -lrt -ld

However, even with --as-needed, llfuse.so is still linked against both
libdl and librt and shlibdeps keeps complaining.

Is shlibdeps smarter than --as-needed? What's the proper way to fix this
warning?


Thanks,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C


Reply to: