Bug 75674 - linking fails because of missing pthread libs
Summary: linking fails because of missing pthread libs
Status: RESOLVED FIXED
Alias: None
Product: p11-glue
Classification: Unclassified
Component: p11-kit (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) FreeBSD
: medium normal
Assignee: Stef Walter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-02 16:39 UTC by Roman Bogorodskiy
Modified: 2014-09-09 12:23 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
configure.ac hack (500 bytes, patch)
2014-03-02 16:59 UTC, Roman Bogorodskiy
Details | Splinter Review

Description Roman Bogorodskiy 2014-03-02 16:39:11 UTC
p11-kit 0.20.2 stopped linking on FreeBSD:

gmake[3]: Entering directory `/usr/home/novel/code/p11-kit/p11-kit/tests'
  CCLD     test-init
test-init.o: In function `test_threaded_initialization':
/home/novel/code/p11-kit/p11-kit/tests/test-init.c:254: undefined reference to `pthread_create'
/home/novel/code/p11-kit/p11-kit/tests/test-init.c:266: undefined reference to `pthread_create'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [test-init] Error 1

Looks like the reason is in commit 157941cbd75492b0c74ff21f95de3093cf6d4aca

If I revert this commit, I can build again.
Comment 1 Roman Bogorodskiy 2014-03-02 16:59:09 UTC
Created attachment 94969 [details] [review]
configure.ac hack

Surprisingly, if I s/pthread_mutexattr_init/pthread_create/, I get it working. I don't have an explanation for it yet.
Comment 2 Stef Walter 2014-09-09 12:23:31 UTC
Thanks. Committed and merged your patch.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.