Closed chloeyin closed 6 months ago
I don't think adding -rpath
might help the users of grocksdb. I did not use linuxbrew yet, can not give recommendation to fix your issue without adding -rpath
.
@yihuang might help 🤔
Just set the export LD_LIBRARY_PATH=/home/linuxbrew/.linuxbrew/lib
when running it?
Thanks, it's another option.
I tried to build the go program with RocksDB installed not in the default libraray search path and met the below problem. I'm using Linux Homebrew to manage my RocksDB library.
Using the doc's command
The output from
ldd
is:This is the library from the
-L
pathSince during the build time, it is able to resolve the library
librocksdb.so.8
from theSONAME
, the problem should be related to the runtime library resolve.So, for those who doesn't put library in the default search path, should we suggest them add
-rpath
when compiling the go program? After specifying-rpath
The ldd output is ok.
I'm not sure if there is some problem with my machine, at least this is the only solution for me. Also, I search for the issue but don't find any solutions, so just raise it here :). But I think this works only if we build and run on the same machine, doc this point may help.