Skip to content

build error on mingw if pthreads is installed

(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[1]: *** [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?

Trac metadata
Trac field Value
Version 7.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Build System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information