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

problem about "libnano" while compiling and methods to solve #4

Open
BIT-TYJ opened this issue Sep 5, 2022 · 2 comments
Open

problem about "libnano" while compiling and methods to solve #4

BIT-TYJ opened this issue Sep 5, 2022 · 2 comments

Comments

@BIT-TYJ
Copy link

BIT-TYJ commented Sep 5, 2022

Hello, someting goes wrong when I compile DiSCo-SLAM, in the following:
(1)Target "lio_sam_mapFusion" links to target "libnabo::nabo" but the target
was not found.

SOLVE:
I change:
# Map Fushion libnabo::nabo
add_executable(${PROJECT_NAME}_mapFusion src/DiSCo-SLAM/mapFusion.cpp)
add_dependencies(${PROJECT_NAME}_mapFusion ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(${PROJECT_NAME}_mapFusion ${catkin_LIBRARIES}
${PCL_LIBRARIES} libnabo::nabo}

to
# Map Fushion libnabo::nabo
add_executable(${PROJECT_NAME}_mapFusion src/DiSCo-SLAM/mapFusion.cpp)
add_dependencies(${PROJECT_NAME}_mapFusion ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(${PROJECT_NAME}_mapFusion ${catkin_LIBRARIES}
${PCL_LIBRARIES} nabo}

(2) the second problem is:
/usr/bin/ld: //usr/local/lib/libnabo.a(kdtree_cpu.cpp.o): undefined reference to symbol 'GOMP_parallel@@GOMP_4.0'
//usr/lib/x86_64-linux-gnu/libgomp.so.1: 无法添加符号: DSO missing from command line

SOLVE:
I change:
# Map Fushion libnabo::nabo
add_executable(${PROJECT_NAME}_mapFusion src/DiSCo-SLAM/mapFusion.cpp)
add_dependencies(${PROJECT_NAME}_mapFusion ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(${PROJECT_NAME}_mapFusion ${catkin_LIBRARIES}
${PCL_LIBRARIES} nabo}

to
# Map Fushion libnabo::nabo
add_executable(${PROJECT_NAME}_mapFusion src/DiSCo-SLAM/mapFusion.cpp)
add_dependencies(${PROJECT_NAME}_mapFusion ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(${PROJECT_NAME}_mapFusion ${catkin_LIBRARIES}
${PCL_LIBRARIES} nabo
gtsam fast_max-clique_finder scan_context "/usr/local/lib/libnabo.a" "/usr/lib/x86_64-linux-gnu/libgomp.so.1")

Then the compilation succeeded.

@YunjuanSUN
Copy link

YunjuanSUN commented Jan 12, 2023

I change

target_link_libraries(${PROJECT_NAME}_mapFusion ${catkin_LIBRARIES}
${PCL_LIBRARIES} libnabo::nabo}

to

target_link_libraries(${PROJECT_NAME}_mapFusion ${catkin_LIBRARIES}
${PCL_LIBRARIES} ${libnabo_LIBRARIES}
gtsam fast_max-clique_finder scan_context)

@haonimaqaq
Copy link

change
${PCL_LIBRARIES} libnabo::nabo}
to
${PCL_LIBRARIES} nabo
add
gtsam fast_max-clique_finder scan_context "/usr/local/lib/libnabo.a" "/usr/lib/x86_64-linux-gnu/libgomp.so.1")

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

3 participants