ros-naoqi / naoqi_driver

c++ bridge based on libqi
Apache License 2.0
51 stars 93 forks source link

catkin error on jetson TX2 #142

Closed xiejialong closed 2 years ago

xiejialong commented 3 years ago

When I compile the package naoqi_driver on Jetson TX2 with kinetic, a catkin error is reported as follows:

[100%] Built target naoqi_driver_module /opt/ros/kinetic/lib/libqi.so: undefined reference to __atomic_compare_exchange_16' /opt/ros/kinetic/lib/libqi.so: undefined reference toatomic_store_16' /opt/ros/kinetic/lib/libqi.so: undefined reference to `atomic_load_16' collect2: error: ld returned 1 exit status naoqi_driver/CMakeFiles/naoqi_driver_node.dir/build.make:182: recipe for target '/home/nvidia/catkin_ws/devel/lib/naoqi_driver/naoqi_driver_node' failed make[2]: [/home/nvidia/catkin_ws/devel/lib/naoqi_driver/naoqi_driver_node] Error 1 CMakeFiles/Makefile2:477: recipe for target 'naoqi_driver/CMakeFiles/naoqi_driver_node.dir/all' failed make[1]: [naoqi_driver/CMakeFiles/naoqi_driver_node.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2

I guess whether because of the arm64 for TX2? . In contrast, the package can be compiled in my common computer

mbusy commented 3 years ago

Hi, indeed the arm architecture makes the compilation of the naoqi ros stack quite interesting on a Jetson TX2 😄 I understand from your message that you managed to compile the naoqi-libqi and naoqi-libqicore packages for the Jetson?

xiejialong commented 3 years ago

yes, several io files cannot be compiled on Jetson TX2. sometimes, some other software also exists this problem.

mbusy commented 3 years ago

I think that this issue could contain the solution to your problem (the libqi patch mentioned in the comment in particular). Adding the following line:

find_package(GccAtomic)

To the CMakeLists.txt of naoqi-libqi and recompiling the package might do the trick. Is the naoqi-libqi package in your current catkin workspace?

mbusy commented 3 years ago

Also, you will need to add this FindGccAtomic.cmake file (attached, change the extension from txt to cmake) FindGccAtomic.txt , under a cmake folder at the root of the naoqi-libqi package

xiejialong commented 3 years ago

Thank you very much for your suggestion. Once I go back to my Lab, I will certainly try it and tell you the result. 😁

mbusy commented 2 years ago

@xiejialong any updates? If not I'll close the issue for now

xiejialong commented 2 years ago

I haven’t any updates. Thanks

mbusy commented 2 years ago

Alright, I'll close the issue