marcus905 / libnfc

Automatically exported from code.google.com/p/libnfc
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Error compiling other libnfc-1.4.1 dependant software #182

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Hi, while compiling other opensource software like nfcutils, mfoc or mfcuk on 
their latest stable releases, I always get the same error of compilation. I 
have Ubuntu 11.10  and created-installed the .deb packages from libnfc 1.4.1 by 
using 
 dpkg-buildpackage -b -us -uc

I got the same result while trying some libnfc >= 1.4.1

Thanks in advance for some suggestion of how to solve this, I bet is something 
stupid I'm missing , I apologize for the inconvenience.

ubuntu@ubuntu:~/nfcutils-0.3.0$ make
make  all-recursive
make[1]: Entering directory `/home/ubuntu/nfcutils-0.3.0'
Making all in src
make[2]: Entering directory `/home/ubuntu/nfcutils-0.3.0/src'
  CC     lsnfc.o
  CCLD   lsnfc
lsnfc.o: In function `mifare_ultralight_identification':
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:82: undefined reference to 
`nfc_initiator_select_passive_target'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:83: undefined reference to 
`nfc_configure'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:84: undefined reference to 
`nfc_initiator_transceive_bytes'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:86: undefined reference to 
`nfc_configure'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:87: undefined reference to 
`nfc_initiator_deselect_target'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:91: undefined reference to 
`nfc_configure'
lsnfc.o: In function `mifare_desfire_identification':
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:120: undefined reference to 
`nfc_initiator_select_passive_target'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:121: undefined reference to 
`nfc_initiator_transceive_bytes'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:140: undefined reference to 
`nfc_initiator_deselect_target'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:126: undefined reference to 
`nfc_initiator_transceive_bytes'
lsnfc.o: In function `main':
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:252: undefined reference to 
`nfc_list_devices'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:259: undefined reference to 
`nfc_connect'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:269: undefined reference to 
`nfc_initiator_init'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:272: undefined reference to 
`nfc_configure'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:275: undefined reference to 
`nfc_configure'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:278: undefined reference to 
`nfc_configure'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:286: undefined reference to 
`nfc_initiator_list_passive_targets'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:295: undefined reference to 
`nfc_initiator_list_passive_targets'
/home/ubuntu/nfcutils-0.3.0/src/lsnfc.c:316: undefined reference to 
`nfc_configure'

Thanks.

Original issue reported on code.google.com by capiscuas@gmail.com on 27 Dec 2011 at 7:00

GoogleCodeExporter commented 9 years ago
libnfc 1.4.1 is totally obsolete.
Please use libnfc 1.5.1 at least, plus nfcutils-0.3.0 for example is only 
designed to work with 1.5.x version.

BTW, you have a linkage problem, that seems to be related to the installation 
you made.

Which packages did you installed after generating them ? all ?

What is the output of ./configure when building nfcutils, for example ?

Original comment by romu...@libnfc.org on 27 Dec 2011 at 12:34

GoogleCodeExporter commented 9 years ago
I did downloaded 1.5.1 and execute 'sudo make install', which worked ok, and I 
downloaded the latest trunk of mfcuk:

svn checkout http://mfcuk.googlecode.com/svn/trunk/ mfcuk-read-only

when I tried to make:

  CCLD   mfcuk
