-
Notifications
You must be signed in to change notification settings - Fork 55
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
lmsensors: Add lib/ to explicit search path to .so loader #82
lmsensors: Add lib/ to explicit search path to .so loader #82
Conversation
This PR is missing any description and context. Please provide more information. |
@@ -399,6 +399,12 @@ link_lmsensors_libraries () | |||
dl1 = dlopen(path_name, RTLD_NOW | RTLD_GLOBAL); // Try to open that path. | |||
} | |||
|
|||
// Step 4: Try another explicit install default. | |||
if (dl1 == NULL && lmsensors_root != NULL) { // if root given, try it. | |||
snprintf(path_name, 1024, "%s/lib/libsensors.so", lmsensors_root); // PAPI Root check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use PATH_MAX
instead of a raw value for string length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall I update the num literal in the previous statements as well (line 398)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can update it in a separate commit or even a new PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated as requested with PATH_MAX
, and added commit to update the same for previous statement.
81f335c
to
5756dea
Compare
5756dea
to
03c4bef
Compare
This behaviour observed on ICL Leconte
Shows the output
The problem happens because the component searches for
libsensors.so
in$PAPI_LMSENSORS_ROOT/lib64
while the so exists in$PAPI_LMSENSORS_ROOT/lib
This PR fixes this problem by adding
lib
to the search path for the so file.After this fix the output of
papi_component_avail
shows