ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Shared library not found when run from install space

asked 2019-01-04 15:05:30 -0600

I am trying to install ROS packages on a system using the catkin_make install command. Everything builds just fine. Also, when running from the devel space, everything works as expected. However, when running from the install space I get the following runtime error:

/home/pr2/ros_ws/install/lib/glugun_laserscanner/glugun_seamfinder_service: error while loading shared libraries: libtensorflow_all.so: cannot open shared object file: No such file or directory

I know where this shared library and the corresponding header files are located, as can be seen when I print the TensorFlow_INCLUDE_DIRS and TensorFlow_LIBRARIES in glugun_laserscanner/CMakeLists.txt.

${TensorFlow_INCLUDE_DIRS}
/home/pr2/TensorFlow/TF_GPU_1_3/tensorflow_bymake/tensorflowinstall/include/google/tensorflow
${TensorFlow_LIBRARIES}
/home/pr2/TensorFlow/TF_GPU_1_3/tensorflow_bymake/tensorflowinstall/lib/libtensorflow_all.so

I've tried "installing" them along with all the other stuff from my catkin packages. However, I'm a novice and haven't been able to get it to work. Note, I largely followed these instructions to build tensorflow (and protobuf and eigen) for use in a cmake project, except I installed them locally instead of system wide.

Any help at getting past the above error would be greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-01-04 15:14:54 -0600

I just solved the issue. I copied the contents of the tensorflowinstall/include and tensorflowinstall/lib folders to /usr/include and /usr/lib, respectively, and it worked just fine. Not sure if this is the best way to do it. But, it worked.

edit flag offensive delete link more

Comments

1

Not sure if this is the best way to do it

No, that is definitely not a good way to do this.

You're circumventing your platform's package manager and copying files to system-managed directories.

gvdhoorn gravatar image gvdhoorn  ( 2019-01-04 16:05:54 -0600 )edit

I am having the same problem, how can it be done using the CMakeList install command?

I tried with this but it didn't work

install(TARGETS
    my_package
    ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
    LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
    RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
rezenders gravatar image rezenders  ( 2021-04-05 12:01:31 -0600 )edit

Question Tools

Stats

Asked: 2019-01-04 15:05:30 -0600

Seen: 702 times

Last updated: Jan 04 '19