RfidResearchGroup / proxmark3

Iceman Fork - Proxmark3
http://www.icedev.se
GNU General Public License v3.0
3.81k stars 1.01k forks source link

Linking fail on OSX #358

Closed Heat-Miser closed 5 years ago

Heat-Miser commented 5 years ago

Describe the bug When compiling the client, the following error occurs

$>make

===================================================================
Platform name:     Proxmark3 Generic target
PLATFORM:          PM3OTHER
Platform extras:   No extra selected
Included options:  LF HITAG ISO15693 LEGICRF ISO14443b ISO14443a ICLASS FELICA NFCBARCODE HFSNIFF
Standalone mode:   LF_SAMYRUN
===================================================================
[*] MAKE client/all
[=] LD proxmark3
Undefined symbols for architecture x86_64:
  "_rl", referenced from:
      _hash1 in elite_crack.o
      _rk in elite_crack.o
  "_rr", referenced from:
      _hash1 in elite_crack.o
  "_swap", referenced from:
      _hash1 in elite_crack.o
     (maybe you meant: _mbedtls_mpi_safe_cond_swap, _wiegand_add_parity_swapped , _mbedtls_mpi_swap )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [proxmark3] Error 1
make: *** [client/all] Error 2

I triple checked but it looks like it's different from issue 357.

To Reproduce Using MacOs 10.14.6 (18G87) using this commit

commit 1628ac8e6217a3dcf2690e885202bba077ca7023 (HEAD -> master, origin/master, origin/HEAD)
Author: Philippe Teuwen <phil@teuwen.org>
Date:   Mon Aug 26 13:55:42 2019 +0200

    revert temporarily hf iclass chk/lookup 2a1e6dff

Expected behavior

Succesfully linking the client :)

Desktop (please complete the following information):

Heat-Miser commented 5 years ago

Full compilation (make clean all)

$> make clean all

