Bug 88219 - include/c11/threads_posix.h:197: undefined reference to `pthread_mutex_lock'
Summary: include/c11/threads_posix.h:197: undefined reference to `pthread_mutex_lock'
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) OpenBSD
: medium blocker
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-09 01:21 UTC by Vinson Lee
Modified: 2015-01-22 21:36 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Link glsl_test against $(PTHREAD_LIBS) (883 bytes, patch)
2015-01-09 01:40 UTC, Jonathan Gray
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2015-01-09 01:21:43 UTC
mesa: 3d8188d4f898afcf4f181de29e12c5b218bbd393 (master 10.5.0-devel)

OpenBSD failure

$ gmake check
[...]
  CXXLD    glsl_test
imports.o(.text+0x215): In function `_mesa_strdup':
../../src/mesa/main/imports.c:494: warning: strcpy() is almost always misused, please use strlcpy()
./.libs/libglsl.a(libmesautil_la-hash_table.o)(.text+0x203): In function `_mesa_hash_table_random_entry':
mesa/src/util/hash_table.c:399: warning: rand() isn't random; consider using arc4random()
./.libs/libglsl.a(builtin_functions.o)(.text+0x7c4): In function `_mesa_glsl_find_builtin_function(_mesa_glsl_parse_state*, char const*, exec_list*)':
../../include/c11/threads_posix.h:197: undefined reference to `pthread_mutex_lock'
Comment 1 Jonathan Gray 2015-01-09 01:40:22 UTC
Created attachment 111987 [details] [review]
Link glsl_test against $(PTHREAD_LIBS)
Comment 2 Jonathan Gray 2015-01-09 01:42:38 UTC
I've attached a patch that links glsl_test against the pthreads library which should fix this.  This is the same change that was done for glsl_compiler back in 0d6f573f6e6785babe1e274697fdd315db95fb98.
Comment 3 Emil Velikov 2015-01-22 21:36:59 UTC
(In reply to Jonathan Gray from comment #2)
> I've attached a patch that links glsl_test against the pthreads library
> which should fix this.  This is the same change that was done for
> glsl_compiler back in 0d6f573f6e6785babe1e274697fdd315db95fb98.
>
Nice one Jonathan.

Added r-b, bugzilla and cc mesa-stable tags, and pushed to master.

Thanks
Emil


bug/show.html.tmpl processed on Mar 26, 2017 at 01:35:47.
(provided by the Example extension).