ld: skipping incompatible /.../libCommonLib.so when searching for -lCommonLib
Running noetic on ubuntu 20.04:
I'm trying to catkin_make the following github: https://github.com/YJZLuckyBoy/liorf
However, I'm getting this error that's causing it to fail:
/usr/bin/ld: skipping incompatible /home/isp/liorf_ws/src/liorf/lib/libCommonLib.so when searching for -lCommonLib
/usr/bin/ld: cannot find -lCommonLib
collect2: error: ld returned 1 exit status
make[2]: *** [liorf/CMakeFiles/liorf_imageProjection.dir/build.make:428: /home/isp/liorf_ws/devel/lib/liorf/liorf_imageProjection] Error 1
make[1]: *** [CMakeFiles/Makefile2:631: liorf/CMakeFiles/liorf_imageProjection.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: skipping incompatible /home/isp/liorf_ws/src/liorf/lib/libCommonLib.so when searching for -lCommonLib
/usr/bin/ld: cannot find -lCommonLib
collect2: error: ld returned 1 exit status
make[2]: *** [liorf/CMakeFiles/liorf_imuPreintegration.dir/build.make:440: /home/isp/liorf_ws/devel/lib/liorf/liorf_imuPreintegration] Error 1
make[1]: *** [CMakeFiles/Makefile2:1077: liorf/CMakeFiles/liorf_imuPreintegration.dir/all] Error 2
/usr/bin/ld: skipping incompatible /home/isp/liorf_ws/src/liorf/lib/libCommonLib.so when searching for -lCommonLib
/usr/bin/ld: cannot find -lCommonLib
collect2: error: ld returned 1 exit status
make[2]: *** [liorf/CMakeFiles/liorf_mapOptmization.dir/build.make:442: /home/isp/liorf_ws/devel/lib/liorf/liorf_mapOptmization] Error 1
make[1]: *** [CMakeFiles/Makefile2:543: liorf/CMakeFiles/liorf_mapOptmization.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
I'm not sure what its referring to by libCommonLib. It's mentioned in their cmake file for catkin, pcl and opencv but I can't seem to google what its actually trying to use.
# Range Image Projection
add_executable(${PROJECT_NAME}_imageProjection src/imageProjection.cpp)
add_dependencies(${PROJECT_NAME}_imageProjection ${catkin_EXPORTED_TARGETS}
${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(${PROJECT_NAME}_imageProjection libCommonLib.so ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES})
# Mapping Optimization
add_executable(${PROJECT_NAME}_mapOptmization src/mapOptmization.cpp)
add_dependencies(${PROJECT_NAME}_mapOptmization ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp)
target_compile_options(${PROJECT_NAME}_mapOptmization PRIVATE ${OpenMP_CXX_FLAGS})
target_link_libraries(${PROJECT_NAME}_mapOptmization libCommonLib.so Boost::timer ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} ${OpenMP_CXX_FLAGS} ${GeographicLib_LIBRARIES} gtsam)
# IMU Preintegration
add_executable(${PROJECT_NAME}_imuPreintegration src/imuPreintegration.cpp)
target_link_libraries(${PROJECT_NAME}_imuPreintegration libCommonLib.so Boost::timer ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} gtsam)
Any help would be greatly appreciated.
you'll have to ask the author/developer about this.
The
.so
he ships with his software in the repository is not compatible with your OS/glibc
/platform/architecture.There isn't really anything else we can say.
Note btw: this is not a
catkin_make
problem. GCC (specifically the linker) just cannot link your executable.Catkin is not involved here.
on what platform?
@gvdhoom It's an Nvidia Jetson Orin (arm64).
Thank you for the input, I will try to contact the author about the issue.
well that would be the cause of your problem.
The
.so
file provided by the author isamd64
.If you decide to post an issue on their tracker, please post a comment here with a link to that issue here. That way we can keep things connected.
https://github.com/YJZLuckyBoy/liorf/...
here's the link to the github discussion, but yeah, it doesn't seem to support arm64.