===================================================================
Platform name:     Proxmark3 Generic target
PLATFORM:          PM3OTHER
Platform extras:   No extra selected
Included options:  LF HITAG ISO15693 LEGICRF ISO14443b ISO14443a ICLASS FELICA NFCBARCODE HFSNIFF
Standalone mode:   LF_SAMYRUN
===================================================================
[*] MAKE client/clean
[*] MAKE bootrom/clean
[*] MAKE fpga_compress/clean
[*] MAKE armsrc/clean
[*] MAKE recovery/clean
[*] MAKE mfkey/clean
[*] MAKE nonce2key/clean
[*] MAKE client/all
[-] CC proxmark3.c
[-] CC uart/uart_posix.c
[-] CC uart/uart_win32.c
[-] CC ui.c
[-] CC ../common/commonutil.c
[-] CC util.c
[-] CC ../common/util_posix.c
[-] CC scandir.c
[-] CC ../common/crc16.c
[-] CC comms.c
[-] CC ../common/crapto1/crapto1.c
[-] CC ../common/crapto1/crypto1.c
[-] CC mifare/mfkey.c
[-] CC tea.c
[-] CC fido/additional_ca.c
[-] CC fido/cose.c
[-] CC fido/cbortools.c
[-] CC fido/fidocore.c
[-] CC crypto/asn1dump.c
[-] CC crypto/libpcrypto.c
[-] CC crypto/asn1utils.c
[-] CC cliparser/argtable3.c
[-] CC cliparser/cliparser.c
[-] CC loclass/cipher.c
[-] CC loclass/cipherutils.c
[-] CC loclass/ikeys.c
[-] CC loclass/elite_crack.c
[-] CC fileutils.c
[-] CC whereami.c
[-] CC mifare/mifarehost.c
[-] CC ../common/parity.c
[-] CC ../common/crc.c
[-] CC ../common/crc64.c
[-] CC ../common/legic_prng.c
[-] CC ../common/iso15693tools.c
[-] CC prng.c
[-] CC graph.c
[-] CC cmddata.c
[-] CC ../common/lfdemod.c
[-] CC emv/crypto_polarssl.c
[-] CC emv/crypto.c
[-] CC emv/emv_pk.c
[-] CC emv/emv_pki.c
[-] CC emv/emv_pki_priv.c
[-] CC emv/test/cryptotest.c
[-] CC emv/apduinfo.c
[-] CC emv/dump.c
[-] CC emv/tlv.c
[-] CC emv/emv_tags.c
[-] CC emv/dol.c
[-] CC emv/emvjson.c
[-] CC emv/emvcore.c
[-] CC emv/test/crypto_test.c
[-] CC emv/test/sda_test.c
[-] CC emv/test/dda_test.c
[-] CC emv/test/cda_test.c
[-] CC emv/cmdemv.c
[-] CC emv/emv_roca.c
[-] CC mifare/mifare4.c
[-] CC mifare/mad.c
[-] CC mifare/ndef.c
[-] CC cmdanalyse.c
[-] CC cmdhf.c
[-] CC cmdhflist.c
[-] CC cmdhf14a.c
[-] CC cmdhf14b.c
[-] CC cmdhf15.c
[-] CC cmdhfepa.c
[-] CC cmdhflegic.c
[-] CC cmdhficlass.c
[-] CC cmdhfmf.c
[-] CC cmdhfmfu.c
[-] CC cmdhfmfp.c
[-] CC cmdhfmfhard.c
[-] CC hardnested/hardnested_bruteforce.c
[-] CC cmdhfmfdes.c
[-] CC cmdhftopaz.c
[-] CC cmdhffido.c
[-] CC cmdhffelica.c
[-] CC cmdhfthinfilm.c
[-] CC cmdhw.c
[-] CC cmdlf.c
[-] CC cmdlfawid.c
[-] CC cmdlfcotag.c
[-] CC cmdlfem4x.c
[-] CC cmdlffdx.c
[-] CC cmdlfguard.c
[-] CC cmdlfhid.c
[-] CC cmdlfhitag.c
[-] CC cmdlfio.c
[-] CC cmdlfindala.c
[-] CC cmdlfjablotron.c
[-] CC cmdlfkeri.c
[-] CC cmdlfnexwatch.c
[-] CC cmdlfnedap.c
[-] CC cmdlfnoralsy.c
[-] CC cmdlfpac.c
[-] CC cmdlfparadox.c
[-] CC cmdlfpcf7931.c
[-] CC cmdlfpresco.c
[-] CC cmdlfpyramid.c
[-] CC cmdlfsecurakey.c
[-] CC cmdlft55xx.c
[-] CC cmdlfti.c
[-] CC cmdlfviking.c
[-] CC cmdlfvisa2000.c
[-] CC cmdtrace.c
[-] CC cmdflashmem.c
[-] CC cmdflashmemspiffs.c
[-] CC cmdsmartcard.c
[-] CC cmdusart.c
[-] CC cmdparser.c
[-] CC cmdmain.c
[-] CC pm3_binlib.c
[-] CC scripting.c
[-] CC cmdscript.c
[-] CC pm3_bitlib.c
[-] CC cmdcrc.c
[-] CC ../common/bucketsort.c
[-] CC util_darwin.m
[-] UIC ui/ui_overlays.h
[-] CXX proxgui.cpp
[-] CXX proxguiqt.cpp
[-] MOC proxguiqt.moc.cpp
[-] CXX proxguiqt.moc.cpp
[-] CC(NOSIMD) hardnested/hardnested_bf_core.c
[-] CC(NOSIMD) hardnested/hardnested_bitarray_core.c
[-] CC(MMX) hardnested/hardnested_bf_core.c
[-] CC(MMX) hardnested/hardnested_bitarray_core.c
[-] CC(SSE2) hardnested/hardnested_bf_core.c
[-] CC(SSE2) hardnested/hardnested_bitarray_core.c
[-] CC(AVX) hardnested/hardnested_bf_core.c
[-] CC(AVX) hardnested/hardnested_bitarray_core.c
[-] CC(AVX2) hardnested/hardnested_bf_core.c
[-] CC(AVX2) hardnested/hardnested_bitarray_core.c
[-] CC(AVX512) hardnested/hardnested_bf_core.c
[-] CC(AVX512) hardnested/hardnested_bitarray_core.c
[*] MAKE liblua for macosx
[-] CC lapi.c
[-] CC lcode.c
[-] CC lctype.c
[-] CC ldebug.c
[-] CC ldo.c
[-] CC ldump.c
[-] CC lfunc.c
[-] CC lgc.c
[-] CC llex.c
[-] CC lmem.c
[-] CC lobject.c
[-] CC lopcodes.c
[-] CC lparser.c
[-] CC lstate.c
[-] CC lstring.c
[-] CC ltable.c
[-] CC ltm.c
[-] CC lundump.c
[-] CC lvm.c
[-] CC lzio.c
[-] CC lauxlib.c
[-] CC lbaselib.c
[-] CC lbitlib.c
[-] CC lcorolib.c
[-] CC ldblib.c
[-] CC liolib.c
[-] CC lmathlib.c
[-] CC loslib.c
[-] CC lstrlib.c
[-] CC ltablib.c
[-] CC loadlib.c
[-] CC linit.c
[=] AR liblua.a
[*] MAKE jansson
[-] CC dump.c
[-] CC error.c
[-] CC hashtable.c
[-] CC hashtable_seed.c
[-] CC load.c
[-] CC memory.c
[-] CC pack_unpack.c
[-] CC strbuffer.c
[-] CC strconv.c
[-] CC utf.c
[-] CC path.c
[-] CC value.c
[=] AR libjansson.a
[*] MAKE tinycbor
[-] CC cborencoder.c
[-] CC cborencoder_close_container_checked.c
[-] CC cborerrorstrings.c
[-] CC cborparser.c
[-] CC cborparser_dup_string.c
[-] CC cborpretty.c
[-] CC cbortojson.c
[-] CC cborvalidation.c
[=] AR tinycbor.a
[*] MAKE reveng
[-] CC bmpbit.c
[-] CC cli.c
[-] CC getopt.c
[-] CC model.c
[-] CC poly.c
[-] CC preset.c
[-] CC reveng.c
[-] CC bmpbit.c
[=] TEST bmptst
[=] AR libreveng.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libreveng.a(bmpbit.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libreveng.a(bmpbit.o) has no symbols
[*] MAKE mbedtls
[-] CC aes.c
[-] CC asn1parse.c
[-] CC asn1write.c
[-] CC base64.c
[-] CC bignum.c
[-] CC ctr_drbg.c
[-] CC entropy_poll.c
[-] CC entropy.c
[-] CC error.c
[-] CC timing.c
[-] CC ecp.c
[-] CC ecp_curves.c
[-] CC certs.c
[-] CC camellia.c
[-] CC blowfish.c
[-] CC cipher_wrap.c
[-] CC cipher.c
[-] CC cmac.c
[-] CC des.c
[-] CC ecdsa.c
[-] CC md.c
[-] CC md_wrap.c
[-] CC md5.c
[-] CC oid.c
[-] CC pem.c
[-] CC arc4.c
[-] CC pk.c
[-] CC pk_wrap.c
[-] CC pkwrite.c
[-] CC pkcs5.c
[-] CC pkcs12.c
[-] CC pkparse.c
[-] CC platform.c
[-] CC platform_util.c
[-] CC rsa.c
[-] CC rsa_internal.c
[-] CC sha1.c
[-] CC sha256.c
[-] CC sha512.c
[-] CC threading.c
[-] CC x509.c
[-] CC x509_crl.c
[-] CC x509_crt.c
[=] AR libmbedtls.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /Users/uglybob/Documents/Tools/rrg/proxmark3/client/obj/libmbedtls.a(threading.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /Users/uglybob/Documents/Tools/rrg/proxmark3/client/obj/libmbedtls.a(threading.o) has no symbols
[*] MAKE zlib
[-] CC deflate.c
[-] CC adler32.c
[-] CC trees.c
[-] CC zutil.c
[-] CC inflate.c
[-] CC inffast.c
[-] CC inftrees.c
[=] AR libz.a
[=] GEN lualibs/pm3_cmd.lua
[=] GEN lualibs/mfc_default_keys.lua
[=] LD proxmark3
Undefined symbols for architecture x86_64:
  "_rl", referenced from:
      _hash1 in elite_crack.o
      _rk in elite_crack.o
  "_rr", referenced from:
      _hash1 in elite_crack.o
  "_swap", referenced from:
      _hash1 in elite_crack.o
     (maybe you meant: _mbedtls_mpi_safe_cond_swap, _wiegand_add_parity_swapped , _mbedtls_mpi_swap )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [proxmark3] Error 1
make: *** [client/all] Error 2
Heat-Miser commented 5 years ago

Any idea ? I'm probably doing something stupid...

Thanks for your help.

iceman1001 commented 5 years ago

which compiler?

doegox commented 5 years ago

can you show with make V=1 ? how did you setup the environment? cf https://github.com/RfidResearchGroup/proxmark3/blob/master/doc/md/Installation_Instructions/Mac-OS-X-Homebrew-Installation-Instructions.md#homebrew-mac-os-x-developer-installation

Heat-Miser commented 5 years ago

Wokay forget it, the build failed due to a LDflag I used in my env... Sorry for the noise, I should have checked it before !

doegox commented 5 years ago

OSX ppl have hard time with Mondays apparently... ;)

Heat-Miser commented 5 years ago

yeah... harsh monday... n33d moar C0FFEE !

mikemykhaylov commented 9 months ago

I'm still having this issue on the latest commit, what exactly did you change to resolve the issue?