Fix linker warning for C++ tests#2744
Draft
jimklimov wants to merge 9 commits intonetworkupstools:masterfrom
Draft
Fix linker warning for C++ tests#2744jimklimov wants to merge 9 commits intonetworkupstools:masterfrom
jimklimov wants to merge 9 commits intonetworkupstools:masterfrom
Conversation
…ibnutclientstub.la Avoid linker warning: CXXLD cppnit ld: warning: file /export/home/abuild/nut/obj/nut-2.8.2.1775.28/_build/sub/clients/.libs/libnutclient.so: linked to ../clients/.libs/libnutclient.so: attempted multiple inclusion of file Signed-off-by: Jim Klimov <jimklimov@gmail.com>
….la, we use them both in ultimate test program linking This reverts commit c5b34c7 "tests/Makefile.am: do not LDADD libnutclient.la where we (also) use libnutclientstub.la": (on Linux) without the "extra" link we get CXXLD cppunittest /usr/bin/ld: cppunittest-nutclienttest.o: undefined reference to symbol '_ZTIN3nut12NutExceptionE' /usr/bin/ld: /home/runner/work/nut/nut/clients/.libs/libnutclient.so.2: error adding symbols: DSO missing from command line clang: error: linker command failed with exit code 1 (use -v to see invocation) Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
bfb4154 to
ca1b067
Compare
|
❌ Build nut 2.8.2.2691-master failed (commit d33a738cc9 by @jimklimov) |
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Member
Author
|
Resyncing with main NUT code base after v2.8.3 release. |
|
❌ Build nut 2.8.3.3048-master failed (commit b374b48e0c by @jimklimov) |
…e libnutclientstub.la is [networkupstools#2744] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…in test programs, have it include libnutclient.la [networkupstools#2744] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…en/before libnutclientstub.la is [networkupstools#2744]" This reverts commit f7b76b5123199f2bd5c90216325c5e3a09f335c4: added dependency seems to be treated as an empty recipe which blocks the actual build.
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Apr 29, 2025
…it_LDADD [networkupstools#2744] One positive result of experiments in PR networkupstools#2744 which otherwise did not lead far, yet... Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Avoid linker warning with some C++ test programs, e.g.:
NOTE: Two fixes are attempted here, but they misfire differently on different platforms/toolkits.
Maybe the current status-quo is the least-worst situation...