RfidResearchGroup / homebrew-proxmark3

Homebrew tap containing proxmark3 software/firmware
MIT License
48 stars 19 forks source link

Unable to install - cannot determine automatically REVENG PRESETS Macros #24

Closed chrismcband closed 3 years ago

chrismcband commented 3 years ago

Trying to install on an Intel MacBook Pro, Mac OS 11.5.1, output is below:

brew install proxmark3
==> Installing proxmark3 from rfidresearchgroup/proxmark3
==> Downloading https://github.com/RfidResearchGroup/proxmark3/archive/v4.13441.tar.gz
Already downloaded: /Users/chris/Library/Caches/Homebrew/downloads/074ae732a621d802570f14656287ea20e4f77ffea711ac4fce6653c5fa1afd08--proxmark3-4.13441.tar.gz
==> make clean
==> make all BREW_PREFIX=/usr/local PLATFORM=PM3RDV4
Last 15 lines from /Users/chris/Library/Logs/Homebrew/proxmark3/02.make:
Lua SWIG:          wrapper found
compiler version:  Apple clang version 12.0.5 (clang-1205.0.22.11)
===================================================================
[-] CC src/aiddesfire.c
[-] CC src/aidsearch.c
[-] CC src/cmdanalyse.c
[-] CC src/cmdcrc.c
In file included from src/cmdcrc.c:25:
In file included from ./deps/reveng/reveng.h:30:
./deps/reveng/config.h:95:2: error: Cannot determine automatically REVENG PRESETS Macros for your platform, you need to set them manually
#error Cannot determine automatically REVENG PRESETS Macros for your platform, you need to set them manually
 ^
1 error generated.
make[1]: *** [obj/cmdcrc.o] Error 1
make: *** [client/all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/rfidresearchgroup/homebrew-proxmark3/issues

The complete 02.make output:

cat /Users/chris/Library/Logs/Homebrew/proxmark3/02.make
2021-07-29 13:16:53 +0100

make
all
BREW_PREFIX=/usr/local
PLATFORM=PM3RDV4

===================================================================
Platform name:     Proxmark3 RDV4
PLATFORM:          PM3RDV4
PLATFORM_SIZE:     512
Platform extras:   No extra selected
Included options:  SMARTCARD FLASH -DRDV4 LF HITAG EM4x50 EM4x70 ISO15693 LEGICRF ISO14443b ISO14443a ICLASS FELICA NFCBARCODE HFSNIFF HFPLOT
Standalone mode:   HF_MSDSAL
===================================================================
[*] MAKE client/all
===================================================================
Client platform:   Darwin
GUI support:       QT not found, disabled
native BT support: Bluez not found, disabled
Jansson library:   system library not found, using local library
Lua library:       system library not found, using local library
Python3 library:   Python3 not found, disabled
Readline library:  enabled
Whereami library:  system library not found, using local library
Lua SWIG:          wrapper found
compiler version:  Apple clang version 12.0.5 (clang-1205.0.22.11)
===================================================================
[-] CC src/aiddesfire.c
[-] CC src/aidsearch.c
[-] CC src/cmdanalyse.c
[-] CC src/cmdcrc.c
In file included from src/cmdcrc.c:25:
In file included from ./deps/reveng/reveng.h:30:
./deps/reveng/config.h:95:2: error: Cannot determine automatically REVENG PRESETS Macros for your platform, you need to set them manually
#error Cannot determine automatically REVENG PRESETS Macros for your platform, you need to set them manually
 ^
1 error generated.
make[1]: *** [obj/cmdcrc.o] Error 1
make: *** [client/all] Error 2

HOMEBREW_VERSION: 3.2.5
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 3e52e8b48ab036af77a582219ea250107c84432f
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: a37869f20d80c9b87c580b71b25ed6aed91768fc
Core tap last commit: 8 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.1CxDdKAmu7/org.macosforge.xquartz:0
HOMEBREW_EDITOR: vim
HOMEBREW_MAKE_JOBS: 12
HOMEBREW_NO_BOOTSNAP: set
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: dodeca-core 64-bit kabylake
Clang: 12.0.5 build 1205
Git: 2.32.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 11.5.1-x86_64
CLT: 12.5.1.0.1.1623191612
Xcode: 12.5.1

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
CMAKE_PREFIX_PATH: /usr/local/opt/readline:/usr/local/opt/qt@5:/usr/local
CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
CMAKE_FRAMEWORK_PATH: /usr/local/opt/qt@5/Frameworks
PKG_CONFIG_PATH: /usr/local/opt/readline/lib/pkgconfig:/usr/local/opt/qt@5/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/11
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Homebrew/Library/Homebrew/shims/mac/super:/usr/local/opt/pkg-config/bin:/usr/local/opt/qt@5/bin:/usr/local/opt/arm-none-eabi-gcc/bin:/usr/bin:/bin:/usr/sbin:/sbin
iceman1001 commented 3 years ago

@tcprst have you ever encountered this?

tcprst commented 3 years ago

I have not seen this, It appears to be an Intel Mac. The C compiler must be returning something strange for ULONG_MAX. I have an Intel Mac I can try this on later, but it's on a newer version now than in the reported issue. @chrismcband are you still seeing this issue?

chrismcband commented 3 years ago

@tcprst yes I still have this issue, from latest install attempt:

==> Downloading https://github.com/RfidResearchGroup/proxmark3/archive/v4.14434.tar.gz
==> Downloading from https://codeload.github.com/RfidResearchGroup/proxmark3/tar.gz/v4.14434
                                                #     #    #   -#O=-
==> Installing proxmark3 from rfidresearchgroup/proxmark3
==> make clean
==> make all BREW_PREFIX=/usr/local PLATFORM=PM3RDV4
Last 15 lines from /Users/chris/Library/Logs/Homebrew/proxmark3/02.make:
Lua SWIG:          wrapper found
compiler version:  Apple clang version 12.0.5 (clang-1205.0.22.11)
===================================================================
[-] CC src/mifare/aiddesfire.c
[-] CC src/aidsearch.c
[-] CC src/cmdanalyse.c
[-] CC src/cmdcrc.c
In file included from src/cmdcrc.c:25:
In file included from ./deps/reveng/reveng.h:30:
./deps/reveng/config.h:95:2: error: Cannot determine automatically REVENG PRESETS Macros for your platform, you need to set them manually
#error Cannot determine automatically REVENG PRESETS Macros for your platform, you need to set them manually
 ^
1 error generated.
make[1]: *** [obj/cmdcrc.o] Error 1
make: *** [client/all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/rfidresearchgroup/homebrew-proxmark3/issues
iceman1001 commented 3 years ago

can you make a exe where you print the ULONG_MAX on your system?

chrismcband commented 3 years ago

@iceman1001 not too sure if I did this right, but looked it up online. Heres the program:

#include <limits.h>
#include <stdio.h>

int main() {
    unsigned long my_long = ULONG_MAX;
    int my_int = (int) my_long;
    printf("%lu\n", my_long);
    printf("%i\n", my_int);
}

Which outputs:

18446744073709551615
-1
iceman1001 commented 3 years ago

Looks like a 64b system 0xFFFFFFFF FFFFFFFF...

doegox commented 3 years ago

could you compile the following and show output ?

#include <limits.h>

#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
#pragma message "ULONG_MAX: " STR(ULONG_MAX)
#pragma message "UINT64_MAX: " STR(UINT64_MAX)

int main() { return 0; }

ftr on a 64b it gives equality of ULONG_MAX and UINT64_MAX as such:

main.c:6:9: note: ‘#pragma message: ULONG_MAX: (0x7fffffffffffffffL * 2UL + 1UL)’
main.c:7:9: note: ‘#pragma message: UINT64_MAX: (18446744073709551615UL)’
chrismcband commented 3 years ago

@doegox not sure this is right, using g++ ulongmax.c -o ulongmax:

clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
ulongmax.c:5:9: warning: ULONG_MAX: ULONG_MAX [-W#pragma-messages]
#pragma message "ULONG_MAX: " STR(ULONG_MAX)
        ^
ulongmax.c:6:9: warning: UINT64_MAX: UINT64_MAX [-W#pragma-messages]
#pragma message "UINT64_MAX: " STR(UINT64_MAX)
        ^
2 warnings generated.

gcc ulongmax.c -o ulongmax get same without the 1st warning:

ulongmax.c:5:9: warning: ULONG_MAX: ULONG_MAX [-W#pragma-messages]
#pragma message "ULONG_MAX: " STR(ULONG_MAX)
        ^
ulongmax.c:6:9: warning: UINT64_MAX: UINT64_MAX [-W#pragma-messages]
#pragma message "UINT64_MAX: " STR(UINT64_MAX)
        ^
2 warnings generated.

And running the executable, no output. Should I be compiling with something else?

doegox commented 3 years ago

That's weird. Yes gcc is fine, which is actually aliased to clang on MacOSX, a plain lie... :) Anyway, it sounds like the macros are not defined, that's the strange part... On my linux it's defined in /usr/include/limits.h and /usr/include/newlib/limits.h Could you check on your system where ULONG_MAX could be defined ?

chrismcband commented 3 years ago

@doegox Thanks, you pointed me in the right direction. Looking around for a limits.h I found this file located in my /usr/local/includes/limits.h, this file mentioned some things like gearman. I must have installed this years ago (vaguely remember compiling a PHP install from source a long time ago and adding some pecl extensions). Anyway I ran brew doctor and saw I had a lot of unexpected header files and went about removing all the files it mentioned. After brew doctor said I was ready to brew I tried installing proxmark3 and this time it worked. It was a unique case with my machine, sorry and thanks for your help. I'll close this issue.

doegox commented 3 years ago

No problem, this can happen