0

When I try to install /aicrack-ng/mdk4 I get:

error: ld returned 1 exit status make[1]: *** [Makefile:38: mdk4] Error 1 make[1]: Leaving directory '/home/u4/mdk4/src' make: *** [Makefile:10: all] Error 2

This is the end of the output (since when I submit the whole output it is considered as a spam) when I run 'make' in the mdk4 folder.

make[2]: Leaving directory '/home/u4/mdk4/src/attacks'
make -C attacks
make[2]: Entering directory '/home/u4/mdk4/src/attacks'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/u4/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/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/beacon_flood.o:/home/u4/mdk4/src/attacks/beacon_flood.c:34: multiple definition of `bssid'; attacks/auth_dos.o:/home/u4/mdk4/src/attacks/auth_dos.c:50: first defined here
/usr/bin/ld: attacks/beacon_flood.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/countermeasures.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/deauth.o:/home/u4/mdk4/src/attacks/deauth.c:19: multiple definition of `bssid'; attacks/auth_dos.o:/home/u4/mdk4/src/attacks/auth_dos.c:50: first defined here
/usr/bin/ld: attacks/deauth.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/dummy.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/eapol.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/fuzzer.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/ieee80211s.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/probing.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/wids.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/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/u4/mdk4/src'
make: *** [Makefile:10: all] Error 2
  • And then I found this solution on github:

Installation

git clone https://github.com/aircrack-ng/mdk4
cd mdk4
make
sudo make install
# Using Arch Linux (and derived) append `CC=clang` after any `make` in commands.

But the thing is I have no idea how to do this

append CC=clang after any make in commands.

I use manjaro with bspwm environment

What should I do?

edit: So I did the CC=clang thing and this time the error is slightly different: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [Makefile:38: mdk4] Error 1 make[1]: Leaving directory '/home/u4/mdk4/src' make: *** [Makefile:10: all] Error 2

edit: The first screenshot is the beginning of the output and the seconde one is the end of the output. The beginning of the output

The end of the output

  • If you're still getting errors with make CC=clang, it might be time to open a bug report upstream. It's possible there's something off about their documentation. That slight difference in the wording of the error message sounds to me like it's the same error being reported by a different program (i.e., clangs's linker instead of whatever linker was being used before). – solarshado Nov 24 '20 at 21:43
  • thanks I'll try that and I'll report if there's any changes – user443355 Nov 24 '20 at 21:58
  • And where should I report it? Arch linux, CC=clang or manjaro. @solarshado – user443355 Nov 24 '20 at 22:08
  • Based on those screenshots, it looks like there might be some bad .o files, probably from the initial, failed make. Try a make clean before another make CC=clang. If that still dies with the same error, rm the whole source tree and start with a fresh git clone. If you're still getting the same error after all that, file a bug with the aircrack project, being sure to include that second screenshot. – solarshado Nov 24 '20 at 23:22
0

You're running make directly, not via an AUR helper/makepkg, right? Then it should be as simple as running:

$ make CC=clang
[loads of output here]
$ sudo make install CC=clang

instead of

$ make
[loads of output here]
$ sudo make install

While I doubt the make install step strictly needs CC set, it shouldn't hurt anything to include it.

This old answer explains the syntax and passing variable into make in more detail.

You might also need to install clang if you don't already have it; it doesn't look like it's part of Arch's base-devel group, I'm not sure about Manjaro.

  • I installed clang but when I type: make clang in the mdk4 folder I get make: *** No rule to make target 'clang'. Stop. I don't know, maybe the thing I found on github wasn't really a solution? – user443355 Nov 24 '20 at 18:46
  • sounds like you ran make clang instead of make CC=clang. the first tells make to try to build a target named "clang", which the error message helpfully informs you doesn't exist. the second tells make to build the default target with the variable CC set to clang, overriding whatever default it would have used. – solarshado Nov 24 '20 at 21:36
  • here I've attached 2 screenshots, if you want I can screenshot the entire code. – user443355 Nov 24 '20 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.