nfc-tools / mfoc-hardnested

A fork of mfoc integrating hardnested code from the proxmark
GNU General Public License v2.0
191 stars 31 forks source link

make failure #12

Closed BitVenturesUSA closed 2 years ago

BitVenturesUSA commented 2 years ago

Kali Info:

└─# uname -a 2 ⨯ Linux kali 5.14.0-kali4-amd64 #1 SMP Debian 5.14.16-1kali1 (2021-11-05) x86_64 GNU/Linux


libnfc-bin/kali-rolling,now 1.8.0-2 amd64 [installed]
  Near Field Communication (NFC) binaries

libnfc-dev/kali-rolling,now 1.8.0-2 amd64 [installed]
  Near Field Communication (NFC) library (development files)

libnfc-examples/kali-rolling,now 1.8.0-2 amd64 [installed]
  Near Field Communication (NFC) examples

libnfc-pn53x-examples/kali-rolling,now 1.8.0-2 amd64 [installed]
  Near Field Communication (NFC) examples for PN53x chips only

libnfc6/kali-rolling,now 1.8.0-2 amd64 [installed,automatic]
  Near Field Communication (NFC) library

mfcuk/kali-rolling,now 0.3.8+git20180720-2 amd64 [installed]
  MiFare Classic Universal toolKit

here is the full output of my build as instructed in the README. Any assistance would be most appreciated. Thanks!

──(root💀kali)-[/home/kali/mfoc]
└─# autoreconf -is
src/Makefile.am:42: warning: '%'-style pattern rules are a GNU make extension
src/Makefile.am:45: warning: '%'-style pattern rules are a GNU make extension
src/Makefile.am:48: warning: '%'-style pattern rules are a GNU make extension
src/Makefile.am:51: warning: '%'-style pattern rules are a GNU make extension
src/Makefile.am:54: warning: '%'-style pattern rules are a GNU make extension
src/Makefile.am:57: warning: '%'-style pattern rules are a GNU make extension

┌──(root💀kali)-[/home/kali/mfoc]
└─# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
./configure: line 3263: AX_CFLAGS_WARN_ALL: command not found
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libnfc >= 1.7.0... yes
checking for liblzma... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for log in -lm... yes
checking for inline... inline
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for _Bool... yes
checking for stdbool.h that conforms to C99... yes
checking for size_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for GNU libc compatible malloc... yes
checking for GNU libc compatible realloc... yes
checking for memset... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands

┌──(root💀kali)-[/home/kali/mfoc]
└─# make && sudo make install
make  all-recursive
make[1]: Entering directory '/home/kali/mfoc'
Making all in src
make[2]: Entering directory '/home/kali/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:434: mfoc] Error 1
make[2]: Leaving directory '/home/kali/mfoc/src'
make[1]: *** [Makefile:375: all-recursive] Error 1
make[1]: Leaving directory '/home/kali/mfoc'
make: *** [Makefile:316: all] Error 2'
BitVenturesUSA commented 2 years ago

Rebuilt using sources from ([https://github.com/vk496/mfoc-hardnested]) and it worked perfectly. Closing