DIGImend / hidrd

HID report descriptor I/O library and conversion tool
GNU General Public License v2.0
167 stars 29 forks source link

library is not found when execute the hid-convert in Ubuntu 14.04 and 16.04 after make install #19

Closed tonyho closed 6 years ago

tonyho commented 6 years ago

After install the program:

 ./bootstrap
 ./configure
 make
 sudo make install

When I try to run the program, it can't find the libraries: hidrd-convert: error while loading shared libraries: libhidrd_util.so.0: cannot open shared object file: No such file or directory

But I can verify the shared libraries is there:

$ find /usr/local/lib/* -name libhidrd_util.so*
/usr/local/lib/libhidrd_util.so
/usr/local/lib/libhidrd_util.so.0
/usr/local/lib/libhidrd_util.so.0.0.0

I have tested on Ubuntu 14.04 and 16.04:

$ uname -a
Linux hexiongjun-9020 4.4.0-96-generic #119~14.04.1-Ubuntu SMP Wed Sep 13 08:40:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$uname -a
Linux hexiongjun-vm 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

When I append the /usr/local/lib to the LD_LIBRARY_PATH env, the program would work fine.

Also, when running the make install, there're many warnings like this:

libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
spbnick commented 6 years ago

Have you tried running sudo ldconfig after installing hidrd?

tonyho commented 6 years ago

Yes, I tried, and it works now.