Skip to content

Remember shared-object file names seen during build for later run-time dlopen() preference#2504

Merged
jimklimov merged 10 commits intonetworkupstools:masterfrom
jimklimov:issue-2431
Jul 3, 2024
Merged

Remember shared-object file names seen during build for later run-time dlopen() preference#2504
jimklimov merged 10 commits intonetworkupstools:masterfrom
jimklimov:issue-2431

Conversation

@jimklimov
Copy link
Copy Markdown
Member

This change allows to remember string values of library names (and full paths) seen during build, and prefer them over bland libsomething.so symlinks which may be not even available in non-dev packages on some systems. Addresses most of issue #2431

One remaining bit is the name of our own libupsclient.so/dll/...

Maybe the logic put into m4 now should become a standalone shell script, to generate a #define one-line header after we build our library?..

This should also be applied to DMF branch (loads more libs in other code paths).

jimklimov added 8 commits July 2, 2024 11:11
…logic once

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…* for nut-scanner third-party libs [networkupstools#2431]

libavahi, libfreeipmi, libneon, libnetsnmp, libusb0/1

NOTE: The libnutclient is separate, we build it - so can not
detect the final name in advance right here

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…MacOS Darwin "*.dylib" extension [networkupstools#2431]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ame` includes path separator character(s) [networkupstools#2431]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…pdate comments [networkupstools#2431]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…H_LIB discovered libraries [networkupstools#2431]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov added packaging nut-scanner portability We want NUT to build and run everywhere possible DMF NUT Data/Dynamic Mapping File/Format/Functionality feature impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) labels Jul 2, 2024
@jimklimov jimklimov added this to the 2.8.3 milestone Jul 2, 2024
jimklimov added 2 commits July 2, 2024 22:34
…ify packaging [networkupstools#2431]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…en discovering libraries [networkupstools#2431]

At least MacOS with Homebrew seems puts each packaged library into its
own directory, so args like `-L/opt/homebrew/Cellar/neon/0.32.5/lib`
would be required for successful discovery.

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DMF NUT Data/Dynamic Mapping File/Format/Functionality feature impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) nut-scanner packaging portability We want NUT to build and run everywhere possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant