|
Boost-Build : |
From: Mat Marcus (mat-lists_at_[hidden])
Date: 2008-04-14 16:11:25
On Mon, Apr 14, 2008 at 12:57 PM, Anthony Williams
<anthony_w.geo_at_[hidden]> wrote:
>
> "Mat Marcus" <mat-lists_at_[hidden]> writes:
>
> > On Mon, Apr 14, 2008 at 10:25 AM, Anthony Williams
> > <anthony_w.geo_at_[hidden]> wrote:
> >> "Mat Marcus" <mat-lists_at_[hidden]> writes:
> >>
> >> > On Mon, Apr 14, 2008 at 1:20 AM, Anthony Williams
> >> > <anthony_w.geo_at_[hidden]> wrote:
> >> >> "Mat Marcus" <mat-lists_at_[hidden]> writes:
> >> >>
> >> >> > It seems that I am unable to build/use boost threads when compiling
> >> >> > with gcc-4.2.0 on windows. I get errors:
> >> >> >
> >> >> > libs\thread\src\win32\thread.cpp:147: error: 'heap_delete' is not a
> >> >> > member of 'boost::detail'
> >> >> >
> >> >> > and other (see below). Can someone advise me as to how I can get
> >> >> > boost_thread to build under gcc-4.2.0/32-bit XP machine wth boost
> >> >> > 1.35.0.
> >> >>
> >> >> This surprises me: building using your bjam command line with gcc-4.2.1 on
> >> >> 32-bit Windows XP compiles file.
> >> >>
> >> >> Have you got the latest w32api headers on your include path? I use w32api-3.10
> >> >> from www.mingw.org, but earlier versions should work too.
> >> >>
> >> >> Anthony
> >> >
> >> > Thanks for the suggestion. I naively followed it, but things haven't
> >> > improved yet.
> >> >
> >> > Let me tell you a little bit more about my configuration. I use a
> >> > version of bjam built with mscv, since my primary builds on this
> >> > machine use the MS compiler. But I sometimes need to build with
> >> > gcc-4.x. I usually run bjam from the cygwin shell, though sometimes I
> >> > use cmd. I configured and compiled my own gcc-4.2.0 under cygwin. I
> >> > had not installed the mingw win32 api headers in the past.
> >>
> >> OK, stop right there. I naively assumed that you would be using the mingw port
> >> of gcc like I am. The cygwin port of gcc should use the pthread API by
> >> default. You do not need the w32api headers to build boost thread with cygwin
> >> and the pthread API.
> >>
> >> I guess the build problems you're having are because the pthread headers are
> >> being chosen, but the build system is choosing the win32 source files.
> >>
> >> I don't have cygwin on this machine, so could you try building with
> >> "threadapi=pthread" on the bjam command line?
> >>
> >>
> >> Anthony
> >
> > I'm pasting the result below. A couple of questions:
> >
> > 1) Why doesn't the build system choose the threadapi=pthread by
> > default in my configuration? (The default seems to be win32)
>
> Because you're using msvc bjam to build using cygwin gcc. Apparently this
> build option is broken.
This begins to sound like the boost-build options and the header file
configuration detection options are out of sync, as Steven suggested.
>
> > 2) Did 1.35.0 add the requirement over 1.34.1 that I need to download,
> > build, and update my user-config.jam to point to a posix threads
> > library before using boost threads?
>
> No. This has always been a requirement if you want to use pthreads on a plain
> win32 (non-cygwin) compiler. It's just that the detection of cygwin is broken
> in the jamfile.
>
> Can you use a cygwin-built bjam?
In general no. My workflow includes invoking such commands as:
bjam debug release msvc-8.0 msvc-9.0 gcc-4.2.0
It would be a shame to lose the ability to use a single (msvc-built)
bjam for all compilation as a result of upgrading to 1.35.0 (The need
to use a separate cygwin-built bjam for boost-book is one of the
reasons that I avoid using boostbook). But, to try to get to the
bottom of things, I did try to create a cygwin-built bjam with 1.35.0.
It fails to compile (assertion failure) under cygwin for me at the
moment (suing either the cygwin provided gcc or my hand-built
gcc-4.2.0). I just posted to the boost build list about that.
- Mat
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk