Boost C++ Libraries: Ticket #5610: boost.thread doesn't build for mingw64 target. https://svn.boost.org/trac10/ticket/5610 <p> boost-1.46.1 cross-compilation for mingw64 fails with following errors: </p> <pre class="wiki">o" "libs/thread/src/win32/thread.cpp" In file included from ./boost/thread/win32/basic_timed_mutex.hpp:14:0, from ./boost/thread/win32/mutex.hpp:8, from ./boost/thread/mutex.hpp:14, from ./boost/thread/detail/thread.hpp:13, from ./boost/thread/thread.hpp:22, from libs/thread/src/win32/thread.cpp:10: ./boost/thread/win32/interlocked_read.hpp: In function 'void* boost::detail::interlocked_read_acquire(void* volatile*)': ./boost/thread/win32/interlocked_read.hpp:63:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ./boost/thread/win32/interlocked_read.hpp: In function 'void boost::detail::interlocked_write_release(void* volatile*, void*)': ./boost/thread/win32/interlocked_read.hpp:71:13: error: cast from 'void*' to 'long int' loses precision [-fpermissive] ./boost/thread/win32/interlocked_read.hpp:71:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] In file included from ./boost/thread/win32/mutex.hpp:8:0, from ./boost/thread/mutex.hpp:14, from ./boost/thread/detail/thread.hpp:13, from ./boost/thread/thread.hpp:22, from libs/thread/src/win32/thread.cpp:10: ./boost/thread/win32/basic_timed_mutex.hpp: In member function 'void boost::detail::basic_timed_mutex::destroy()': ./boost/thread/win32/basic_timed_mutex.hpp:46:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] In file included from ./boost/thread/win32/mutex.hpp:8:0, from ./boost/thread/mutex.hpp:14, from ./boost/thread/detail/thread.hpp:13, from ./boost/thread/thread.hpp:22, from libs/thread/src/win32/thread.cpp:10: ./boost/thread/win32/basic_timed_mutex.hpp: In member function 'void* boost::detail::basic_timed_mutex::get_event()': ./boost/thread/win32/basic_timed_mutex.hpp:183:43: error: cast from 'void*' to 'long int' loses precision [-fpermissive] ./boost/thread/win32/basic_timed_mutex.hpp:183:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] In file included from ./boost/thread/once.hpp:14:0, from libs/thread/src/win32/thread.cpp:17: ./boost/thread/win32/once.hpp: In function 'void boost::call_once(boost::once_flag&amp;, Function)': ./boost/thread/win32/once.hpp:136:20: error: '_InterlockedCompareExchange' is not a member of 'boost::detail' ./boost/thread/win32/once.hpp:136:20: note: suggested alternative: /local/devel/toolchain46/x86_64-pc-mingw32.host64/lib/gcc/x86_64-pc-mingw32/4.6.1/../../../../x86_64-pc-mingw32/include/winnt.h:1385:23: note: '_InterlockedCompareExchange' ./boost/thread/win32/once.hpp:152:25: error: '_InterlockedIncrement' is not a member of 'boost::detail' ./boost/thread/win32/once.hpp:152:25: note: suggested alternative: /local/devel/toolchain46/x86_64-pc-mingw32.host64/lib/gcc/x86_64-pc-mingw32/4.6.1/../../../../x86_64-pc-mingw32/include/winnt.h:1336:23: note: '_InterlockedIncrement' ./boost/thread/win32/once.hpp:155:21: error: '_InterlockedExchange' is not a member of 'boost::detail' ./boost/thread/win32/once.hpp:155:21: note: suggested alternative: /local/devel/toolchain46/x86_64-pc-mingw32.host64/lib/gcc/x86_64-pc-mingw32/4.6.1/../../../../x86_64-pc-mingw32/include/winnt.h:1352:23: note: '_InterlockedExchange' ./boost/thread/win32/once.hpp:169:21: error: '_InterlockedExchange' is not a member of 'boost::detail' ./boost/thread/win32/once.hpp:169:21: note: suggested alternative: /local/devel/toolchain46/x86_64-pc-mingw32.host64/lib/gcc/x86_64-pc-mingw32/4.6.1/../../../../x86_64-pc-mingw32/include/winnt.h:1352:23: note: '_InterlockedExchange' ./boost/thread/win32/once.hpp:184:17: error: '_InterlockedIncrement' is not a member of 'boost::detail' ./boost/thread/win32/once.hpp:184:17: note: suggested alternative: /local/devel/toolchain46/x86_64-pc-mingw32.host64/lib/gcc/x86_64-pc-mingw32/4.6.1/../../../../x86_64-pc-mingw32/include/winnt.h:1336:23: note: '_InterlockedIncrement' </pre><p> as you can see there're invalid void* -&gt; long casts (on win64 long == 32 bits, void* == 64 bits) and other incompatibilites in Interlocked* decls. </p> <p> ps). i'm using mingw64-headers from: <a class="ext-link" href="https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk/mingw-w64-headers"><span class="icon">​</span>https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk/mingw-w64-headers</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5610 Trac 1.4.3 anonymous Tue, 14 Jun 2011 20:06:13 GMT component changed; owner set https://svn.boost.org/trac10/ticket/5610#comment:1 https://svn.boost.org/trac10/ticket/5610#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Anthony Williams</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">thread</span> </li> </ul> Ticket Vladislav <phprus@…> Thu, 16 Jun 2011 10:44:35 GMT cc set https://svn.boost.org/trac10/ticket/5610#comment:2 https://svn.boost.org/trac10/ticket/5610#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">phprus@…</span> added </li> </ul> <p> Similar ticket: <a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/4849"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/4849</a> </p> Ticket anonymous Sat, 06 Aug 2011 12:55:04 GMT <link>https://svn.boost.org/trac10/ticket/5610#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5610#comment:3</guid> <description> <p> seems to work in 1.47.0 release. please close as fixed. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 11 Dec 2011 15:22:39 GMT</pubDate> <title>status changed; resolution set; milestone deleted https://svn.boost.org/trac10/ticket/5610#comment:4 https://svn.boost.org/trac10/ticket/5610#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-deleted">To Be Determined</span> </li> </ul> <p> Closed as suggested. Could someone add what was done to solve this issue? See also <a class="ext-link" href="http://lists.boost.org/Archives/boost/2011/06/182834.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2011/06/182834.php</a>. </p> Ticket jmichae3@… Mon, 26 Aug 2013 17:54:59 GMT status, version changed; resolution deleted https://svn.boost.org/trac10/ticket/5610#comment:5 https://svn.boost.org/trac10/ticket/5610#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.46.1</span> → <span class="trac-field-new">Boost 1.54.0</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> broken again in 1.54.0, jam build system refuses to run on windows (file extension not recognised and no exe provided). also, how to build is unclear. had to guess, guess I was wrong. </p> Ticket jmichae3@… Mon, 26 Aug 2013 18:11:38 GMT version changed https://svn.boost.org/trac10/ticket/5610#comment:6 https://svn.boost.org/trac10/ticket/5610#comment:6 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.54.0</span> → <span class="trac-field-new">Boost 1.49.0</span> </li> </ul> <p> oops, sorry, last commend and reopen was wrong bug. this should stay closed, I misread the title. I know how folks are about wanting you to re-use existing bugs and searching existing bug reports. I misfired. setting milestone back to 1.49.0 </p> Ticket viboes Tue, 27 Aug 2013 11:37:58 GMT owner, status changed; milestone set https://svn.boost.org/trac10/ticket/5610#comment:7 https://svn.boost.org/trac10/ticket/5610#comment:7 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">new</span> </li> <li><strong>milestone</strong> → <span class="trac-field-new">To Be Determined</span> </li> </ul> Ticket viboes Tue, 27 Aug 2013 11:39:22 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5610#comment:8 https://svn.boost.org/trac10/ticket/5610#comment:8 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Closed as suggested. </p> Ticket