Boost C++ Libraries: Ticket #2000: boost/detail/spinlock_sync.hpp incorrectly included for Intel C++ on Linux https://svn.boost.org/trac10/ticket/2000 <p> On a linux-x86_64 system with gcc 4.1.3 and Intel 10.1, an include of boost/shared_ptr.hpp pulls in boost/detail/spinlock_sync.hpp, which fails to compile since the <span class="underline">sync functions are undefined. </span></p> <p> It appears this problem is due to the #if sequence in boost/detail/spinlock.hpp. The Intel compiler defines <span class="underline">GNUC</span> and <span class="underline">GNUC_MINOR</span>, but doesn't provide the intrinsics. </p> <p> By adding "&amp;&amp; !defined(BOOST_INTEL)" to the appropriate #if line as in the attached patch, everything works. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2000 Trac 1.4.3 Anthony Williams Mon, 09 Jun 2008 14:21:38 GMT attachment set https://svn.boost.org/trac10/ticket/2000 https://svn.boost.org/trac10/ticket/2000 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">spinlock.patch</span> </li> </ul> <p> Patch for boost/detail/spinlock.hpp </p> Ticket Peter Dimov Tue, 10 Jun 2008 09:13:41 GMT status changed https://svn.boost.org/trac10/ticket/2000#comment:1 https://svn.boost.org/trac10/ticket/2000#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> The same problem is pointed out in this thread: </p> <p> <a class="ext-link" href="http://lists.boost.org/Archives/boost/2008/06/138322.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2008/06/138322.php</a> </p> <p> but it seems that some installations of Intel C++ do handle the code fine: </p> <p> <a class="ext-link" href="http://lists.boost.org/Archives/boost/2008/06/138337.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2008/06/138337.php</a> </p> <p> The problem might be caused by the system headers: </p> <p> <a class="ext-link" href="http://lists.boost.org/Archives/boost/2008/06/138341.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2008/06/138341.php</a> </p> <p> It's not clear to me at the moment what the right fix is. </p> Ticket Anthony Williams Wed, 11 Jun 2008 21:31:50 GMT <link>https://svn.boost.org/trac10/ticket/2000#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2000#comment:2</guid> <description> <p> It appears to me to depend on the version of gcc used as the system compiler: certainly, if <span class="underline">GNUC</span> &lt; 4, the problematic header won't be included. That's why I suggested the change I did. Of course, I'm not sure why Intel is defining <span class="underline">GNUC</span> anyway, but I guess it's for compatibility, like the Windows compiler defines _MSC_VER. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Thu, 21 Aug 2008 15:08:12 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/2000#comment:3 https://svn.boost.org/trac10/ticket/2000#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.36.0</span> → <span class="trac-field-new">Boost 1.37.0</span> </li> </ul> Ticket notquitezeus@… Thu, 11 Sep 2008 03:51:37 GMT <link>https://svn.boost.org/trac10/ticket/2000#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2000#comment:4</guid> <description> <p> I've observed the same problem on SuSE 10.3 x86_32 with ICC 10.1.15 (GCC primitives <span class="underline">sync* not defined). I will give the patch a try once I get into the office tomorrow morning. </span></p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Wed, 17 Sep 2008 22:43:16 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2000#comment:5 https://svn.boost.org/trac10/ticket/2000#comment:5 <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> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/48836" title="Fix #2000.">[48836]</a>) Fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2000" title="#2000: Bugs: boost/detail/spinlock_sync.hpp incorrectly included for Intel C++ on Linux (closed: fixed)">#2000</a>. </p> Ticket