rhash / RHash

Great utility for computing hash sums
http://rhash.sf.net
BSD Zero Clause License
585 stars 116 forks source link

Cannot find `librhash.so.1` after installation with custom `—prefix` #239

Closed taprs closed 1 month ago

taprs commented 1 year ago

Hi and thanks for the tool!

I ran into error after running

./configure --prefix=${PWD} && make install

in the directory of the cloned repo. I cannot install into common directories due to access restrictions. As a result, the executable does not seem to detect the lib folder:

$ ./rhash
./rhash: error while loading shared libraries: librhash.so.1: cannot open shared object file: No such file or directory

Explicitly settint --libdir does not work too. Any ideas how to fix that?

rhash commented 1 year ago

It looks that librhash got installed as librhash.so.1.4.4 without the symlink librhash.so.1 -> librhash.so.1.4.4

On what OS did you encountered this bug?

rhash commented 1 year ago

Ok, I now see that you are installing rhash into the current directory.

You should link the librhash statically into the rhash binary by command:

./configure --enable-static=librhash --prefix=${PWD} && make install
PraveenAlexis commented 1 year ago

Hey, same thing happened to me.

I used ./configure && make install in Oracle Linux

I have a Prod and DEV envs, Prod is a clone of DEV fyi However Rhash works in Dev and not in Prod

later I found out that, Rhash bin and the lib are in /usr/local/bin and /usr/local/lib respectively. which is not detected by the OS

got it resolved by adding the paths to $PATH and $LD_LIBRARY_PATH

My question is why is that necessary? DEV env worked out of the box.