ROBOTIS-GIT / DynamixelSDK

ROBOTIS Dynamixel SDK (Protocol1.0/2.0)
http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/overview/
Apache License 2.0
461 stars 410 forks source link

Unable to build the librqry in Ubuntu 22.04 64 bit OS #607

Open sriranjanr opened 1 year ago

sriranjanr commented 1 year ago

ISSUE TEMPLATE ver. 1.2.0

Please fill this template for more accurate and prompt support.

  1. Which DYNAMIXEL SDK version do you use?

    • ex) latest download from robotis website
  2. Which programming language/tool do you use?

    • ex) C library folder in build folder
  3. Which operating system do you use?

    • ex) Ubuntu 22.04
  4. Have you searched the issue from the closed issue threads? yes

  5. Please describe the issue in detail I get the following errors when I try to compile the 64 bit library gcc -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -fPIC -g -c ../../src/dynamixel_sdk/group_bulk_read.c -o .objects/group_bulk_read.o gcc -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -fPIC -g -c ../../src/dynamixel_sdk/group_bulk_write.c -o .objects/group_bulk_write.o gcc -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -fPIC -g -c ../../src/dynamixel_sdk/group_sync_read.c -o .objects/group_sync_read.o gcc -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -fPIC -g -c ../../src/dynamixel_sdk/group_sync_write.c -o .objects/group_sync_write.o gcc -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -fPIC -g -c ../../src/dynamixel_sdk/packet_handler.c -o .objects/packet_handler.o gcc -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -fPIC -g -c ../../src/dynamixel_sdk/port_handler.c -o .objects/port_handler.o gcc -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -fPIC -g -c ../../src/dynamixel_sdk/protocol1_packet_handler.c -o .objects/protocol1_packet_handler.o gcc -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -fPIC -g -c ../../src/dynamixel_sdk/protocol2_packet_handler.c -o .objects/protocol2_packet_handler.o gcc -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -fPIC -g -c ../../src/dynamixel_sdk/port_handler_linux.c -o .objects/port_handler_linux.o g++ -shared -fPIC -o ./libdxl_x64_c.so ./.objects/group_bulk_read.o ./.objects/group_bulk_write.o ./.objects/group_sync_read.o ./.objects/group_sync_write.o ./.objects/packet_handler.o ./.objects/port_handler.o ./.objects/protocol1_packet_handler.o ./.objects/protocol2_packet_handler.o ./.objects/port_handler_linux.o -lrt /usr/bin/ld: ./.objects/group_bulk_write.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/packet_handler.h:82: multiple definition of packetData'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/packet_handler.h:82: first defined here /usr/bin/ld: ./.objects/group_bulk_write.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: multiple definition ofg_is_using'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: first defined here /usr/bin/ld: ./.objects/group_bulk_write.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: multiple definition of g_used_port_num'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: first defined here /usr/bin/ld: ./.objects/group_sync_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/packet_handler.h:82: multiple definition ofpacketData'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/packet_handler.h:82: first defined here /usr/bin/ld: ./.objects/group_sync_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: multiple definition of g_is_using'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: first defined here /usr/bin/ld: ./.objects/group_sync_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: multiple definition ofg_used_port_num'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: first defined here /usr/bin/ld: ./.objects/group_sync_write.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/packet_handler.h:82: multiple definition of packetData'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/packet_handler.h:82: first defined here /usr/bin/ld: ./.objects/group_sync_write.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: multiple definition ofg_is_using'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: first defined here /usr/bin/ld: ./.objects/group_sync_write.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: multiple definition of g_used_port_num'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: first defined here /usr/bin/ld: ./.objects/packet_handler.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/packet_handler.h:82: multiple definition ofpacketData'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/packet_handler.h:82: first defined here /usr/bin/ld: ./.objects/packet_handler.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: multiple definition of g_used_port_num'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: first defined here /usr/bin/ld: ./.objects/packet_handler.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: multiple definition ofg_is_using'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: first defined here /usr/bin/ld: ./.objects/port_handler.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: multiple definition of g_is_using'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: first defined here /usr/bin/ld: ./.objects/port_handler.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: multiple definition ofg_used_port_num'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: first defined here /usr/bin/ld: ./.objects/protocol1_packet_handler.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/packet_handler.h:82: multiple definition of packetData'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/packet_handler.h:82: first defined here /usr/bin/ld: ./.objects/protocol1_packet_handler.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: multiple definition ofg_is_using'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: first defined here /usr/bin/ld: ./.objects/protocol1_packet_handler.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: multiple definition of g_used_port_num'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: first defined here /usr/bin/ld: ./.objects/protocol2_packet_handler.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/packet_handler.h:82: multiple definition ofpacketData'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/packet_handler.h:82: first defined here /usr/bin/ld: ./.objects/protocol2_packet_handler.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: multiple definition of g_is_using'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: first defined here /usr/bin/ld: ./.objects/protocol2_packet_handler.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: multiple definition ofg_used_port_num'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: first defined here /usr/bin/ld: ./.objects/port_handler_linux.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: multiple definition of g_used_port_num'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:47: first defined here /usr/bin/ld: ./.objects/port_handler_linux.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: multiple definition ofg_is_using'; ./.objects/group_bulk_read.o:/media/dataPartition/marioArmano/sourceCode/DynamixelSDK-master/c/build/linux64/../../include/dynamixel_sdk/port_handler.h:48: first defined here collect2: error: ld returned 1 exit status make: *** [Makefile:69: libdxl_x64_c.so] Error 1

  6. How can we reproduce the issue?