Robotics StackExchange | Archived questions

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.

Asked by bc524 on 2023-02-02 03:59:13 UTC

Comments

skipping incompatible /home/isp/liorf_ws/src/liorf/lib/libCommonLib.so when searching for -lCommonLib

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.

Running noetic on ubuntu 20.04:

on what platform?

Asked by gvdhoorn on 2023-02-02 05:03:08 UTC

@gvdhoom It's an Nvidia Jetson Orin (arm64).

Thank you for the input, I will try to contact the author about the issue.

Asked by bc524 on 2023-02-02 20:53:51 UTC

It's an Nvidia Jetson Orin (arm64).

well that would be the cause of your problem.

The .so file provided by the author is amd64.

Asked by gvdhoorn on 2023-02-03 02:34:07 UTC

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.

Asked by gvdhoorn on 2023-02-03 02:34:57 UTC

https://github.com/YJZLuckyBoy/liorf/issues/7

here's the link to the github discussion, but yeah, it doesn't seem to support arm64.

Asked by bc524 on 2023-02-07 00:09:31 UTC

Answers

@gvdhoorn. The author has updated the git to support arm64.

Asked by bc524 on 2023-02-16 02:59:23 UTC

Comments

Actually, looks like (s)he's removed the .so and just committed the sources for that library: YJZLuckyBoy/liorf@7e6242d5. That makes more sense in any case, especially seeing as there wasn't really anything very special in that library.

Asked by gvdhoorn on 2023-02-16 03:03:41 UTC