Open roycewilliams opened 2 years ago
Using non-byte-specific (i.e., "long long") identifiers is bad for portable code, because they change size on different architectures.
using types that are direct equivalents to "__uint32_t" or "__uint64_t" result in code that works as expected everywhere.
I believe I have successfully compiled (Monterey 12.1, latest Xcode/clang/gcc) with:
cc -v -fomit-frame-pointer -O3 -L/opt/homebrew/Cellar/judy/1.0.5/lib/ -I/opt/homebrew/Cellar/judy/1.0.5/include/ $(COPTS) -o dedupe dedupe.c -lJudy
I can confirm that it builds and runs fine on M1 mac.
All I had to do was install judy
from MacPorts and specify the include and lib directories.
The makefile didn't take CFLAGS
and LDFLAGS
like I expected, but those parameters can be shoved into COPTS
, which overwrites the -DINTEL
flag that would otherwise produce an error, "This header is only meant to be used on x86 and x64 architecture"
make all COPTS="-I/opt/local/include -L/opt/local/lib"
Copy-pasted from a friend's attempt to compile (to be clear, we didn't expect it to work "out of the box" :D )
To clarify, -DINTEL gets further, but we assume additional optimization is feasible. :D