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

Compilation fails with gcc-10 #216

yarda opened this issue Feb 10, 2020 · 0 comments

Compilation fails with gcc-10 #216

yarda opened this issue Feb 10, 2020 · 0 comments


Copy link

@yarda yarda commented Feb 10, 2020

/usr/bin/ld: mausezahn/cdp.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mz.h:498: multiple definition of `tx'; mausezahn/automops.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mz.h:498: first defined here
/usr/bin/ld: mausezahn/cdp.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mz.h:288: multiple definition of `mz_start'; mausezahn/automops.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mz.h:288: first defined here
/usr/bin/ld: mausezahn/cdp.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mz.h:287: multiple definition of `total_d'; mausezahn/automops.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mz.h:287: first defined here
/usr/bin/ld: mausezahn/cdp.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mz.h:280: multiple definition of `verbose'; mausezahn/automops.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mz.h:280: first defined here
/usr/bin/ld: mausezahn/cdp.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mz.h:279: multiple definition of `quiet'; mausezahn/automops.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mz.h:279: first defined here
/usr/bin/ld: mausezahn/cdp.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mops.h:691: multiple definition of `mp_head'; mausezahn/automops.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mops.h:691: first defined here
/usr/bin/ld: mausezahn/cdp.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mops.h:249: multiple definition of `amp_head'; mausezahn/automops.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mops.h:249: first defined here
/usr/bin/ld: mausezahn/cdp.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mops.h:118: multiple definition of `max_frame_s'; mausezahn/automops.o:/builddir/build/BUILD/netsniff-ng-0.6.6/staging/mops.h:118: first defined here

This is caused by a change in GCC 10 defaults from -fcommon to -fno-common [1]:

GCC now defaults to -fno-common. As a result, global variable accesses are more efficient on various targets. In C, global variables with multiple tentative definitions now result in linker errors. With -fcommon such definitions are silently merged during linking.

If compiled with -fcommon it builds OK. The better solution is to fix the code to define the variables just once.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.