Bug 2080235

Summary: Misleading errors about missing shared libraries when scanning
Product: [Fedora] Fedora Reporter: Dominik 'Rathann' Mierzejewski <dominik>
Component: hplipAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 35CC: jridky, tkorbar, twaugh, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hplip-3.22.4-1.fc36 hplip-3.22.4-1.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-03 03:07:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dominik 'Rathann' Mierzejewski 2022-04-29 10:08:07 UTC
Description of problem:
While scanning using xsane from a HP LaserJet M1132MFP device, I get error messages about libhpmud.so and libm.so not being found in the logs.

Version-Release number of selected component (if applicable):
hplip-3.22.2-1.fc35.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Run xsane
2. Select M1132MFP scanner device
3. Acquire preview

Actual results:
Apr 29 11:19:49 xsane[3637]: common/utils.c 249: unable to load library libhpmud.so: libhpmud.so: cannot open shared object file: No such file or directory
Apr 29 11:19:49 xsane[3637]: common/utils.c 249: unable to load library libm.so: /lib64/libm.so: invalid ELF header

Expected results:
No messages about library load failures.

Additional info:
It seems that the code attempts to load the .so file first and then falls back to loading .so.X in some places:

libhpmud.so:
https://fossies.org/linux/misc/legacy/hplip-3.22.2.tar.gz/hplip-3.22.2/scan/sane/marvell.c#l_63
https://fossies.org/linux/misc/legacy/hplip-3.22.2.tar.gz/hplip-3.22.2/scan/sane/soap.c#l_71

libm.so:
https://fossies.org/linux/misc/legacy/hplip-3.22.2.tar.gz/hplip-3.22.2/scan/sane/escl.c#l_47
https://fossies.org/linux/misc/legacy/hplip-3.22.2.tar.gz/hplip-3.22.2/scan/sane/marvell.c#l_70
https://fossies.org/linux/misc/legacy/hplip-3.22.2.tar.gz/hplip-3.22.2/scan/sane/soap.c#l_78
https://fossies.org/linux/misc/legacy/hplip-3.22.2.tar.gz/hplip-3.22.2/scan/sane/soapht.c#l_72

Comment 1 Zdenek Dohnal 2022-05-17 10:53:52 UTC
Hi Dominik,

I'm sorry for the late response and thank you for filing the bug!

The issue was a little tricky - we shipped libhpmud.so in hplip-libs in the past, but rpmlint was complaining about it so it was removed. The proper solution would be to have the file in -devel package, but then we would need to require -devel package during runtime, which is not ideal as well.

So in the end I've removed loading of unversioned .so files.

The commit is https://src.fedoraproject.org/rpms/hplip/c/297f625d957216cbfffbab984afbc76424f5e30f?branch=rawhide .

Comment 2 Fedora Update System 2022-06-01 12:55:25 UTC
FEDORA-2022-83d0e628a8 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-83d0e628a8

Comment 3 Fedora Update System 2022-06-01 13:20:14 UTC
FEDORA-2022-0ec7dd5c78 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-0ec7dd5c78

Comment 4 Fedora Update System 2022-06-02 01:19:42 UTC
FEDORA-2022-83d0e628a8 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-83d0e628a8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-83d0e628a8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2022-06-02 01:22:22 UTC
FEDORA-2022-0ec7dd5c78 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-0ec7dd5c78`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-0ec7dd5c78

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Dominik 'Rathann' Mierzejewski 2022-06-02 11:05:59 UTC
Confirmed fixed on F36, thanks!

Comment 7 Fedora Update System 2022-06-03 03:07:07 UTC
FEDORA-2022-83d0e628a8 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Zdenek Dohnal 2022-06-03 04:27:38 UTC
(In reply to Dominik 'Rathann' Mierzejewski from comment #6)
> Confirmed fixed on F36, thanks!

Thank you for checking this, Dominik!

Comment 9 Fedora Update System 2022-06-10 01:40:03 UTC
FEDORA-2022-0ec7dd5c78 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.