8000 Issue with Requires.private in pkgconfig file · Issue #21 · jrmadsen/PTL · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Issue with Requires.private in pkgconfig file #21

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

Closed
badshah400 opened this issue Dec 2, 2021 · 1 comment · Fixed by #22
Closed

Issue with Requires.private in pkgconfig file #21

badshah400 opened this issue Dec 2, 2021 · 1 comment · Fixed by #22

Comments

@badshah400
Copy link
Contributor

Describe the bug
The Requires.private line in the pkgconfig file seems to be erroneous according to the pkg-config specifications. Both Requires and Requires.private should list names of pkg-config modules and not refer to flags directly, whereas -pthread looks more appropriate for Libs.private. Indeed on my system (openSUSE Tumbleweed) there does not seem to be any pkg-config module by the name of -pthread (or even pthread) installed even though PTL can find pthread.h when building and link against it just fine (glibc-devel provides the pthread header).

Please let me know if I am wrong here; if not, here is a straightforward patch which I can make a PR with if you wish:

Index: PTL-2.2.0/cmake/Templates/ptl.pc.in
===================================================================
--- PTL-2.2.0.orig/cmake/Templates/ptl.pc.in
+++ PTL-2.2.0/cmake/Templates/ptl.pc.in
@@ -6,6 +6,6 @@ Name: PTL
 Description: Parallel Tasking Library for C++
 Version: @PTL_VERSION_STRING@
 Requires: @PTL_PC_TBB_REQUIREMENT@
-Requires.private: -pthread
 Libs: -L${libdir} -lptl
+Libs.private: -pthread
 CFlags: -std=c++@CMAKE_CXX_STANDARD@ -pthread -I${includedir}

Many thanks for your library btw.

@jrmadsen
Copy link
Owner
jrmadsen commented Dec 2, 2021

Thanks for reporting this @badshah400. It looks like you are indeed correct, a PR would be appreciated, thanks.

@drbenmorgan -- just FYI since this was part of your CMake overhaul

jrmadsen added a commit that referenced this issue Dec 3, 2021
* pkgconfig: Use Libs.private for "-pthread" flag.

Fixes #21.

* Update cmake/Templates/ptl.pc.in

* Bump version to 2.2.1

Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>
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 a pull request may close this issue.

2 participants
0