Repository navigation
Closed
Description
I'm running pkgsrc on OmniOS v11 r151022ax.
Currently on 2018Q1 with following package versions:
- ups-nut-2.6.5nb1
- ups-nut-usb-2.6.5nb3
- libusb-compat-0.1.6rc2
- libusb1-1.0.21
When running usbhid-ups directly (to debug), get this:
# /opt/local/libexec/nut/usbhid-ups
libusb-compat: error while loading libusb-1.0.so.0 from libusb-0.1.so.4: ld.so.1: usbhid-ups: fatal: libusb-1.0.so.0: open failed: No such file or directory
An ldd shows nothing weird:
# ldd /opt/local/libexec/nut/usbhid-ups
libusb-0.1.so.4 => /opt/local/lib//libusb-0.1.so.4
libdl.so.1 => /lib/64/libdl.so.1
libsocket.so.1 => /lib/64/libsocket.so.1
libnsl.so.1 => /lib/64/libnsl.so.1
libumem.so.1 => /lib/64/libumem.so.1
libssp.so.0 => /opt/local/gcc49/x86_64-sun-solaris2.11/lib/amd64/libssp.so.0
libc.so.1 => /lib/64/libc.so.1
libgcc_s.so.1 => /opt/local/gcc49/x86_64-sun-solaris2.11/lib/amd64/libgcc_s.so.1
libmp.so.2 => /lib/64/libmp.so.2
libmd.so.1 => /lib/64/libmd.so.1
libm.so.2 => /lib/64/libm.so.2
Finally got the root cause with truss:
# truss /opt/local/libexec/nut/usbhid-ups
...
stat("/opt/local/lib//\x09libusb-1.0.so.0", 0xFFFFFD7FFFDFECA0) Err#2 ENOENT
stat("/opt/local/gcc49/x86_64-sun-solaris2.11/lib/amd64/\x09libusb-1.0.so.0", 0xFFFFFD7FFFDFECA0) Err#2 ENOENT
stat("/opt/local/gcc49/lib/gcc/x86_64-sun-solaris2.11/4.9.4/\x09libusb-1.0.so.0", 0xFFFFFD7FFFDFECA0) Err#2 ENOENT
stat("/opt/local/lib/\x09libusb-1.0.so.0", 0xFFFFFD7FFFDFECA0) Err#2 ENOENT
stat("/lib/64/\x09libusb-1.0.so.0", 0xFFFFFD7FFFDFECA0) Err#2 ENOENT
stat("/usr/lib/64/\x09libusb-1.0.so.0", 0xFFFFFD7FFFDFECA0) Err#2 ENOENT
...
Hmm, it's looking for libusb-1.0 prefixed with ASCII 0x09 == HT == horizontal tab, no wonder I can't 'see' the problem!
I can work around this by doing:
# ln -s libusb-1.0.so.0 "`echo -e '\tlibusb-1.0.so.0'`"
And bingo, now it finds the library and errors normally:
# /opt/local/libexec/nut/usbhid-ups
Network UPS Tools - Generic HID driver 0.37 (2.6.5)
USB communication driver 0.31
Error: specifying '-a id' is now mandatory. Try -h for help.
Metadata
Metadata
Assignees
Labels
No labels
Activity
grip: update to 3.9.0
p5-Cpanel-JSON-XS: update to 4.06.
Update to 0.54. From the changelog:
jperkin commentedon Sep 6, 2018
Thanks for finding this, sorry it took so long to fix. This has been resolved and will be in 2018Q3.
libusb-compat: Update to 0.1.7.
devel/ruby-backports: update to 3.11.4
mail/ruby-mime-types: update to 3.2.2
gallery-dl: Update to 1.7.0
Update to 1.71.0
cups-filters: Update to 1.25.11
security/ruby-ruby-openid: update to 2.9.2
libsixel: update to 1.8.5. (security update)
mc: Update to 4.8.24
98 remaining items
devel/serie: update to 0.6.0
py-nh3: update to 0.3.4.
filesystems/fuse-bindfs: update to 1.18.4
py-nh3: update to 0.3.4.
filesystems/fuse-bindfs: update to 1.18.4
(textproc/R-data.table) Updated 1.16.4 to 1.18.4, Fix build against 4…
p5-XML-LibXML: update to 2.0213.
ocaml-zarith: update to 1.14
net/ttl: update to 0.21.0
net/xfr: update to 0.9.21
Version 4.8.33
bgpq4: Add version 1.16
misc/rozi: update to 0.0.29
libusb-compat: Update to 0.1.7.
misc/rozi: update to 0.0.29