Proxmark3 community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

Announcement

Time changes and with it the technology
Proxmark3 @ discord

Users of this forum, please be aware that information stored on this site is not private.

#1 2011-03-16 04:36:57

moebius
Contributor
Registered: 2011-03-10
Posts: 206

Can't compile Mfcuk

Hello there, I checkedout Mfcuk doing:

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

then, by running autoconf since no configure file is found it said:


Moebius:mfcuk-read-only moebius$ autoconf
configure.ac:9: error: possibly undefined macro: AM_INIT_AUTOMAKE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

and then I have my configure file right there.. but no Makefile.in ...

Someone successfully compiled this on GNULinux or OSX (where i0m trying to compile this)?

Thanx in advance for any answer!

Offline

#2 2011-03-17 02:25:58

moebius
Contributor
Registered: 2011-03-10
Posts: 206

Re: Can't compile Mfcuk

Still unable to compile this with latest libnfc... and I can't compile libnfc 1.3.9 too ...

Someone did a successful compile of this?

Please help!

Offline

#3 2011-03-19 09:29:59

dxtno
Member
Registered: 2009-11-30
Posts: 6

Re: Can't compile Mfcuk

Edited

Last edited by dxtno (2011-03-19 18:41:19)

Offline

#4 2011-03-20 08:03:37

hat
Contributor
Registered: 2009-04-12
Posts: 160

Re: Can't compile Mfcuk

in a *clean* copy of mfcuk

autoreconf
automake --add-missing
./configure --with-libnfc=[path to libnfc]
make

Offline

#5 2011-03-20 22:54:21

moebius
Contributor
Registered: 2011-03-10
Posts: 206

Re: Can't compile Mfcuk

Hey! Look:

Moebius:mfcuk-read-only moebius$ ./configure --with-libnfc=../libnfc-1.3.9/

(blah blah)


Moebius:mfcuk-read-only moebius$ make
make  all-recursive
Making all in src
  CC     mfcuk_keyrecovery_darkside.o
mfcuk_keyrecovery_darkside.c: In function ‘mfcuk_darkside_select_tag’:
mfcuk_keyrecovery_darkside.c:894: error: ‘NM_ISO14443A_106’ undeclared (first use in this function)
mfcuk_keyrecovery_darkside.c:894: error: (Each undeclared identifier is reported only once
mfcuk_keyrecovery_darkside.c:894: error: for each function it appears in.)
mfcuk_keyrecovery_darkside.c:894: warning: passing argument 5 of ‘nfc_initiator_select_passive_target’ from incompatible pointer type
mfcuk_keyrecovery_darkside.c: In function ‘main’:
mfcuk_keyrecovery_darkside.c:1639: error: ‘NM_ISO14443A_106’ undeclared (first use in this function)
mfcuk_keyrecovery_darkside.c:1639: warning: passing argument 5 of ‘nfc_initiator_select_passive_target’ from incompatible pointer type
make[2]: *** [mfcuk_keyrecovery_darkside.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


:S Please help smile

Offline

#6 2011-03-21 05:40:26

hat
Contributor
Registered: 2009-04-12
Posts: 160

Re: Can't compile Mfcuk

you can not do this

./configure --with-libnfc=../libnfc-1.3.9/

instead do

./configure --with-libnfc=$PWD/../libnfc-1.3.9/

or even better write out the path in full. autotools will put the directory in the src/Makefile, like -I../libnfc-1.3.9/include. but since it's in a subdirectory src/ the ../ doesn't point to the same location anymore. fix this, try again :-)

Last edited by hat (2011-03-21 05:41:47)

Offline

#7 2011-03-21 18:48:30

moebius
Contributor
Registered: 2011-03-10
Posts: 206

Re: Can't compile Mfcuk

Hat! Thanx for your help! Now.. this sad


Moebius:mfcuk-read-only moebius$ make
make  all-recursive
Making all in src
  CCLD   mfcuk_keyrecovery_darkside
ld: warning: directory '/Users/moebius/Downloads/RFID_Project/Software/libnfc-1.4.2/lib/' following -L not found
ld: library not found for -lusb
collect2: ld returned 1 exit status
make[2]: *** [mfcuk_keyrecovery_darkside] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

:S

Offline

#8 2011-03-21 21:20:45

hat
Contributor
Registered: 2009-04-12
Posts: 160

Re: Can't compile Mfcuk

yes the intended way is to compile and install nfclib. you can do this without poluting / with.
libnfc-1.3.9

./configure --prefix=/Users/moebius/Downloads/RFID_Project/Software/nfcinstall
make
make install

and then use the nfcinstall dir in the configure for mfcuk.

or if you want to avoid that, you can just copy libnfc-1.3.9/libnfc/.lib to libnfc-1.3.9/lib.

you also have  this error:

ld: library not found for -lusb

so you still need to install libusb as well.

Offline

#9 2011-03-21 21:54:44

moebius
Contributor
Registered: 2011-03-10
Posts: 206

Re: Can't compile Mfcuk

Look!

Moebius:Software moebius$ pkg-config --list-all
libusb           libusb - USB access library (libusb-1.0 compat wrapper)
(...)
libusb-1.0       libusb-1.0 - C API for USB device access from Linux userspace
(...)

