id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
4989,build error on mingw if pthreads is installed,int-e,simonmar,"(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?",bug,closed,high,7.2.1,Build System,7.1,fixed,,,Windows,Unknown/Multiple,Building GHC failed,,,,,
