mdk4 icon indicating copy to clipboard operation
mdk4 copied to clipboard

Fedora make file error 2 error 1

Open OmiceyO opened this issue 4 years ago • 4 comments

When i do "make" in a fully update fedora 32 i get this :

"cc -g -O3 -Wall -Wextra -c -o wids.o wids.c make[2]: Leaving directory '/home/omiceyo/Downloads/mdk4/src/attacks' make -C attacks make[2]: Entering directory '/home/omiceyo/Downloads/mdk4/src/attacks' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/omiceyo/Downloads/mdk4/src/attacks' gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk4-v1 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -g -O3 -Wall -Wextra -fcommon mdk4.c osdep/libosdep.a debug.o helpers.o mac_addr.o linkedlist.o greylist.o dumpfile.o packet.o brute.o osdep.o channelhopper.o ghosting.o fragmenting.o attacks/attacks.o attacks/auth_dos.o attacks/beacon_flood.o attacks/countermeasures.o attacks/deauth.o attacks/dummy.o attacks/eapol.o attacks/fuzzer.o attacks/ieee80211s.o attacks/probing.o attacks/wids.o -o mdk4 -lnl-genl-3 -lnl-3 -lm -Losdep -losdep -lpthread -lpcap /usr/bin/ld: attacks/auth_dos.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: multiple definition of attack_count'; attacks/attacks.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: first defined here /usr/bin/ld: attacks/beacon_flood.o:/home/omiceyo/Downloads/mdk4/src/attacks/beacon_flood.c:34: multiple definition of bssid'; attacks/auth_dos.o:/home/omiceyo/Downloads/mdk4/src/attacks/auth_dos.c:50: first defined here /usr/bin/ld: attacks/beacon_flood.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: multiple definition of attack_count'; attacks/attacks.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: first defined here /usr/bin/ld: attacks/countermeasures.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: multiple definition of attack_count'; attacks/attacks.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: first defined here /usr/bin/ld: attacks/deauth.o:/home/omiceyo/Downloads/mdk4/src/attacks/deauth.c:19: multiple definition of bssid'; attacks/auth_dos.o:/home/omiceyo/Downloads/mdk4/src/attacks/auth_dos.c:50: first defined here /usr/bin/ld: attacks/deauth.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: multiple definition of attack_count'; attacks/attacks.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: first defined here /usr/bin/ld: attacks/dummy.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: multiple definition of attack_count'; attacks/attacks.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: first defined here /usr/bin/ld: attacks/eapol.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: multiple definition of attack_count'; attacks/attacks.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: first defined here /usr/bin/ld: attacks/fuzzer.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: multiple definition of attack_count'; attacks/attacks.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: first defined here /usr/bin/ld: attacks/ieee80211s.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: multiple definition of attack_count'; attacks/attacks.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: first defined here /usr/bin/ld: attacks/probing.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: multiple definition of attack_count'; attacks/attacks.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: first defined here /usr/bin/ld: attacks/wids.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: multiple definition of attack_count'; attacks/attacks.o:/home/omiceyo/Downloads/mdk4/src/attacks/attacks.h:39: first defined here collect2: error: ld returned 1 exit status make[1]: *** [Makefile:38: mdk4] Error 1 make[1]: Leaving directory '/home/omiceyo/Downloads/mdk4/src' make: *** [Makefile:10: all] Error 2"

  • Any idea why that might be???

OmiceyO avatar Sep 12 '20 03:09 OmiceyO

Same on recent Kali Linux.

Pernat1y avatar Nov 02 '20 19:11 Pernat1y

I posted in this in another issue but this fixed it for me on Fedora 33

Just in case anyone else was still having this issue like I was, the PR #58 did not fix my issue. I had to set environment variables to use the -fcommon GCC flag, even though it appears the Makefile already had this flag set.

Run: export CFLAGS='-fcommon' make sudo bash export CFLAGS='-fcommon' make installl then exit to drop out of root shell

ryan910 avatar Dec 21 '20 02:12 ryan910

@ryan910 This made it work. What was it using if not gcc?

OmiceyO avatar Feb 16 '21 03:02 OmiceyO

The issue has been fixed , you can pull the latest code

E7mer avatar Feb 26 '21 02:02 E7mer