Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 916540

Summary: sys-power/nut-2.8.0-r2 Cannot load USB library (/usr/lib64/libusb-1.0.so) : file not found. USB search disabled.
Product: Gentoo Linux Reporter: deim <deim>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: UNCONFIRMED ---    
Severity: normal CC: floppym, prometheanfire, proxy-maint, web
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description deim 2023-10-30 18:39:29 UTC
nut-scanner can't load /usr/lib64/libusb-1.0.so

Reproducible: Always

Steps to Reproduce:
1. install sys-power/nut-2.8.0-r2
2. run nut-scanner
Actual Results:  
Cannot load USB library (/usr/lib64/libusb-1.0.so) : file not found. USB search disabled.

Expected Results:  
Successful Scanning USB bus.

Found:
# cat /usr/lib64/libusb-1.0.so
/* GNU ld script
   Since Gentoo has critical dynamic libraries in /lib, and the static versions
   in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we
   run into linking problems.  This "fake" dynamic lib is a linker script that
   redirects the linker to the real lib.  And yes, this works in the cross-
   compiling scenario as the sysroot-ed linker will prepend the real path.

   See bug https://bugs.gentoo.org/4411 for more info.
 */

GROUP ( /lib64/libusb-1.0.so.0 )


I made symlink to ln -s /lib64/libusb-1.0.so.0 /usr/lib64/libusb-1.0.so
Now scan is successful but don't know is any side effects occurs.
Comment 1 Mike Gilbert gentoo-dev 2023-10-30 18:44:22 UTC
Is it trying to dlopen() libusb?
Comment 2 Mike Gilbert gentoo-dev 2023-10-30 18:50:25 UTC
Looks like it tries to dlopen "libusb-1.0.so" instead of using the proper soname "libusb-1.0.so.0".

https://github.com/networkupstools/nut/blob/v2.8.0/tools/nut-scanner/nutscan-init.c#L136