Boost logo

Boost :

Subject: Re: [boost] [1.45] Thread issues
From: Jim Bell (Jim_at_[hidden])
Date: 2010-10-22 09:58:49

On 1:59 PM, Nelson, Erik - 2 wrote:
>>> Boost.Thread has some rather serious issues on mingw. [...]
>> I intend to look at these tomorrow. I haven't touched mingw in a
>> while, and the recent mingw releases appear to have changed the way
>> things work. I have not encountered any problems with static linking
>> with MSVC, but I will see if I can reproduce the problems.
>> Anthony
> Hey Anthony. I've been unable to produce the MSVC problem, too. I think
> the issue is just with mingw.

I think the current wave/testwave trunk regression test for MinGW
illustrates thread's linking issues (or one of them). It links with
static libraries.

The link fails looking for two undefined symbols:

These are the dllimport symbols for:
    boost::detail::get_tss_data(void const*)
    boost::detail::set_tss_data(void const*,
boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)

The errors are coming from libboost_wave, not the (test) source. So that
library appears to have been compiled incorrectly.

The test was compiled with:

But the library was compiled with just -DBOOST_ALL_NO_LIB=1

And these two export symbols are in thread's static library (but not
with dllimport's 'imp' prefix).

Should all static libraries be built with -DBOOST_THREAD_USE_LIB, or
should BOOST_ALL_NO_LIB or other flags automatically define it? (Or is
this specific test build configured wrong?)

> We use Boost.Thread 1.43 on MSVC 2008 and haven't seen any issues.
> [...]

Boost list run by bdawes at, gregod at, cpdaniel at, john at