Topic: dpkg-shlibdeps Problem building deb Package

Hello everyone,

maybe someone can give me a hint what I am missing but I have a problem getting libnfc build in a package. I am running a Ubuntu 10.04 system and I follow the steps described at this link: http://www.libnfc.org/documentation/installation
I would like to create a package, so here are the steps I performed:

wget hxxp://libnfc.googlecode.com/files/libnfc-1.5.1.tar.gz
tar -xvzf libnfc-1.5.1.tar.gz
cd libnfc-1.5.1/
svn checkout hxxp://libnfc.googlecode.com/svn/tags/libnfc-1.5.1/debian
dpkg-buildpackage -b -us -uc

I some point of the last step, I get the following error:

   ...
   dh_strip
   dh_makeshlibs
   dh_shlibdeps
dpkg-shlibdeps: error: no dependency information found for /usr/local/lib/libpcsclite.so.1 (used by debian/libnfc2/usr/lib/libnfc.so.2.0.0).
dh_shlibdeps: dpkg-shlibdeps -Tdebian/libnfc2.substvars debian/libnfc2/usr/lib/libnfc.so.2.0.0 returned exit code 2
make: *** [binary] Error 9
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

I tried to fix that with a file "shlibs.local" but I am not quite sure where to put it neither what the content should be. So far I tried to put it in the folder "libnfc-1.5.1/debian" as well as in "libnfc-1.5.1/"
As content I tried

libpcsclite 2 libnfc

and

libpcsclite 2 libnfc.so.2.0.0

unfortunatelly without success ... sad

When I am doing pcscd -v I get the following:

pcsc-lite version 1.8.2.
Copyright (C) 1999-2002 by David Corcoran <corcoran@linuxnet.com>.
Copyright (C) 2001-2011 by Ludovic Rousseau <ludovic.rousseau@free.fr>.
Copyright (C) 2003-2004 by Damien Sauveron <sauveron@labri.fr>.
Report bugs to <muscle@lists.musclecard.com>.
Enabled features: Linux i686-pc-linux-gnu serial usb libudev usbdropdir=/usr/local/lib/pcsc/drivers ipcdir=/var/run/pcscd configdir=/usr/local/etc/reader.conf.d

So I assume libpcsclite is installed, and libusb-config --version gives me 0.1.12, what also should be fine.

sudo apt-get install libusb-dev libpcsclite-dev
sudo apt-get install libusb-0.1-4 libpcsclite1 libccid pcscd

tells me everything is already the newest version ...

Does anyone has an idea?
cheers wink

Re: dpkg-shlibdeps Problem building deb Package

So, hello everyone
at least I was able to get the shlibs.local thing straight. Here is was I did:

cd libnfc-1.5.1/
touch ./debian/shlibs.local
echo libpcsclite 1 libnfc >> ./debian/shlibs.local
dpkg-buildpackage -b -us -uc

Now the package building finishes on a terminal promt again but I still get some wired messages:

dh_strip
   dh_makeshlibs
   dh_shlibdeps
dpkg-shlibdeps: warning: dependency on librt.so.1 could be avoided if "debian/libnfc2/usr/lib/libnfc.so.2.0.0" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libpthread.so.0 could be avoided if "debian/libnfc-bin/usr/bin/nfc-list debian/libnfc-bin/usr/bin/nfc-mfclassic debian/libnfc-bin/usr/bin/nfc-emulate-forum-tag2 debian/libnfc-bin/usr/bin/nfc-relay-picc debian/libnfc-bin/usr/bin/nfc-mfultralight debian/libnfc-bin/usr/bin/nfc-read-forum-tag3 debian/libnfc-bin/usr/bin/nfc-emulate-forum-tag4" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libpthread.so.0 could be avoided if "debian/libnfc-examples/usr/bin/nfc-relay debian/libnfc-examples/usr/bin/nfc-dep-initiator debian/libnfc-examples/usr/bin/nfc-poll debian/libnfc-examples/usr/bin/nfc-emulate-uid debian/libnfc-examples/usr/bin/nfc-emulate-tag debian/libnfc-examples/usr/bin/nfc-mfsetuid debian/libnfc-examples/usr/bin/nfc-anticol debian/libnfc-examples/usr/bin/nfc-dep-target" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libpthread.so.0 could be avoided if "debian/libnfc-pn53x-examples/usr/bin/pn53x-tamashell debian/libnfc-pn53x-examples/usr/bin/pn53x-diagnose debian/libnfc-pn53x-examples/usr/bin/pn53x-sam" were not uselessly linked against it (they use none of its symbols).
   dh_installdeb
   dh_gencontrol
   dh_md5sums
   dh_builddeb
dpkg-deb: building package `libnfc2' in `../libnfc2_1.5.1-0_i386.deb'.
dpkg-deb: building package `libnfc-dev' in `../libnfc-dev_1.5.1-0_i386.deb'.
dpkg-deb: building package `libnfc-bin' in `../libnfc-bin_1.5.1-0_i386.deb'.
dpkg-deb: building package `libnfc-examples' in `../libnfc-examples_1.5.1-0_i386.deb'.
dpkg-deb: building package `libnfc-pn53x-examples' in `../libnfc-pn53x-examples_1.5.1-0_i386.deb'.
 dpkg-genchanges -b >../libnfc_1.5.1-0_i386.changes
dpkg-genchanges: binary-only upload - not including any source code
dpkg-buildpackage: binary only upload (no source included)

Can anyone confirm this or give me a hint was is wrong ?

[Edit]
So I tried to install (sudo dpkg -i ../libnfc*.deb) these packages but due to some strange dependancies it seems not successfull.

Thats why I tried another way:

cd libnfc-1.5.1
./configure --enable-debug --enable-doc
make clean
make all

Now I can run ./utils/nfc-list and my SCL3711 reader is found and (!) the blank MiFare Card is read big_smile yeah tongue
[/Edit]

cheers wink

Last edited by norwied (2012-02-06 13:31:06)

Re: dpkg-shlibdeps Problem building deb Package

Hello,

I replay your scenario and don't have any problem to build package using 1.5.1 on my Ubuntu 11.10.

Romuald Conty