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

V2.3.4 make fails on bullseye - multiple definition of `_commands' #285

Closed
ballle98 opened this issue May 2, 2024 · 6 comments · May be fixed by #286
Closed

V2.3.4 make fails on bullseye - multiple definition of `_commands' #285

ballle98 opened this issue May 2, 2024 · 6 comments · May be fixed by #286

Comments

@ballle98
Copy link
Contributor

ballle98 commented May 2, 2024

Similar to issue #185. With older versions of gcc you could have duplicate definitions of global variables as long as they are only reference in the files they are defined in. This is no longer allowed and you need to make them static

pi@raspberrypi:~/git/AqualinkD $ make
OS: 11 (bullseye)
GLIBC build with: ldd (Debian GLIBC 2.31-13+rpt2+rpi1+deb11u8) 2.31
GLIBC Prefered  : 2.24-11+deb9u1 2.24
gcc -Wall -O3  -D AQ_PDA -D AQ_ONETOUCH -D AQ_IAQTOUCH -D AQ_RS16 -D AQ_MANAGER -D MG_ENABLE_HTTP_SSI=0 -D MG_ENABLE_DIRECTORY_LISTING=0 -D MG_ENABLE_HTTP_CGI=0  -o release/aqualinkd build/aqualinkd.o build/utils.o build/config.o build/aq_serial.o build/aq_panel.o build/aq_programmer.o build/net_services.o build/json_messages.o build/rs_msg_utils.o build/devices_jandy.o build/packetLogger.o build/devices_pentair.o build/color_lights.o build/serialadapter.o build/aq_timer.o build/aq_scheduler.o build/web_config.o build/serial_logger.o build/mongoose.o build/simulator.o build/timespec_subtract.o build/pda.o build/pda_menu.o build/pda_aq_programmer.o build/onetouch.o build/onetouch_aq_programmer.o build/iaqtouch.o build/iaqtouch_aq_programmer.o -lpthread -lm -lsystemd
/usr/bin/ld: build/simulator.o:(.bss+0x4): multiple definition of `_commands'; build/aq_programmer.o:(.bss+0x8): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:194: release/aqualinkd] Error 1

@sfeakes
Copy link
Owner

sfeakes commented May 2, 2024

This is already fixed in the current dev branch.

@ballle98
Copy link
Contributor Author

ballle98 commented May 2, 2024

ok I don't see it in the diff master...PDA-Update

@john-kapp
Copy link

How do I go about cloning the git branch with this fix? I cloned the default branch as well as the PDA-Update branch and I get the ld error on both. Thanks very much for this project!

@sfeakes
Copy link
Owner

sfeakes commented May 12, 2024

The PDA-Update is not ready for prime time yet, so best you go back to the main / default branch.

Run the below command in whatever directory contains simulator.c on your machine, That will modify the file to how it should be.
sed -i 's/_commands/_sim_commands/g' simulator.c

@john-kapp
Copy link

The sed command worked. Thank you.

@ballle98
Copy link
Contributor Author

fixed with 675b0f5

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

Successfully merging a pull request may close this issue.

3 participants