8000 Fix linker warning for C++ tests by jimklimov · Pull Request #2744 · networkupstools/nut · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix linker warning for C++ tests #2744

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

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

jimklimov
Copy link
Member

Avoid linker warning with some C++ test programs, e.g.:

              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

NOTE: Two fixes are attempted here, but they misfire differently on different platforms/toolkits.
Maybe the current status-quo is the least-worst situation...

@jimklimov jimklimov added C++ CI Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes) impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) labels Jan 2, 2025
@jimklimov jimklimov added this to the NUT 2.9 milestone Jan 2, 2025
…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>
@AppVeyorBot
Copy link

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov marked this pull request as ready for review April 25, 2025 08:23
@jimklimov
Copy link
Member Author

Resyncing with main NUT code base after v2.8.3 release.

@AppVeyorBot
Copy link

…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>
@jimklimov jimklimov marked this pull request as draft April 30, 2025 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ CI Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes) impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0