Skip to content

libqat.pc: add libnuma and pthread to Libs.private - #164

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

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

Conversation

@tchaikov

Copy link
Copy Markdown

libqat is linked with -lnuma and -pthread, but libqat.pc lists neither. This does not affect shared linking, since libqat.so records its own dependencies, but a static link using
"pkg-config --static --libs libqat" fails with undefined references to numa_available() and other libnuma functions. On glibc older than 2.34, libpthread is missing as well, and is only pulled in today because libcrypto.pc happens to add -pthread.

Fix by adding -lnuma and PTHREAD_LIBS to Libs.private in libqat.pc.

libqat is linked with -lnuma and -pthread, but libqat.pc lists
neither. This does not affect shared linking, since libqat.so records
its own dependencies, but a static link using
"pkg-config --static --libs libqat" fails with undefined references
to numa_available() and other libnuma functions. On glibc older than
2.34, libpthread is missing as well, and is only pulled in today
because libcrypto.pc happens to add -pthread.

Fix by adding -lnuma and PTHREAD_LIBS to Libs.private in libqat.pc.

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

@gcabiddu gcabiddu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. We are testing it internally. We might need to do something similar for pthreads on libusdm.pc.in. We can push an update.

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.

2 participants