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

Linux build error #102

Open
alandelira opened this issue Mar 22, 2023 · 1 comment
Open

Linux build error #102

alandelira opened this issue Mar 22, 2023 · 1 comment

Comments

@alandelira
Copy link

When trying to compile ingenialink on Ubuntu 22.04 I'm getting the following error in the linking step. Any suggestions here?

[ 92%] Linking C shared library libingenialink.so /usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/servo.c.o:(.bss+0x0): multiple definition of il_net_monitoring_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/servo.c.o:(.bss+0x40): multiple definition of il_net_disturbance_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x40): first defined here /usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/base/net.c.o:(.bss+0x0): multiple definition of il_net_monitoring_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/base/net.c.o:(.bss+0x40): multiple definition of il_net_disturbance_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x40): first defined here /usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/base/servo.c.o:(.bss+0x0): multiple definition of il_net_monitoring_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/base/servo.c.o:(.bss+0x40): multiple definition of il_net_disturbance_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x40): first defined here /usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/eth/net.c.o:(.bss+0x0): multiple definition of il_net_monitoring_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/eth/net.c.o:(.bss+0x40): multiple definition of il_net_disturbance_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x40): first defined here /usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/eth/servo.c.o:(.bss+0x0): multiple definition of il_net_monitoring_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/eth/servo.c.o:(.bss+0x40): multiple definition of il_net_disturbance_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x40): first defined here /usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/ecat/net.c.o:(.bss+0x0): multiple definition of il_net_monitoring_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/ecat/net.c.o:(.bss+0x40): multiple definition of il_net_disturbance_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x40): first defined here /usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/ecat/servo.c.o:(.bss+0x0): multiple definition of il_net_monitoring_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/ingenialink.dir/ingenialink/ecat/servo.c.o:(.bss+0x40): multiple definition of il_net_disturbance_mapping_register'; CMakeFiles/ingenialink.dir/ingenialink/net.c.o:(.bss+0x40): first defined here collect2: error: ld returned 1 exit status gmake[2]: *** [CMakeFiles/ingenialink.dir/build.make:835: libingenialink.so] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:104: CMakeFiles/ingenialink.dir/all] Error 2 gmake: *** [Makefile:156: all] Error 2

@alandelira
Copy link
Author

Okay there are global variables (il_net_monitoring_mapping_register and il_net_disturbance_mapping_register) in include/ingenialink/net.h and after commenting them out the linker is fine.

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

1 participant