With this patch series applied, the build fails for me on ubuntu 16.04. Tree configured thusly:
../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 Error: make[5]: Entering directory '/home/torowley/work/mesa-opt/src/util' CC libmesautil_la-u_atomic.lo CC libmesautil_la-u_queue.lo In file included from ../../../mesa/src/util/u_thread.h:32:0, from ../../../mesa/src/util/u_queue.h:39, from ../../../mesa/src/util/u_queue.c:27: ../../../mesa/include/c11/threads.h:79:2: error: #error Not supported on this platform. #error Not supported on this platform. ^ In file included from ../../../mesa/src/util/u_queue.h:39:0, from ../../../mesa/src/util/u_queue.c:27: ../../../mesa/src/util/u_thread.h:39:15: error: unknown type name ‘thrd_t’ static inline thrd_t u_thread_create(int (*routine)(void *), void *param) ^ ../../../mesa/src/util/u_thread.h: In function ‘u_thread_create’: ../../../mesa/src/util/u_thread.h:41:4: error: unknown type name ‘thrd_t’ thrd_t thread; ^ ../../../mesa/src/util/u_thread.h:52:10: error: implicit declaration of function ‘thrd_create’ [-Werror=implicit-function-declaration] ret = thrd_create( &thread, routine, param ); ^ ... On Jun 9, 2017, at 5:42 AM, Emil Velikov <emil.l.veli...@gmail.com<mailto:emil.l.veli...@gmail.com>> wrote: Hi all, On 5 June 2017 at 00:04, Emil Velikov <emil.l.veli...@gmail.com<mailto:emil.l.veli...@gmail.com>> wrote: From: Emil Velikov <emil.veli...@collabora.com<mailto:emil.veli...@collabora.com>> As mentioned in last commit - pthread manual suggests using -pthread. Furthermore, to the best of my knowledge anything built with GCC and Clang should just work (tm) with the said flag. AFAICT using the Sun or Intel compiler may need special treatment, but that is to be confirmed/dismissed. Cc: Randy Fishel <randy.fis...@oracle.com<mailto:randy.fis...@oracle.com>> Cc: Niveditha Rau <niveditha....@oracle.com<mailto:niveditha....@oracle.com>> Cc: Jon Turney <jon.tur...@dronecode.org.uk<mailto:jon.tur...@dronecode.org.uk>> Cc: Tim Rowley <timothy.o.row...@intel.com<mailto:timothy.o.row...@intel.com>> Cc: Bruce Cherniak <bruce.chern...@intel.com<mailto:bruce.chern...@intel.com>> Cc: Jeremy Huddleston Sequoia <jerem...@apple.com<mailto:jerem...@apple.com>> Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com<mailto:emil.l.veli...@gmail.com>> --- Ladies and gents, Please confirm if "-pthread" works on your platform/compiler combos. If fixup changes are needed, please send over a patch to squash. Thanks Emil --- configure.ac | 15 +-- m4/ax_pthread.m4 | 309 ------------------------------------------------------- 2 files changed, 2 insertions(+), 322 deletions(-) delete mode 100644 m4/ax_pthread.m4 diff --git a/configure.ac b/configure.ac index 1c15eb482f9..2e4264cf592 100644 --- a/configure.ac +++ b/configure.ac @@ -825,23 +825,12 @@ AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"]) dnl Check for zlib PKG_CHECK_MODULES([ZLIB], [zlib >= $ZLIB_REQUIRED]) -dnl Check for pthreads -AX_PTHREAD -if test "x$ax_pthread_ok" = xno; then - AC_MSG_ERROR([Building mesa on this platform requires pthreads]) -fi -dnl AX_PTHREADS leaves PTHREAD_LIBS empty for gcc and sets PTHREAD_CFLAGS -dnl to -pthread, which causes problems if we need -lpthread to appear in -dnl pkgconfig files. Since Android doesn't have a pthread lib, this check -dnl is not valid for that platform. -if test "x$android" = xno; then - test -z "$PTHREAD_LIBS" && PTHREAD_LIBS="-lpthread" -fi dnl According to the manual when using pthreads, one should add -pthread to dnl both compile and link-time arguments. dnl In practise that should be sufficient for all platforms, since any dnl platforms build with GCC and Clang support the flag. -PTHREAD_LIBS="$PTHREAD_LIBS -pthread" +PTHREAD_CFLAGS="-pthread" +PTHREAD_LIBS="-pthread" Humble ping? Anyone's testing would be appreciated, although I would love to hear from anyone in the CC-chain. If the commit message seems sparse/ambiguous or in general you think more information is needed, please let me know. I intentionally, tried to keep it concise although it might have gone too brief. Thanks Emil
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev