Bug 71851 - libwayland-server.so: error: undefined reference to 'pthread_key_create' (and more)
Summary: libwayland-server.so: error: undefined reference to 'pthread_key_create' (and...
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: wayland (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-20 20:14 UTC by Michał Górny
Modified: 2013-11-24 01:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Build log (23.89 KB, text/plain)
2013-11-20 20:14 UTC, Michał Górny
Details

Description Michał Górny 2013-11-20 20:14:01 UTC
Created attachment 89547 [details]
Build log

Recently the git master for wayland stopped building with pthread-related errors:

../src/.libs/libwayland-server.so: error: undefined reference to 'pthread_key_create'
../src/.libs/libwayland-server.so: error: undefined reference to 'pthread_getspecific'
../src/.libs/libwayland-server.so: error: undefined reference to 'pthread_once'
../src/.libs/libwayland-server.so: error: undefined reference to 'pthread_setspecific'

Looking at the build system, I think it is completely missing the code necessary to detect and set proper flags for pthread support. As suspected, passing 'LIBS=-pthread' to configure results in the build succeeding.

Attaching our build log.
Comment 1 Kristian Høgsberg 2013-11-24 01:08:23 UTC
commit 5a019e38a1316a31072a9cb6de8da4377f3cfad5
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Sat Nov 23 12:24:26 2013 -0800

    Add -pthread to AM_CFLAGS to do the right thing when using threads


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.