strands-project/v4r

libhdf5.so linker error

Closed this issue · 1 comments

I am building v4r from gitlab(https://rgit.acin.tuwien.ac.at/v4r/v4r).
I run setup.sh and passed cmake with warnings below.

CMake Warning at apps/DemoTemporalPointCloudFilter/CMakeLists.txt:63 (add_executable):
Cannot generate a safe runtime search path for target
demoTemporalPointCloudFilter because there is a cycle in the constraint
graph:

dir 0 is [/home/gisen/lib/v4r/build/lib]
dir 1 is [/home/gisen/lib/v4r/build/3rdparty/ceres/install/lib]
dir 2 is [/usr/lib/x86_64-linux-gnu/hdf5/serial/lib]
dir 3 must precede it due to runtime library [libhdf5.so]
dir 3 is [/usr/lib/x86_64-linux-gnu/hdf5/openmpi/lib]
dir 2 must precede it due to runtime library [libhdf5.so]
dir 4 is [/usr/lib/openmpi/lib]
dir 5 is [/home/gisen/lib/v4r/build/3rdparty/radical/install/lib]

Some of these libraries may not be found correctly.

Next, I run make command and it fails.
("/usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5.s"o exists on my PC/)

make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5.so', needed by 'lib/libv4r_common.so.2.0.8'. Stop.
CMakeFiles/Makefile2:916: recipe for target 'modules/common/CMakeFiles/v4r_common.dir/all' failed
make[1]: *** [modules/common/CMakeFiles/v4r_common.dir/all] Error 2

I tried to install hdf5 from source, it does't help.
What shall I do ?

I run command "ldconfig -p |grep libhdf5.so" and got below.

libhdf5.so.1000 (libc6,x86-64) => /usr/local/lib/libhdf5.so.1000
libhdf5.so (libc6,x86-64) => /usr/local/lib/libhdf5.so

Then, i did this command in build directory.

find . -name ".make" | xargs sed -i 's@/usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5.so@/usr/local/lib/libhdf5.so@g'
find . -name "
.make" | xargs sed -i 's@/usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5_hl.so@/usr/local/lib/libhdf5_hl.so@g'
find . -name ".make" | xargs sed -i 's@/usr/lib/x86_64-linux-gnu/hdf5/openmpi/lib/libhdf5.so@/usr/local/lib/libhdf5.so@g'
find . -name "
.make" | xargs sed -i 's@/usr/lib/x86_64-linux-gnu/hdf5/openmpi/lib/libhdf5.so@/usr/local/lib/libhdf5.so@g'

It works for me. Thank you.