Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916540 - sys-power/nut-2.8.0-r2 Cannot load USB library (/usr/lib64/libusb-1.0.so) : file not found. USB search disabled.
Summary: sys-power/nut-2.8.0-r2 Cannot load USB library (/usr/lib64/libusb-1.0.so) : f...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-30 18:39 UTC by deim
Modified: 2023-10-30 18:50 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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