<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
With this patch series applied, the build fails for me on ubuntu 16.04.
<div class=""><br class="">
</div>
<div class="">Tree configured thusly:</div>
<div class=""><br class="">
</div>
<div class="">../mesa/configure --with-platforms=x11 --disable-gbm --disable-egl --disable-dri --disable-xvmc --disable-vdpau --disable-omx --disable-va --with-gallium-drivers=swrast,swr LLVM_CONFIG=/home/torowley/llvm-3.9.0-opt/bin/llvm-config</div>
<div class=""><br class="">
</div>
<div class="">Error:</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">make[5]: Entering directory '/home/torowley/work/mesa-opt/src/util'</div>
<div class="">  CC       libmesautil_la-u_atomic.lo</div>
<div class="">  CC       libmesautil_la-u_queue.lo</div>
<div class="">In file included from ../../../mesa/src/util/u_thread.h:32:0,</div>
<div class="">                 from ../../../mesa/src/util/u_queue.h:39,</div>
<div class="">                 from ../../../mesa/src/util/u_queue.c:27:</div>
<div class="">../../../mesa/include/c11/threads.h:79:2: error: #error Not supported on this platform.</div>
<div class=""> #error Not supported on this platform.</div>
<div class="">  ^</div>
<div class="">In file included from ../../../mesa/src/util/u_queue.h:39:0,</div>
<div class="">                 from ../../../mesa/src/util/u_queue.c:27:</div>
<div class="">../../../mesa/src/util/u_thread.h:39:15: error: unknown type name ‘thrd_t’</div>
<div class=""> static inline thrd_t u_thread_create(int (*routine)(void *), void *param)</div>
<div class="">               ^</div>
<div class="">../../../mesa/src/util/u_thread.h: In function ‘u_thread_create’:</div>
<div class="">../../../mesa/src/util/u_thread.h:41:4: error: unknown type name ‘thrd_t’</div>
<div class="">    thrd_t thread;</div>
<div class="">    ^</div>
<div class="">../../../mesa/src/util/u_thread.h:52:10: error: implicit declaration of function ‘thrd_create’ [-Werror=implicit-function-declaration]</div>
<div class="">    ret = thrd_create( &thread, routine, param );</div>
<div class="">          ^</div>
</div>
<div class="">...</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jun 9, 2017, at 5:42 AM, Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com" class="">emil.l.velikov@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Hi
 all,</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On
 5 June 2017 at 00:04, Emil Velikov <</span><a href="mailto:emil.l.velikov@gmail.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">emil.l.velikov@gmail.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">>
 wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">
From: Emil Velikov <<a href="mailto:emil.velikov@collabora.com" class="">emil.velikov@collabora.com</a>><br class="">
<br class="">
As mentioned in last commit - pthread manual suggests using -pthread.<br class="">
Furthermore, to the best of my knowledge anything built with GCC and<br class="">
Clang should just work (tm) with the said flag.<br class="">
<br class="">
AFAICT using the Sun or Intel compiler may need special treatment, but<br class="">
that is to be confirmed/dismissed.<br class="">
<br class="">
Cc: Randy Fishel <<a href="mailto:randy.fishel@oracle.com" class="">randy.fishel@oracle.com</a>><br class="">
Cc: Niveditha Rau <<a href="mailto:niveditha.rau@oracle.com" class="">niveditha.rau@oracle.com</a>><br class="">
Cc: Jon Turney <<a href="mailto:jon.turney@dronecode.org.uk" class="">jon.turney@dronecode.org.uk</a>><br class="">
Cc: Tim Rowley <<a href="mailto:timothy.o.rowley@intel.com" class="">timothy.o.rowley@intel.com</a>><br class="">
Cc: Bruce Cherniak <<a href="mailto:bruce.cherniak@intel.com" class="">bruce.cherniak@intel.com</a>><br class="">
Cc: Jeremy Huddleston Sequoia <<a href="mailto:jeremyhu@apple.com" class="">jeremyhu@apple.com</a>><br class="">
Signed-off-by: Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com" class="">emil.l.velikov@gmail.com</a>><br class="">
---<br class="">
Ladies and gents,<br class="">
<br class="">
Please confirm if "-pthread" works on your platform/compiler combos.<br class="">
If fixup changes are needed, please send over a patch to squash.<br class="">
<br class="">
Thanks<br class="">
Emil<br class="">
---<br class="">
configure.ac     |  15 +--<br class="">
m4/ax_pthread.m4 | 309 -------------------------------------------------------<br class="">
2 files changed, 2 insertions(+), 322 deletions(-)<br class="">
delete mode 100644 m4/ax_pthread.m4<br class="">
<br class="">
diff --git a/configure.ac b/configure.ac<br class="">
index 1c15eb482f9..2e4264cf592 100644<br class="">
--- a/configure.ac<br class="">
+++ b/configure.ac<br class="">
@@ -825,23 +825,12 @@ AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])<br class="">
dnl Check for zlib<br class="">
PKG_CHECK_MODULES([ZLIB], [zlib >= $ZLIB_REQUIRED])<br class="">
<br class="">
-dnl Check for pthreads<br class="">
-AX_PTHREAD<br class="">
-if test "x$ax_pthread_ok" = xno; then<br class="">
-    AC_MSG_ERROR([Building mesa on this platform requires pthreads])<br class="">
-fi<br class="">
-dnl AX_PTHREADS leaves PTHREAD_LIBS empty for gcc and sets PTHREAD_CFLAGS<br class="">
-dnl to -pthread, which causes problems if we need -lpthread to appear in<br class="">
-dnl pkgconfig files.  Since Android doesn't have a pthread lib, this check<br class="">
-dnl is not valid for that platform.<br class="">
-if test "x$android" = xno; then<br class="">
-    test -z "$PTHREAD_LIBS" && PTHREAD_LIBS="-lpthread"<br class="">
-fi<br class="">
dnl According to the manual when using pthreads, one should add -pthread to<br class="">
dnl both compile and link-time arguments.<br class="">
dnl In practise that should be sufficient for all platforms, since any<br class="">
dnl platforms build with GCC and Clang support the flag.<br class="">
-PTHREAD_LIBS="$PTHREAD_LIBS -pthread"<br class="">
+PTHREAD_CFLAGS="-pthread"<br class="">
+PTHREAD_LIBS="-pthread"<br class="">
<br class="">
</blockquote>
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Humble
 ping? Anyone's testing would be appreciated, although I would</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">love
 to hear from anyone in the CC-chain.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">If
 the commit message seems sparse/ambiguous or in general you think</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">more
 information is needed, please let me know.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I
 intentionally, tried to keep it concise although it might have gone too brief.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Thanks</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Emil</span></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>