danomatika / joyosc

(maintained) hid device to osc event daemon used in the robotcowboy project
http://robotcowboy.com
GNU General Public License v3.0
41 stars 2 forks source link

error while loading shared libraries: liblopack.so.0 on RasPi #9

Closed okyeron closed 3 years ago

okyeron commented 3 years ago

Device: Raspberry Pi 4 w/ 5.4.79-v7l+ (desktop)

With a fresh install - when I try to run joyosc, I get a shared libraries error for liblopack.so.0. However, if I run it from the binary in joyosc/src/joyosc it works.

liblopack.so.0 exists at /usr/local/lib/

Is this a build error somewhere?

pi@raspberrypi:~/joyosc $ joyosc -e
joyosc: error while loading shared libraries: liblopack.so.0: cannot open shared object file: No such file or directory
pi@raspberrypi:~/joyosc/src/joyosc $ ./joyosc -e
listening port:  7770
listening multicast group: none
listening addr:  /joyosc
sending ip:      127.0.0.1
sending port:    8880
sending address for notifications: /joyosc/notifications
sending address for devices:       /joyosc/devices
print events?:   yes
joysticks only?: no
sleep us:        10000
device addresses: 0
pi@raspberrypi:~/joyosc/src/joyosc $ ls -la /usr/local/lib/
total 7840
drwxr-xr-x  5 root root     4096 Aug 18 12:16 .
drwxr-xr-x 12 root root     4096 Aug 16 19:21 ..
-rw-r--r--  1 root root  1629348 Aug 18 12:16 liblopack.a
-rwxr-xr-x  1 root root      960 Aug 18 12:16 liblopack.la
lrwxrwxrwx  1 root root       18 Aug 18 12:16 liblopack.so -> liblopack.so.0.0.0
lrwxrwxrwx  1 root root       18 Aug 18 12:16 liblopack.so.0 -> liblopack.so.0.0.0
-rwxr-xr-x  1 root root   935184 Aug 18 12:16 liblopack.so.0.0.0
-rw-r--r--  1 root root  3411184 Aug 18 12:16 libtinyobject.a
-rwxr-xr-x  1 root root      984 Aug 18 12:16 libtinyobject.la
lrwxrwxrwx  1 root root       22 Aug 18 12:16 libtinyobject.so -> libtinyobject.so.0.0.0
lrwxrwxrwx  1 root root       22 Aug 18 12:16 libtinyobject.so.0 -> libtinyobject.so.0.0.0
-rwxr-xr-x  1 root root  2017632 Aug 18 12:16 libtinyobject.so.0.0.0
danomatika commented 3 years ago

I assume joyosc and lsjs are installed to /usr/local/bin?

okyeron commented 3 years ago

Yes indeed:

pi@raspberrypi:~/joyosc $ ls -la /usr/local/bin
total 23952
drwxr-xr-x  3 root root     4096 Aug 18 12:16 .
drwxr-xr-x 12 root root     4096 Aug 16 19:21 ..
-rwxr-xr-x  1 root root  5313092 Aug 18 12:16 joyosc
-rwxr-xr-x  1 root root   233160 Aug 18 12:16 lsjs
danomatika commented 3 years ago

Did you run configure with --prefix=/usr/local?

danomatika commented 3 years ago

It might be related to this SO post where ldconfig is not being run for some reason.

danomatika commented 3 years ago

Same here.

It seems you need to run sudo ldconfig on your system to add the installed helper libraries in /usr/local/lib to the lib cache. If that works, I can add the info to the readme. I don't think this step should be done automatically by make install as not all systems may require it.

okyeron commented 3 years ago

sudo ldconfig

Yes - That worked!

Now as expected:

pi@raspberrypi:~/joyosc/src/joyosc $ joyosc -e
listening port:  7770
listening multicast group: none
listening addr:  /joyosc
sending ip:      127.0.0.1
sending port:    8880
sending address for notifications: /joyosc/notifications
sending address for devices:       /joyosc/devices
print events?:   yes
joysticks only?: no
sleep us:        10000
device addresses: 0
danomatika commented 3 years ago

Ok thanks. I updated the readme.

danomatika commented 1 year ago

Note: This should no monger be a problem with joyosc 0.5.0+ as the tinyobject and lopack helper libraries are no longer used.