1 (edited by lyrd 2012-02-24 00:23:35)

Topic: [SOLVED] Fail to compile mfcuk

I am trying to get mfcuk to work and I go through the steps here:

http://www.nicolascourtois.com/MifareClassicHack.pdf


I have checked that my devices shows up in nfc-list (libnfc 1.5.1).
I run in a ubnuntu 11.10 in a virtualbox.

however when i do the very final step for mfcuk and run make I get this




lyrd@lyrd-VirtualBox:~/mfcuk/trunk$ make
make  all-recursive
make[1]: Entering directory `/home/lyrd/mfcuk/trunk'
Making all in src
make[2]: Entering directory `/home/lyrd/mfcuk/trunk/src'
  CC     crapto1.o
  CC     crypto1.o
  CC     mifare.o
In file included from mifare.c:31:0:
mifare.h:57:3: error: unknown type name ‘byte_t’
mifare.h:58:3: error: unknown type name ‘byte_t’
mifare.h:62:3: error: unknown type name ‘byte_t’
mifare.h:66:3: error: unknown type name ‘byte_t’
mifare.h:78:35: error: unknown type name ‘nfc_device_t’
mifare.h:85:3: error: unknown type name ‘byte_t’
mifare.h:86:3: error: unknown type name ‘byte_t’
mifare.h:87:3: error: unknown type name ‘byte_t’
mifare.h:88:3: error: unknown type name ‘byte_t’
mifare.h:89:3: error: unknown type name ‘byte_t’
mifare.h:93:3: error: unknown type name ‘byte_t’
mifare.h:97:3: error: unknown type name ‘byte_t’
mifare.h:98:3: error: unknown type name ‘byte_t’
mifare.h:99:3: error: unknown type name ‘byte_t’
mifare.h:114:3: error: unknown type name ‘byte_t’
mifare.h:115:3: error: unknown type name ‘byte_t’
mifare.h:116:3: error: unknown type name ‘byte_t’
mifare.h:117:3: error: unknown type name ‘byte_t’
mifare.h:118:3: error: unknown type name ‘byte_t’
mifare.h:119:3: error: unknown type name ‘byte_t’
mifare.h:120:3: error: unknown type name ‘byte_t’
mifare.h:124:3: error: unknown type name ‘byte_t’
mifare.c:51:27: error: unknown type name ‘nfc_device_t’
make[2]: *** [mifare.o] Error 1
make[2]: Leaving directory `/home/lyrd/mfcuk/trunk/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/lyrd/mfcuk/trunk'
make: *** [all] Error 2

Edit: Used the wrong URL

Re: [SOLVED] Fail to compile mfcuk

I have been playing with this for a day now and still no go.

If I myself include the definitions for byte_t and nfc_device_t i now get this error instead


make  all-recursive
make[1]: Entering directory `/home/lyrd/newTry/mfcuk-read-only'
Making all in src
make[2]: Entering directory `/home/lyrd/newTry/mfcuk-read-only/src'
  CC     mifare.o
In file included from mifare.c:31:0:
mifare.h:56:18: error: ‘DEVICE_NAME_LENGTH’ undeclared here (not in a function)
mifare.c: In function ‘nfc_initiator_mifare_cmd’:
mifare.c:98:3: warning: implicit declaration of function ‘nfc_configure’ [-Wimplicit-function-declaration]
mifare.c:98:28: error: ‘NDO_EASY_FRAMING’ undeclared (first use in this function)
mifare.c:98:28: note: each undeclared identifier is reported only once for each function it appears in
mifare.c:99:5: warning: passing argument 1 of ‘nfc_perror’ from incompatible pointer type [enabled by default]
/usr/local/include/nfc/nfc.h:102:19: note: expected ‘const struct nfc_device *’ but argument is of type ‘struct nfc_device_t *’
mifare.c:103:3: warning: passing argument 1 of ‘nfc_initiator_transceive_bytes’ from incompatible pointer type [enabled by default]
/usr/local/include/nfc/nfc.h:87:18: note: expected ‘struct nfc_device *’ but argument is of type ‘struct nfc_device_t *’
mifare.c:103:3: warning: passing argument 6 of ‘nfc_initiator_transceive_bytes’ makes integer from pointer without a cast [enabled by default]
/usr/local/include/nfc/nfc.h:87:18: note: expected ‘int’ but argument is of type ‘void *’
mifare.c:104:28: error: ‘EINVRXFRAM’ undeclared (first use in this function)
mifare.c:110:7: warning: passing argument 1 of ‘nfc_perror’ from incompatible pointer type [enabled by default]
/usr/local/include/nfc/nfc.h:102:19: note: expected ‘const struct nfc_device *’ but argument is of type ‘struct nfc_device_t *’
mifare.c:116:5: warning: passing argument 1 of ‘nfc_perror’ from incompatible pointer type [enabled by default]
/usr/local/include/nfc/nfc.h:102:19: note: expected ‘const struct nfc_device *’ but argument is of type ‘struct nfc_device_t *’
make[2]: *** [mifare.o] Error 1
make[2]: Leaving directory `/home/lyrd/newTry/mfcuk-read-only/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/lyrd/newTry/mfcuk-read-only'
make: *** [all] Error 2

Re: [SOLVED] Fail to compile mfcuk

Please use the right libnfc version with the right mfcuk version...

Romuald Conty

Re: [SOLVED] Fail to compile mfcuk

I see, that would explain so much.

Is there an mfcuk version for libnfc 1.5.1 and if so where can i get it.

if not, which libnfc version should i get for the current mfcuk version?

Thanks for your reply!

Re: [SOLVED] Fail to compile mfcuk

Hi guys,

I met the same problem today (undeclared "byte_t"). I've just checked out mfcuk and also installed the newest libnfc (1.6.0), when I've been faced with the same problem. After this error occurred I noticed, that "byte_t" is missing from libnfc 1.6.0, but is declared in libnfc 1.4.2 therefore I copied the whole "nfc" directory into mfcuk's "src". After this I stuck at the same point that lyrd described... :-(

So, could you publish here (or somewhere on the official site) a version-matrix for libnfc-mfcuk?

Thanks in advance!

Aron

Re: [SOLVED] Fail to compile mfcuk

I build today trunk version of mfcuk with libnfc-1.5.1, it seems to be ok (but I don't have classic card to check)

Re: [SOLVED] Fail to compile mfcuk

Thx! The libnfc-1.5.1 also worked for me, mfcuk operates now...