weird... :S

Last edited by moebius (2011-03-21 22:58:59)

Offline

#10 2011-03-21 22:35:26

hat
Contributor
Registered: 2009-04-12
Posts: 160

Re: Can't compile Mfcuk

dude enough with the exclamation marks, it's not my problem you fail at compiling.

whatever pkgconfig says it failed to find libusb.so, find where it is and if nescessary add -L/path/to/it/ to the src/Makefile 's CFLAGS. If it complains about rpl_malloc stuff just comment those defines out in the generated config.h

and relay more informative error messages than "all .. f*ck" that's just pointless.

Offline

#11 2011-03-21 23:02:14

moebius
Contributor
Registered: 2011-03-10
Posts: 206

Re: Can't compile Mfcuk

Thanks Hat.

Will try that and tell the forum about that.

Sorry If I was a little foul-mouthed.

Offline

#12 2011-03-21 23:35:36

moebius
Contributor
Registered: 2011-03-10
Posts: 206

Re: Can't compile Mfcuk

Well, I added:

mfcuk_keyrecovery_darkside_LDADD = -L/usr/local/lib -L/opt/local/lib -lnfc -lusb -lpcsclite

inside Makefile file in /src directory.

Also, I downloaded and successfully compile pcsclite lib.

But I still have one thing around:

Moebius:mfcuk-read-only moebius$ make
make  all-recursive
Making all in src
  CCLD   mfcuk_keyrecovery_darkside
Undefined symbols:
  "_bswap_32", referenced from:
      _mfcuk_verify_key_block in mfcuk_keyrecovery_darkside.o
      _mfcuk_key_recovery_block in mfcuk_keyrecovery_darkside.o
      _main in mfcuk_keyrecovery_darkside.o
      _main in mfcuk_keyrecovery_darkside.o
      _main in mfcuk_keyrecovery_darkside.o
      _main in mfcuk_keyrecovery_darkside.o
  "_append_iso14443a_crc", referenced from:
      _mfcuk_verify_key_block in mfcuk_keyrecovery_darkside.o
      _mfcuk_key_recovery_block in mfcuk_keyrecovery_darkside.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [mfcuk_keyrecovery_darkside] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I think we're really close... Also remember that I'm trying to do this on OSX 10.6.6. If we can deal with this problem maybe I can write a mini guide in order to compile mfcuk in this OS.

Thanks for your help!

Offline

#13 2011-03-22 08:18:57

hat
Contributor
Registered: 2009-04-12
Posts: 160

Re: Can't compile Mfcuk

well we need to find out where _append_iso14443a_crc is supposed to come from.
can you grep -r "_append_iso14443a_crc" /path/to/libnfc /path/to/mfcuk

you did manage to compile libnfc right ? it seems like it's having problems linking against libnfc. If so, did you compile the 1.3.9 version?

cheers

Last edited by hat (2011-03-22 08:31:46)

Offline

#14 2011-03-23 03:20:10

moebius
Contributor
Registered: 2011-03-10
Posts: 206

Re: Can't compile Mfcuk

Well, Thanks Hat! I did it.

The two things I did:

#define bswap_16(x) OSSwapInt16(x)
#define bswap_32(x) OSSwapInt32(x)
#define bswap_64(x) OSSwapInt64(x)

and

Because I was running libnfc-1.4.2(latest) I found this:

Moebius:libnfc-1.4.2 moebius$ grep -i -r append_iso14443a *
NEWS:    - append_iso14443a_crc() was renamed to iso14443a_crc_append()

so changes were done and I have it running. I'm waiting my NFC Compat reader/writer (a SCL3711) so I will tell you if it works.

If everything goes fine, I can wirte a mini tuto to compile this on OSX 10.6+

Thanks a lot ! =)

Offline

#15 2012-12-07 04:09:57

nullvistoler
Member
Registered: 2012-12-07
Posts: 2

Re: Can't compile Mfcuk

I'm having the exact same problem when I try to use make, can you tell me how you solved it?

I'm kinda new to linux in general..

Offline

#16 2012-12-07 14:51:06

moebius
Contributor
Registered: 2011-03-10
Posts: 206

Re: Can't compile Mfcuk

the solution is just there but it's for OSX, not Linux.

I did this:

#define bswap_16(x) OSSwapInt16(x)
#define bswap_32(x) OSSwapInt32(x)
#define bswap_64(x) OSSwapInt64(x)

and

append_iso14443a_crc() was renamed to iso14443a_crc_append()

Hope that works for you.

Offline

#17 2012-12-08 00:50:08

nullvistoler
Member
Registered: 2012-12-07
Posts: 2

Re: Can't compile Mfcuk

Do I add that to the make file? and and do I just run the other one in the terminal?

Offline

#18 2013-01-02 03:55:07

moebius
Contributor
Registered: 2011-03-10
Posts: 206

Re: Can't compile Mfcuk

Depends on: libnfc (>=1.6.0)

$ svn checkout http://mfcuk.googlecode.com/svn/trunk/ mfcuk-read-only
Checked out revision 80.

$ autoreconf

$ automake --add-missing

$ PKG_CONFIG_PATH=/FULL_PATH_TO_LIBNFC/ ./configure

$ make all

Offline

Board footer

Powered by FluxBB