fpgadiag, libopaecxx: link the libraries whose symbols are used#3173
Open
plusky wants to merge 1 commit into
Open
fpgadiag, libopaecxx: link the libraries whose symbols are used#3173plusky wants to merge 1 commit into
plusky wants to merge 1 commit into
Conversation
opae-cxx-core uses the fpga* C API from opae-c, and opae-c++-nlb uses intel::utils from opae-c++-utils, but neither links the providing library. This is invisible with the default linker behaviour but breaks builds that link shared libraries with -Wl,-z,defs / --no-undefined (e.g. openSUSE): undefined reference to `fpgaErrStr' undefined reference to `intel::utils::wrapped_stream::~wrapped_stream()' Add the missing link dependencies so the libraries are self-contained. Signed-off-by: Martin Pluskal <martin@pluskal.org>
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.
While building the OPAE libraries as proper shared objects with
-Wl,-z,defs/--no-undefined(the default for shared libraries on openSUSE, and a good correctness check generally), two libraries fail to link:opae-cxx-core(libraries/libopaecxx) uses thefpga*C API from opae-c (e.g.fpgaErrStr,fpgaDestroyProperties,fpgaUnregisterEvent) but does not link it.opae-c++-nlb(binaries/fpgadiag) uses opae-c++-utils (intel::utils::wrapped_stream, …) but does not link it.This is invisible with the default linker behaviour on Fedora/RHEL/Ubuntu (the symbols resolve transitively at load time), so the underlinking goes unnoticed there. This PR adds the missing entries to each
opae_add_shared_library(... LIBS ...)so the libraries are self-contained.No functional change.