clab / lstm-parser

Transition-based dependency parser based on stack LSTMs
Apache License 2.0
204 stars 62 forks source link

Cannot open shared object file 'libboost_program_options.so.1.65.1' #23

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi,

I try to run the program on centos 7, and I don't have root privilege. The error message occurs when I execute ./parser/lstm-parse in the $HOME/lstm-parser/build directory:

./parser/lstm-parse: error while loading shared libraries: libboost_program_options.so.1.65.1: cannot open shared object file: No such file or directory

And the message during cmake .. -DEIGEN3_INCLUDE_DIR=$HOME/clib/eigen-eigen-5a0156e40feb/ is :

-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- program_options
-- serialization
-- Configuring done
-- Generating done
-- Build files have been written to: $HOME/lstm-parser/build

make -j 20 was also successful (without any error information, only warning on comparison between singed and unsigned).

I don't know what should I do now, any help would be appreciated !

miguelballesteros commented 6 years ago

Make sure that you have boost in your library path?

ghost commented 6 years ago

Thanks for you reply, but I am not sure what do you mean by "have boost in the library path", so I describe my env setting below:

I put eigen at $HOME/clib/eigen-eigen-5a0156e40feb. And BOOST_ROOT=$HOME/clib/boost is set (if it matters) .

And I have a $HOME/clib/boost_1_65_1/ directory, which is unzipped from boost_1_65_1.tar.bz2. Here I ran ./bootstrap.sh --prefix=$HOME/clib/boost and ./b2 install to get the $HOME/clib/boost. ls $HOME/clib/boost will get 2 directories inlcude/ lib/.

And I find a file in $HOME/lstm-parser/build/parser/CMakeFiles/lstm-parse.dir/DependInfo.cmake, and it has

set(CMAKE_CXX_TARGET_INCLUDE_PATH "../cnn" "$HOME/clib/boost_1_65_1" "$HOME/clib/eigen-eigen-5a0156e40feb" )

I don't know what it means, hope this will be helpful.

ldd parser/lstm-parse will get

linux-vdso.so.1 (0x00007fff879fe000) libboost_program_options.so.1.65.1 => not found libboost_serialization.so.1.65.1 => not found libstdc++.so.6 => $HOME/.linuxbrew/lib/libstdc++.so.6 (0x00002af9ce03a000) libm.so.6 => $HOME/.linuxbrew/lib/libm.so.6 (0x00002af9ce3f5000) libgcc_s.so.1 => $HOME/.linuxbrew/lib/libgcc_s.so.1 (0x00002af9ce6f8000) libc.so.6 => $HOME/.linuxbrew/lib/libc.so.6 (0x00002af9ce90f000) $HOME/.linuxbrew/lib/ld.so (0x00002af9cde15000)

I am new to all this stuff, so I might have made some stupid mistakes.....

miguelballesteros commented 6 years ago

I'm with the phone and I don't remember exactly the syntax but I think it should be like this:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:your boost lib path

ghost commented 6 years ago

[lijun@cu01 ~]$ echo $LD_LIBRARY_PATH /home/lijun/cuda/lib64/:/usr/local/cuda/lib64/:/home/lijun/clib/boost_1_65_1

[lijun@cu01 ~]$ echo $LD_LIBRARY_PATH /home/lijun/cuda/lib64/:/usr/local/cuda/lib64/:/home/lijun/clib/boost

[lijun@cu01 ~]$ echo $LD_LIBRARY_PATH /home/lijun/cuda/lib64/:/usr/local/cuda/lib64/:/home/lijun/clib/boost_1_65_1/boost

Well I tried to set it differently, but still get the same error.

miguelballesteros commented 6 years ago

/home/lijun/clib/boost_1_65_1/boost/lib

ghost commented 6 years ago

It works, thank you !!!!!!!!!!