Skip to content

qatzip.pc: Add private dependencies for static linking - #155

Open
tchaikov wants to merge 1 commit into
intel:masterfrom
tchaikov:wip-pc-static-libs
Open

tchaikov wants to merge 1 commit into
intel:masterfrom
tchaikov:wip-pc-static-libs

Conversation

@tchaikov

Copy link
Copy Markdown

libqatzip calls into libnuma, libzstd, libqat and libusdm, but qatzip.pc only lists zlib and liblz4. As a result, a static link using "pkg-config --static --libs qatzip" fails with undefined references to the cpaDc*, ZSTD_* and libnuma functions.

Fix this by adding -lnuma and PTHREAD_LIBS to Libs.private, and libzstd to Requires.private. When building against qatlib, also require qatlib, which pulls in libqat and libusdm in the order a static link needs, along with their own dependencies. The out-of-tree driver ships no .pc file, so that build is left unchanged.

libqatzip calls into libnuma, libzstd, libqat and libusdm, but
qatzip.pc only lists zlib and liblz4. As a result, a static link using
"pkg-config --static --libs qatzip" fails with undefined references to
the cpaDc*, ZSTD_* and libnuma functions.

Fix this by adding -lnuma and PTHREAD_LIBS to Libs.private, and libzstd
to Requires.private. When building against qatlib, also require
qatlib, which pulls in libqat and libusdm in the order a static link
needs, along with their own dependencies. The out-of-tree driver ships
no .pc file, so that build is left unchanged.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
@Yogaraj-Alamenda

Copy link
Copy Markdown
Contributor

Thanks for the PR. We will check and merge into our upcoming release.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The pkg-config dependency updates have no active review issues.

No open issues 🎉

What changed in this PR

This PR updates QATzip’s pkg-config metadata to supply missing dependencies for static linking.

Changes:

  • Adds NUMA and pthread linker flags to Libs.private.
  • Adds libzstd as a private package dependency.
  • Requires qatlib for qatlib-backed builds, without adding that requirement for out-of-tree driver builds.
File Description
qatzip.pc.in Declares private libraries and package dependencies needed for static linking.
configure.ac Sets and exports the conditional qatlib pkg-config requirement.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants