Closed chrismcband closed 3 years ago
@tcprst have you ever encountered this?
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?
@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
can you make a exe where you print the ULONG_MAX on your system?
@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
Looks like a 64b system 0xFFFFFFFF FFFFFFFF...
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)’
@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?
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 ?
@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.
No problem, this can happen
Trying to install on an Intel MacBook Pro, Mac OS 11.5.1, output is below:
The complete 02.make output: