Opened 9 years ago

Closed 9 years ago

Last modified 15 months ago

#4989 closed bug (fixed)

build error on mingw if pthreads is installed

Reported by: int-e Owned by: simonmar
Priority: high Milestone: 7.2.1
Component: Build System (make) Version: 7.1
Keywords: Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

(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?

Change History (4)

comment:1 Changed 9 years ago by simonmar

Milestone: 7.2.1
Owner: set to simonmar
Priority: normalhigh

we should get rid of WANT_NATIVE_WIN32_THREADS and ignore pthreads.h on Windows. I'll fix.

comment:2 Changed 9 years ago by simonmar

Resolution: fixed
Status: newclosed

Fixed:

Wed Mar 30 02:23:42 PDT 2011  Simon Marlow <marlowsd@gmail.com>
  * Windows build fix: ignore pthread.h if it exists (#4989)

comment:3 Changed 9 years ago by simonmar

Milestone: 7.4.17.2.1

comment:4 Changed 15 months ago by bgamari

Component: Build SystemBuild System (make)

The new Hadrian build system has been merged. Relabeling the tickets concerning the legacy make build system to prevent confusion.

Note: See TracTickets for help on using tickets.