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

failed to link lcm library #14

Open
Daichou opened this issue Jul 27, 2018 · 2 comments
Open

failed to link lcm library #14

Daichou opened this issue Jul 27, 2018 · 2 comments

Comments

@Daichou
Copy link

Daichou commented Jul 27, 2018

enviroment:

  • Ubuntu 16.04
  • Linux 4.15.0-29-generic

Error Message

I try to install openni2-camera-lcm library.
First, I build lcm from source.
And then,when I build openni2-camera-lcm,I get following error.

[  0%] Built target lcmgen_cpp
[  7%] Built target usb-reset
[  7%] Built target lcmgen_c
[  7%] Built target lcmgen_python
[  7%] Built target lcmgen_java
[ 15%] Building CXX object CMakeFiles/openni2_wrapper.dir/src/openni2_frame_listener.cpp.o
[ 15%] Building CXX object CMakeFiles/openni2_wrapper.dir/src/openni2_device_manager.cpp.o
[ 19%] Building CXX object CMakeFiles/openni2_wrapper.dir/src/openni2_device.cpp.o
Scanning dependencies of target lcmtypes_openni2
[ 23%] Generating ../lcmtypes/java/openni2/images_t.class, ../lcmtypes/java/openni2/image_t.class, ../lcmtypes/java/openni2/image_metadata_t.class
[ 26%] Building C object CMakeFiles/lcmtypes_openni2.dir/lcmtypes/c/lcmtypes/openni2_image_metadata_t.c.o
[ 30%] Building C object CMakeFiles/lcmtypes_openni2.dir/lcmtypes/c/lcmtypes/openni2_image_t.c.o
[ 34%] Building C object CMakeFiles/lcmtypes_openni2.dir/lcmtypes/c/lcmtypes/openni2_images_t.c.o
[ 38%] Linking C static library lib/liblcmtypes_openni2.a
[ 38%] Built target lcmtypes_openni2
warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warning
[ 42%] Generating lcmtypes_openni2.jar
[ 42%] Built target lcmtypes_openni2_jar
[ 46%] Linking CXX static library lib/libopenni2_wrapper.a
[ 69%] Built target openni2_wrapper
Scanning dependencies of target test-wrapper
Scanning dependencies of target openni2_driver_lib
[ 73%] Building CXX object CMakeFiles/test-wrapper.dir/test/test_wrapper.cpp.o
[ 76%] Building CXX object CMakeFiles/openni2_driver_lib.dir/src/openni2_driver.cpp.o
[ 80%] Linking CXX executable bin/list-devices
[ 84%] Built target list-devices
[ 88%] Linking CXX executable bin/test-wrapper
[ 88%] Built target test-wrapper
[ 92%] Linking CXX static library lib/libopenni2_driver_lib.a
[ 92%] Built target openni2_driver_lib
Scanning dependencies of target openni2-camera-lcm
[ 96%] Building CXX object CMakeFiles/openni2-camera-lcm.dir/ros/openni2_camera_node.cpp.o
[100%] Linking CXX executable bin/openni2-camera-lcm
/usr/bin/ld: cannot find -llcm::lcm
collect2: error: ld returned 1 exit status
CMakeFiles/openni2-camera-lcm.dir/build.make:108: recipe for target 'bin/openni2-camera-lcm' failed
make[2]: *** [bin/openni2-camera-lcm] Error 1
CMakeFiles/Makefile2:105: recipe for target 'CMakeFiles/openni2-camera-lcm.dir/all' failed
make[1]: *** [CMakeFiles/openni2-camera-lcm.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error

Maybe,we sould modify CMakeLists.txt line:72,update target_link_libraries(openni2-camera-lcm lcm:lcm) to target_link_libraries(openni2-camera-lcm lcm) ?

@wxmerkt
Copy link
Member

wxmerkt commented Jul 27, 2018

I dont think we have used this with LCM newer than 1.3.1-lts - i.e. before the exported targets were introduced. So if you use LCM master, yes you need to change that line.

@Daichou
Copy link
Author

Daichou commented Jul 27, 2018

Thanks for your reply.
I will change that line myself.

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

2 participants