Re: [Boost-bugs] [Boost C++ Libraries] #4878: MinGW 4.5.0 undefined reference to bool interruptible_wait(detail::win32::handle handle_to_wait_for, detail::t imeout target_time)

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4878: MinGW 4.5.0 undefined reference to bool interruptible_wait(detail::win32::handle handle_to_wait_for, detail::t imeout target_time)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-12-20 03:40:17


#4878: MinGW 4.5.0 undefined reference to bool
interruptible_wait(detail::win32::handle handle_to_wait_for,detail::t
imeout target_time)
---------------------------------+------------------------------------------
  Reporter: 1czajnik@… | Owner: anthonyw
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.45.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------+------------------------------------------

Comment (by wash):

 Alright, I see why this fix is working (relevant code, aka
 $BOOST_ROOT/boost/thread/detail/config.hpp).

 {{{
  34 #if defined(BOOST_THREAD_BUILD_DLL) //Build dll
  35 #elif defined(BOOST_THREAD_BUILD_LIB) //Build lib
  36 #elif defined(BOOST_THREAD_USE_DLL) //Use dll
  37 #elif defined(BOOST_THREAD_USE_LIB) //Use lib
  38 #else //Use default
  39 # if defined(BOOST_THREAD_PLATFORM_WIN32)
  40 # if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN)
  41 //For compilers supporting auto-tss cleanup
  42 //with Boost.Threads lib, use Boost.Threads lib
  43 # define BOOST_THREAD_USE_LIB
  44 # else
  45 //For compilers not yet supporting auto-tss cleanup
  46 //with Boost.Threads lib, use Boost.Threads dll
  47 # define BOOST_THREAD_USE_DLL
  48 # endif
  49 # else
  50 # define BOOST_THREAD_USE_LIB
  51 # endif
  52 #endif
 }}}

 I would be happy to apply a patch for this (though, a more versatile
 patch: Hendricks seemed to indicate on IRC that this is not just a problem
 for mingw 4.5, but a problem for mingw in general, so any mingw version
 should be detected, if this is in fact the right fix), but first I need to
 see some justification for this solution. If someone is interested in
 doing a little more investigating, read on and post your findings here.

 It seems that the Boost.Threads dll is not working with mingw. The
 comments from the above snippet seem to indicate that the Boost.Threads
 lib should be used for compilers supporting auto-tss cleanup. Does mingw
 support auto-tss cleanup? (cite sources, please).

 More importantly, it looks like the underlying problem might be that
 BOOST_THREAD_PLATFORM_WIN32 appears to be defined for mingw. Why is this
 happening (please check the Boost.Thread / Boost.Config source code, and
 find out where BOOST_THREAD_PLATFORM_WIN32 is being defined)? Is it an
 error? If BOOST_THREAD_PLATFORM_WIN32 wasn't defined, it looks like
 BOOST_THREAD_USE_LIB would be selected. Would this fix the mingw problem?

 Also, this needs to be tested - e.g. someone with this fix applied needs
 to run the Boost.Thread test suite on GCC Linux and mingw.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4878#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC