`make` fails with `ld` error
StoyanDimitrov opened this issue · comments
StoyanDimitrov commented
Here is the error I stumble.
kali@kali:~/rfid/mfoc$ make
make all-recursive
make[1]: Entering directory '/home/kali/rfid/mfoc'
Making all in src
make[2]: Entering directory '/home/kali/rfid/mfoc/src'
CC crapto1.o
CC crypto1.o
CC mfoc.o
CC mifare.o
CC nfc-utils.o
CC parity.o
CC hardnested/hardnested_bruteforce.o
CC hardnested/tables.o
CC cmdhfmfhard.o
CC util.o
CC util_posix.o
CC ui.o
gcc -O3 -std=c99 -mno-mmx -mno-sse2 -mno-avx -mno-avx2 -mno-avx512f -c -o hardnested/hardnested_bf_core_NOSIMD.o hardnested/hardnested_bf_core.c
gcc -O3 -std=c99 -mno-mmx -mno-sse2 -mno-avx -mno-avx2 -mno-avx512f -c -o hardnested/hardnested_bitarray_core_NOSIMD.o hardnested/hardnested_bitarray_core.c
gcc -O3 -std=c99 -mmmx -mno-sse2 -mno-avx -mno-avx2 -mno-avx512f -c -o hardnested/hardnested_bf_core_MMX.o hardnested/hardnested_bf_core.c
gcc -O3 -std=c99 -mmmx -msse2 -mno-avx -mno-avx2 -mno-avx512f -c -o hardnested/hardnested_bf_core_SSE2.o hardnested/hardnested_bf_core.c
gcc -O3 -std=c99 -mmmx -msse2 -mavx -mno-avx2 -mno-avx512f -c -o hardnested/hardnested_bf_core_AVX.o hardnested/hardnested_bf_core.c
gcc -O3 -std=c99 -mmmx -msse2 -mavx -mavx2 -mno-avx512f -c -o hardnested/hardnested_bf_core_AVX2.o hardnested/hardnested_bf_core.c
gcc -O3 -std=c99 -mmmx -msse2 -mavx -mavx2 -mavx512f -c -o hardnested/hardnested_bf_core_AVX512.o hardnested/hardnested_bf_core.c
gcc -O3 -std=c99 -mmmx -mno-sse2 -mno-avx -mno-avx2 -mno-avx512f -c -o hardnested/hardnested_bitarray_core_MMX.o hardnested/hardnested_bitarray_core.c
gcc -O3 -std=c99 -mmmx -msse2 -mno-avx -mno-avx2 -mno-avx512f -c -o hardnested/hardnested_bitarray_core_SSE2.o hardnested/hardnested_bitarray_core.c
gcc -O3 -std=c99 -mmmx -msse2 -mavx -mno-avx2 -mno-avx512f -c -o hardnested/hardnested_bitarray_core_AVX.o hardnested/hardnested_bitarray_core.c
gcc -O3 -std=c99 -mmmx -msse2 -mavx -mavx2 -mno-avx512f -c -o hardnested/hardnested_bitarray_core_AVX2.o hardnested/hardnested_bitarray_core.c
gcc -O3 -std=c99 -mmmx -msse2 -mavx -mavx2 -mavx512f -c -o hardnested/hardnested_bitarray_core_AVX512.o hardnested/hardnested_bitarray_core.c
CCLD mfoc
/usr/bin/ld: hardnested/hardnested_bruteforce.o:(.bss+0x20): multiple definition of `t'; mfoc.o:(.bss+0x40): first defined here
/usr/bin/ld: hardnested/hardnested_bruteforce.o:(.bss+0x0): multiple definition of `r'; mfoc.o:(.bss+0x20): first defined here
/usr/bin/ld: hardnested/tables.o:(.bss+0x0): multiple definition of `r'; mfoc.o:(.bss+0x20): first defined here
/usr/bin/ld: hardnested/tables.o:(.bss+0x20): multiple definition of `t'; mfoc.o:(.bss+0x40): first defined here
/usr/bin/ld: cmdhfmfhard.o:(.bss+0x120): multiple definition of `t'; mfoc.o:(.bss+0x40): first defined here
/usr/bin/ld: cmdhfmfhard.o:(.bss+0x100): multiple definition of `r'; mfoc.o:(.bss+0x20): first defined here
/usr/bin/ld: hardnested/hardnested_bf_core_NOSIMD.o:(.bss+0x0): multiple definition of `r'; mfoc.o:(.bss+0x20): first defined here
/usr/bin/ld: hardnested/hardnested_bf_core_NOSIMD.o:(.bss+0x20): multiple definition of `t'; mfoc.o:(.bss+0x40): first defined here
/usr/bin/ld: hardnested/hardnested_bf_core_MMX.o:(.bss+0x0): multiple definition of `r'; mfoc.o:(.bss+0x20): first defined here
/usr/bin/ld: hardnested/hardnested_bf_core_MMX.o:(.bss+0x20): multiple definition of `t'; mfoc.o:(.bss+0x40): first defined here
/usr/bin/ld: hardnested/hardnested_bf_core_SSE2.o:(.bss+0x0): multiple definition of `r'; mfoc.o:(.bss+0x20): first defined here
/usr/bin/ld: hardnested/hardnested_bf_core_SSE2.o:(.bss+0x20): multiple definition of `t'; mfoc.o:(.bss+0x40): first defined here
/usr/bin/ld: hardnested/hardnested_bf_core_AVX.o:(.bss+0x0): multiple definition of `r'; mfoc.o:(.bss+0x20): first defined here
/usr/bin/ld: hardnested/hardnested_bf_core_AVX.o:(.bss+0x20): multiple definition of `t'; mfoc.o:(.bss+0x40): first defined here
/usr/bin/ld: hardnested/hardnested_bf_core_AVX2.o:(.bss+0x0): multiple definition of `r'; mfoc.o:(.bss+0x20): first defined here
/usr/bin/ld: hardnested/hardnested_bf_core_AVX2.o:(.bss+0x20): multiple definition of `t'; mfoc.o:(.bss+0x40): first defined here
/usr/bin/ld: hardnested/hardnested_bf_core_AVX512.o:(.bss+0x0): multiple definition of `r'; mfoc.o:(.bss+0x20): first defined here
/usr/bin/ld: hardnested/hardnested_bf_core_AVX512.o:(.bss+0x20): multiple definition of `t'; mfoc.o:(.bss+0x40): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:436: mfoc] Error 1
make[2]: Leaving directory '/home/kali/rfid/mfoc/src'
make[1]: *** [Makefile:376: all-recursive] Error 1
make[1]: Leaving directory '/home/kali/rfid/mfoc'
make: *** [Makefile:317: all] Error 2
The output of lsb_release -a
kali@kali:~/rfid/mfoc$ lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2020.3
Codename: kali-rolling
The output of autoreconf --version
kali@kali:~/rfid/mfoc$ autoreconf --version
autoreconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David J. MacKenzie and Akim Demaille.
vladimirf7 commented
This fixed it for me: https://aur.archlinux.org/packages/mfoc-hardnested-git/
"I was able to solve this by installing gcc-8 and setting it as default before compiling"
Valentin commented
Hi,
The project moved to https://github.com/nfc-tools/mfoc-hardnested
If you feel that this problem should still be solved, reopen the issue there please. Thank you :)