mfcuk.o: In function `mfcuk_darkside_select_tag':
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:901: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:908: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:914: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:921: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:931: undefined reference to 
`nfc_initiator_select_passive_target'
mfcuk.o: In function `mfcuk_verify_key_block':
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:283: undefined reference to 
`iso14443a_crc_append'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:286: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:292: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:295: undefined reference to 
`nfc_initiator_transceive_bytes'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:299: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:350: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:355: undefined reference to 
`nfc_initiator_transceive_bits'
mfcuk.o: In function `mfcuk_key_recovery_block':
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:437: undefined reference to 
`iso14443a_crc_append'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:440: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:443: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:447: undefined reference to 
`nfc_initiator_transceive_bytes'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:452: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:634: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:640: undefined reference to 
`nfc_initiator_transceive_bits'
mfcuk.o: In function `mfcuk_darkside_reset_advanced':
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:865: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:871: undefined reference to `nfc_configure'
mfcuk.o: In function `mfcuk_darkside_select_tag':
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:891: undefined reference to `nfc_configure'
mfcuk.o: In function `main':
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:1591: undefined reference to `nfc_connect'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:1599: undefined reference to 
`nfc_initiator_init'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:1734: undefined reference to 
`nfc_initiator_select_passive_target'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:1792: undefined reference to 
`nfc_disconnect'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:1795: undefined reference to `nfc_connect'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:1803: undefined reference to 
`nfc_initiator_init'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:1612: undefined reference to 
`nfc_disconnect'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:1877: undefined reference to 
`nfc_disconnect'
/home/ubuntu/mfcuk-trunk/src/mfcuk.c:1437: undefined reference to 
`iso14443a_crc_append'
mifare.o: In function `nfc_initiator_mifare_cmd':
/home/ubuntu/mfcuk-trunk/src/mifare.c:98: undefined reference to `nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mifare.c:103: undefined reference to 
`nfc_initiator_transceive_bytes'
/home/ubuntu/mfcuk-trunk/src/mifare.c:110: undefined reference to `nfc_perror'
/home/ubuntu/mfcuk-trunk/src/mifare.c:112: undefined reference to 
`nfc_configure'
/home/ubuntu/mfcuk-trunk/src/mifare.c:116: undefined reference to `nfc_perror'
/home/ubuntu/mfcuk-trunk/src/mifare.c:115: undefined reference to `nfc_configure

Original comment by capiscuas@gmail.com on 27 Dec 2011 at 2:33

GoogleCodeExporter commented 9 years ago
Your problem comes from link.

Please read this post, I pretty sure you have the same problem:
http://www.libnfc.org/community/topic/502/solved-help-with-nfclist-error-librari
es-libnfcso1/

Original comment by romu...@libnfc.org on 27 Dec 2011 at 6:21

GoogleCodeExporter commented 9 years ago
Thanks for your help.

I did realized that I had that created automatically:

ubuntu@ubuntu:~/mfcuk$ cat /etc/ld.so.conf.d/libc.conf 
# libc default configuration
/usr/local/lib

and
ubuntu@ubuntu:~/mfcuk$ ll /usr/local/lib/
total 456
drwxr-xr-x 1 root root    4096 2011-12-27 19:43 ./
drwxr-xr-x 1 root root    4096 2011-10-12 14:27 ../
-rw-r--r-- 1 root root  246652 2011-12-27 19:43 libnfc.a
-rwxr-xr-x 1 root root     988 2011-12-27 19:43 libnfc.la*
lrwxrwxrwx 1 root root      15 2011-12-27 19:43 libnfc.so -> libnfc.so.2.0.0*
lrwxrwxrwx 1 root root      15 2011-12-27 19:43 libnfc.so.2 -> libnfc.so.2.0.0*
-rwxr-xr-x 1 root root  184711 2011-12-27 19:43 libnfc.so.2.0.0*
drwxr-xr-x 2 root root    4096 2011-12-27 19:43 pkgconfig/
drwxrwsr-x 1 root staff   4096 2011-10-12 14:27 python2.7/

but mfcuk is still giving me the same error while 'make', I also tried 
'ldconfig' and I installed the .deb PPA from
https://launchpad.net/~jdthood/+archive/nfc

but there is no .deb for mfcuk

Thanks in advance again.

Original comment by capiscuas@gmail.com on 27 Dec 2011 at 7:50

GoogleCodeExporter commented 9 years ago
I did this:

in the main directory and in "src" directory:

in files "Makefile"

# Edit this line: 

LIBS =

to

LIBS =  $(LIBNFC_LIBS)

I hope this helps you

Original comment by ccamil...@gmail.com on 3 Jan 2012 at 3:50

GoogleCodeExporter commented 9 years ago
Your adviced made it work. I only had to modify the Makefile in the src folder 
though, the other one was already ok after ./configure

Thanks a lot.

Original comment by capiscuas@gmail.com on 4 Jan 2012 at 7:40

GoogleCodeExporter commented 9 years ago

Original comment by romu...@libnfc.org on 16 Jan 2012 at 2:05