Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GCC10 FTBFS by using the not-default-anymore CFLAG '-fcommon' #58

Merged
merged 1 commit into from
Jul 27, 2020
Merged

Fix GCC10 FTBFS by using the not-default-anymore CFLAG '-fcommon' #58

merged 1 commit into from
Jul 27, 2020

Conversation

samueloph
Copy link
Contributor

TODO: Remove '-fcommon' from CFLAGS and address issues, reference:
Reference: https://gcc.gnu.org/gcc-10/porting_to.html#common

This commits closes #51, closes #54 and closes #56

 TODO: Remove '-fcommon' from CFLAGS and address issues, reference:
 Reference: https://gcc.gnu.org/gcc-10/porting_to.html#common

 This commits closes #51, closes #54 and closes #56
@samueloph samueloph changed the title Fixes GCC10 FTBFS by using the not-default-anymore CFLAG '-fcommon' Fix GCC10 FTBFS by using the not-default-anymore CFLAG '-fcommon' Jul 25, 2020
@samueloph
Copy link
Contributor Author

This patch is being used in the current mdk4 package on Debian, versioned 4.1+git20200420-2

@E7mer E7mer merged commit f622b91 into aircrack-ng:master Jul 27, 2020
@PhiLosove
Copy link

PhiLosove commented Oct 25, 2020

I use Ubuntu 20.10 and I got still the same issue like #51 , #54 and #56 .
If I type make -j4

/usr/bin/ld: attacks/auth_dos.o:/opt/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/beacon_flood.o:/opt/mdk4/src/attacks/beacon_flood.c:34: multiple definition of `bssid'; attacks/auth_dos.o:/opt/mdk4/src/attacks/auth_dos.c:50: first defined here
/usr/bin/ld: attacks/beacon_flood.o:/opt/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/countermeasures.o:/opt/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/deauth.o:/opt/mdk4/src/attacks/deauth.c:19: multiple definition of `bssid'; attacks/auth_dos.o:/opt/mdk4/src/attacks/auth_dos.c:50: first defined here
/usr/bin/ld: attacks/deauth.o:/opt/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/dummy.o:/opt/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/eapol.o:/opt/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/fuzzer.o:/opt/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/ieee80211s.o:/opt/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/probing.o:/opt/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/wids.o:/opt/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/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 '/opt/mdk4/src'
make: *** [Makefile:10: all] Error 2

Even if I use make CC=clang -j4

1 warning generated.
/usr/bin/ld: attacks/auth_dos.o:/opt/mdk4/src/attacks/./attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.c:6: first defined here
/usr/bin/ld: attacks/beacon_flood.o:/opt/mdk4/src/attacks/./attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.c:6: first defined here
/usr/bin/ld: attacks/beacon_flood.o:/opt/mdk4/src/attacks/beacon_flood.c:34: multiple definition of `bssid'; attacks/auth_dos.o:/opt/mdk4/src/attacks/auth_dos.c:50: first defined here
/usr/bin/ld: attacks/countermeasures.o:/opt/mdk4/src/attacks/./attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.c:6: first defined here
/usr/bin/ld: attacks/deauth.o:/opt/mdk4/src/attacks/./attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.c:6: first defined here
/usr/bin/ld: attacks/deauth.o:/opt/mdk4/src/attacks/deauth.c:19: multiple definition of `bssid'; attacks/auth_dos.o:/opt/mdk4/src/attacks/auth_dos.c:50: first defined here
/usr/bin/ld: attacks/dummy.o:/opt/mdk4/src/attacks/./attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.c:6: first defined here
/usr/bin/ld: attacks/eapol.o:/opt/mdk4/src/attacks/./attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.c:6: first defined here
/usr/bin/ld: attacks/fuzzer.o:/opt/mdk4/src/attacks/./attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.c:6: first defined here
/usr/bin/ld: attacks/ieee80211s.o:/opt/mdk4/src/attacks/./attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.c:6: first defined here
/usr/bin/ld: attacks/probing.o:/opt/mdk4/src/attacks/./attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.c:6: first defined here
/usr/bin/ld: attacks/wids.o:/opt/mdk4/src/attacks/./attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/opt/mdk4/src/attacks/attacks.c:6: first defined here
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:38: mdk4] Error 1
make[1]: Leaving directory '/opt/mdk4/src'
make: *** [Makefile:10: all] Error 2

With Ubuntu 20.04 there were no problems like this, is it problem with Ubuntu 20.10?
I am just a novice, ready to learn.

EDIT:

Today I tried to install mdk4 on another laptop with Ubuntu 20.10 and still the same error.

@PhiLosove
Copy link

PhiLosove commented Oct 27, 2020

Okay, da niemand Lust hat zu antworten und ich die Lösung selber herausgefunden habe, hier alles auf Deutsch:
Der Unterschied zwischen Ubuntu 20.04 und 20.10 ist unter anderem die gcc-Kompiler-Version. 20.04 verwendet gcc-9 und 20.10 gcc-10.
Also habe ich gcc-9 installiert und unter Ubuntu 20.10 beim kompillieren make CC=gcc-9 -j4 angegeben, ebenso bei make CC=gcc-9 install.

Solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants