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

GCC flag -fcommon required with GCC v. 10.2.0 #4

Closed
abaldoni opened this issue Jan 31, 2023 · 1 comment
Closed

GCC flag -fcommon required with GCC v. 10.2.0 #4

abaldoni opened this issue Jan 31, 2023 · 1 comment

Comments

@abaldoni
Copy link

Hello, I'm currently building pound to run on Photon OS (VMware Linux container).
Photon OS ships with GCC 10.2.0: the assembly steps (ld) with the following error:

gcc -pthread -g -O2   -o poundctl poundctl.o ./libpound.a -lpthread -lssl -lcrypto -lresolv -ldl -lrt
/usr/bin/ld: ./libpound.a(json.o):/root/pound-4.4/src/pound.h:792: multiple definition of `progname'; poundctl.o:/root/pound-4.4/src/pound.h:792: first defined here
/usr/bin/ld: ./libpound.a(mem.o):/root/pound-4.4/src/pound.h:792: multiple definition of `progname'; poundctl.o:/root/pound-4.4/src/pound.h:792: first defined here
/usr/bin/ld: ./libpound.a(progname.o):/root/pound-4.4/src/./pound.h:792: multiple definition of `progname'; poundctl.o:/root/pound-4.4/src/pound.h:792: first defined here
/usr/bin/ld: ./libpound.a(tmpl.o):/root/pound-4.4/src/pound.h:792: multiple definition of `progname'; poundctl.o:/root/pound-4.4/src/pound.h:792: first defined here

Setting CFLAGS=-fcommon before running configure solves the problem.
The flags is reported on multiple source to be a change in the default behaviour of GCC v. 10 and above.

@graygnuorg
Copy link
Owner

Fixed in commit b12a4cb. No special flags needed. Thanks for reporting.

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

No branches or pull requests

2 participants