Skip to content

fpgadiag, libopaecxx: link the libraries whose symbols are used#3173

Open
plusky wants to merge 1 commit into
OFS:masterfrom
plusky:fix-shared-lib-underlinking
Open

fpgadiag, libopaecxx: link the libraries whose symbols are used#3173
plusky wants to merge 1 commit into
OFS:masterfrom
plusky:fix-shared-lib-underlinking

Conversation

@plusky

@plusky plusky commented Jun 21, 2026

Copy link
Copy Markdown

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 the fpga* 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.
undefined reference to 'fpgaErrStr'
undefined reference to 'intel::utils::wrapped_stream::~wrapped_stream()'

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.

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>
@plusky plusky requested review from a team as code owners June 21, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant