Proxmark / proxmark3

Proxmark 3
http://www.proxmark.org/
GNU General Public License v2.0
3.11k stars 903 forks source link

Build on OSX segfaults clang #640

Closed evanrinehart closed 6 years ago

evanrinehart commented 6 years ago

After cloning and simply typing `make' it goes smoothly for a while until this

gcc -MT obj/hardnested/hardnested_bf_core_AVX512.o -MMD -MP -MF obj/hardnested/hardnested_bf_core.Td  -std=c99 -D_ISOC99_SOURCE -I. -I../include -I../common -I../common/polarssl -I../zlib -I../uart -I/opt/local/include -I../liblua -Wall -g -O3  -DWITH_ISO14443a_StandAlone -DWITH_ISO15693 -DWITH_ISO14443a -DWITH_ISO14443b -DWITH_ICLASS -DWITH_LEGICRF -DWITH_HITAG -DWITH_CRC -DWITH_HFSNOOP -DWITH_GUI -mmmx -msse2 -mavx -mavx2 -mavx512f -c -o obj/hardnested/hardnested_bf_core_AVX512.o hardnested/hardnested_bf_core.c
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.2.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/p2/6nrm_0tx61j60mr2yfzgls340000gn/T/hardnested_bf_core-4b7009.c
clang: note: diagnostic msg: /var/folders/p2/6nrm_0tx61j60mr2yfzgls340000gn/T/hardnested_bf_core-4b7009.sh
clang: note: diagnostic msg:

********************
make[1]: *** [obj/hardnested/hardnested_bf_core_AVX512.o] Error 254
make: *** [client/all] Error 2
pwpiwi commented 6 years ago

You are using a pretty old compiler which doesn't support AVX512 code generation. The makefile should detect this and hardnested_bf_core_AVX512.c shouldn't be compiled at all. Looks like the detection of the compilers AVX512 support doesn't work.

Please type

echo | gcc -E -mavx512f - > /dev/null 2>&1 && echo "True"

at a shell prompt and provide the result.

evanrinehart commented 6 years ago
λ> echo | gcc -E -mavx512f - > /dev/null 2>&1 && echo "True"
True
pwpiwi commented 6 years ago

What is the result of

echo | gcc -E -mavx512f -
evanrinehart commented 6 years ago
λ> echo | gcc -E -mavx512f -
# 1 "<stdin>"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 331 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "<stdin>" 2
pwpiwi commented 6 years ago

So your compiler supports AVX512 but crashes when trying to compile with the respective option. This is not a Proxmark code issue and I suggest to either follow the advice in the error message:

clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.

or upgrade your compiler to a newer version.

evanrinehart commented 6 years ago

Ok thanks.