Ticket #4989 (closed bug: fixed)
build error on mingw if pthreads is installed
|Reported by:||int-e||Owned by:||simonmar|
|Type of failure:||Building GHC failed||Difficulty:|
|Test Case:||Blocked By:|
(error from #ghc, by McManiaC)
The build error is this,
In file included from \mingw\lib\gcc\mingw32\..\..\..\include\pthread.h:288:0: 0, from includes/rts/OSThreads.h:30, from includes/Rts.h:178, from rts\Adjustor.c:40: \mingw\lib\gcc\mingw32\..\..\..\include\sched.h:152:53: error: expected ')' before 'pid' \mingw\lib\gcc\mingw32\..\..\..\include\sched.h:154:53: error: expected ')' before 'pid' make: *** [rts/dist/build/Adjustor.thr_o] Error 1 make: *** [all] Error 2
From the error location in OSThreads.h we can conclude that HAVE_PTHREAD_H is set but WANT_NATIVE_WIN32_THREADS isn't.
So this happens if configure finds pthreads (compare ftp://sourceware.org/pub/pthreads-win32/sources/pthreads-w32-2-8-0-release/sched.h).
Perhaps the old build system used to set WANT_NATIVE_WIN32_THREADS when it detected mingw?