Boost C++ Libraries: Ticket #2575: Bug- Boost 1.36.0 on Itanium platform https://svn.boost.org/trac10/ticket/2575 <blockquote class="citation"> <p> Environment: WinXP SP2/Visual Studio Team System 2005/Itanium cross compiler tools </p> </blockquote> <blockquote class="citation"> <p> 1 . Generate boost libs using Itanium cross compiler command prompt with these options bjam -a --build-type=complete --toolset=msvc &gt;architecture=ia64 --stagedir=Winia64 stage </p> </blockquote> <blockquote class="citation"> <ol start="2"><li>Compiling under Itanium configuration in VS2005 generates several linker errors: </li></ol></blockquote> <blockquote class="citation"> <p> error LNK2019: unresolved external symbol ._interlockedbittestandset referenced in function "[Entry] bool <span class="underline">cdecl &gt;boost::detail::win32::interlocked_bit_test_and_set(long *,long)" (.?interlocked_bit_test_and_set@win32@detail@boost@@YA_NPEAJJ@Z) </span></p> </blockquote> <blockquote class="citation"> <p> error LNK2001: unresolved external symbol ._interlockedbittestandset </p> </blockquote> <blockquote class="citation"> <p> libboost_thread-vc80-mt-1_36.lib(thread.obj) : error LNK2001: unresolved external symbol ._interlockedbittestandset </p> </blockquote> <blockquote class="citation"> <p> 3.The projects compile fine under x86 and x64. _interlockbittestandset is not intrinsic on Itanium platform </p> </blockquote> <p> This sounds like an issue with Boost code itself. Your might want to either post to boost-devel, or file a bug at svn.boost.org </p> <ul><li>Volodya </li></ul> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2575 Trac 1.4.3 Marshall Clow Tue, 09 Dec 2008 17:31:01 GMT component changed; owner set https://svn.boost.org/trac10/ticket/2575#comment:1 https://svn.boost.org/trac10/ticket/2575#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">John Maddock</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">thread</span> </li> </ul> <p> John - can you take a look at this, since you've got the compiler? </p> <p> The calls (and fns) are: boost/thread/win32/basic_timed_mutex.hpp: return !win32::interlocked_bit_test_and_set(&amp;active_count,lock_flag_bit); boost/thread/win32/basic_timed_mutex.hpp: if(!win32::interlocked_bit_test_and_set(&amp;active_count,lock_flag_bit)) boost/thread/win32/basic_timed_mutex.hpp: if(!win32::interlocked_bit_test_and_set(&amp;active_count,event_set_flag_bit)) </p> <p> boost/thread/win32/thread_primitives.hpp: inline bool interlocked_bit_test_and_set(long* x,long bit) boost/thread/win32/thread_primitives.hpp: inline bool interlocked_bit_test_and_set(long* x,long bit) boost/thread/win32/thread_primitives.hpp: inline bool interlocked_bit_test_and_set(long* x,long bit) </p> Ticket John Maddock Tue, 09 Dec 2008 18:30:15 GMT owner changed https://svn.boost.org/trac10/ticket/2575#comment:2 https://svn.boost.org/trac10/ticket/2575#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">John Maddock</span> to <span class="trac-author">Marshall Clow</span> </li> </ul> <p> I don't have access to the itanium compiler but looking at the docs and the headers: </p> <ul><li>_interlockedbittestandset is a compiler intrinsic *only* available on x86 and x86_64 architechtures, it should *not* be used on any other architechture. </li></ul><ul><li>I can't see a similar IA64 intrinsic (but could easily have missed it). </li></ul><ul><li>The function: </li></ul><p> BOOLEAN WINAPI <a class="missing wiki">InterlockedBitTestAndSet</a>( </p> <blockquote> <p> <span class="underline">in LONG volatile *Base, </span>in LONG Bit </p> </blockquote> <p> ); </p> <p> Appears to be universally available and offers the same functionality (in fact it just calls _interlockedbittestandset on x86 platforms). </p> <p> HTH, John. </p> Ticket Marshall Clow Wed, 21 Jan 2009 17:19:27 GMT owner changed https://svn.boost.org/trac10/ticket/2575#comment:3 https://svn.boost.org/trac10/ticket/2575#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Marshall Clow</span> to <span class="trac-author">Anthony Williams</span> </li> </ul> Ticket viboes Sun, 11 Dec 2011 02:40:49 GMT owner, status, milestone changed; cc set https://svn.boost.org/trac10/ticket/2575#comment:4 https://svn.boost.org/trac10/ticket/2575#comment:4 <ul> <li><strong>cc</strong> <span class="trac-author">viboes</span> added </li> <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">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.38.0</span> → <span class="trac-field-new">To Be Determined</span> </li> </ul> Ticket viboes Sun, 11 Dec 2011 15:11:13 GMT <link>https://svn.boost.org/trac10/ticket/2575#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2575#comment:5</guid> <description> <p> After making the suggested replacement, I get this error when linking </p> <pre class="wiki">msvc.link ..\..\..\bin.v2\libs\thread\test\test_thread.test\msvc-10.0\debug\threading-multi\test_thread.exe test_thread.obj : error LNK2019: unresolved external symbol _InterlockedBitTestAndSet referenced in function "bool __cdecl boost::detail::win32::interlocked_bit_test_and_set(long *,long)" (?interlocked_bit_test_and_set@win32@detail@boost@@YA_NPAJJ@Z) ..\..\..\bin.v2\libs\thread\test\test_thread.test\msvc-10.0\debug\threading-multi\test_thread.exe : fatal error LNK1120: 1 unresolved externals </pre><p> From which version is this primitive available? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 11 Dec 2011 16:43:09 GMT</pubDate> <title>keywords set https://svn.boost.org/trac10/ticket/2575#comment:6 https://svn.boost.org/trac10/ticket/2575#comment:6 <ul> <li><strong>keywords</strong> interlocked added </li> </ul> Ticket viboes Tue, 20 Dec 2011 18:07:31 GMT type changed https://svn.boost.org/trac10/ticket/2575#comment:7 https://svn.boost.org/trac10/ticket/2575#comment:7 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Support Requests</span> </li> </ul> <p> Moved to support request until availability clarified. </p> Ticket asonawane@… Tue, 20 Dec 2011 18:52:39 GMT attachment set https://svn.boost.org/trac10/ticket/2575 https://svn.boost.org/trac10/ticket/2575 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">thread_primitives.hpp</span> </li> </ul> <p> itanium patch </p> Ticket anonymous Tue, 20 Dec 2011 18:52:54 GMT <link>https://svn.boost.org/trac10/ticket/2575#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2575#comment:8</guid> <description> <p> I think it's been available on almost all Win32 versions since forever, a trivial program with just: </p> <pre class="wiki">#include &lt;windows.h&gt; int main() { LONG i = 132; InterlockedBitTestAndSet(&amp;i, 1); } </pre><p> compiles and links just fine for me on Vista with VC10. </p> <p> Are you including windows.h or defining the prototype for <a class="missing wiki">InterlockedBitTestAndSet</a> yourself? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 20 Dec 2011 19:01:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2575#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2575#comment:9</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2575#comment:7" title="Comment 7">viboes</a>: </p> <blockquote class="citation"> <p> Moved to support request until availability clarified. </p> </blockquote> <p> Use the attached update (thread_primitives.hpp) replace and compile. Works with boost version 1.39.0 and MS-VS 2005. Later versions of boost not tested. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Thu, 29 Dec 2011 16:20:46 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/2575 https://svn.boost.org/trac10/ticket/2575 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">2575.patch</span> </li> </ul> <p> patch respect to trunk </p> Ticket viboes Thu, 29 Dec 2011 16:22:45 GMT type changed https://svn.boost.org/trac10/ticket/2575#comment:10 https://svn.boost.org/trac10/ticket/2575#comment:10 <ul> <li><strong>type</strong> <span class="trac-field-old">Support Requests</span> → <span class="trac-field-new">Patches</span> </li> </ul> Ticket viboes Sat, 07 Jan 2012 23:02:41 GMT milestone changed https://svn.boost.org/trac10/ticket/2575#comment:11 https://svn.boost.org/trac10/ticket/2575#comment:11 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.49.0</span> </li> </ul> Ticket viboes Tue, 17 Jan 2012 06:34:47 GMT <link>https://svn.boost.org/trac10/ticket/2575#comment:12 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2575#comment:12</guid> <description> <p> Committed in trunk at revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/76543" title=" * [@http://svn.boost.org/trac/boost/ticket/2741 #2741] Proposal to ...">[76543]</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Mon, 28 May 2012 15:25:15 GMT</pubDate> <title>status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/2575#comment:13 https://svn.boost.org/trac10/ticket/2575#comment:13 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</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-old">Boost 1.49.0</span> → <span class="trac-field-new">Boost 1.50.0</span> </li> </ul> <p> Committed in release branch at <a class="changeset" href="https://svn.boost.org/trac10/changeset/78543" title="Merged boost.thread from trunk">[78543]</a> </p> Ticket