Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dlopen issue for libsensors5 in Debian Buster, Bullseye #391

Merged
merged 1 commit into from
Dec 13, 2020

Conversation

fasterit
Copy link
Member

libsensors.so is provided only by the -dev package, so search for
libsensors.so.5 (installed from the libsensors5 package) explicitly

see: dpkg-query -S libsensors.so

libsensors.so is provided only by the -dev package, so search for
libsensors.so.5 (installed from the libsensors5 package) explicitly

see: dpkg-query -S libsensors.so
Comment on lines +24 to +30
dlopenHandle = dlopen("libsensors.so.", RTLD_LAZY);
if (!dlopenHandle) {
/* Debian contains no unversioned .so in libsensors5, only in the -dev package, so work around that: */
dlopenHandle = dlopen("libsensors.so.5", RTLD_LAZY);
if (!dlopenHandle)
goto dlfailure;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dlopenHandle = dlopen("libsensors.so.", RTLD_LAZY);
if (!dlopenHandle) {
/* Debian contains no unversioned .so in libsensors5, only in the -dev package, so work around that: */
dlopenHandle = dlopen("libsensors.so.5", RTLD_LAZY);
if (!dlopenHandle)
goto dlfailure;
}
/* Debian: workaround for unversioned .so for libsensors5 being present only in -dev package */
dlopenHandle = dlopen("libsensors.so.", RTLD_LAZY);
if (!dlopenHandle)
dlopenHandle = dlopen("libsensors.so.5", RTLD_LAZY);
if (!dlopenHandle)
goto dlfailure;

Copy link
Member

@cgzones cgzones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cgzones cgzones added this to the 3.0.4 milestone Dec 13, 2020
@fasterit fasterit merged commit f8a610e into htop-dev:master Dec 13, 2020
@fasterit fasterit deleted the fix-dlopen-libsensors-debian branch January 10, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants