Boost C++ Libraries: Ticket #4395: Intel 11.1 defines _GNU_SOURCE, breaking the get_nprocs test in thread.cpp https://svn.boost.org/trac10/ticket/4395 <p> In a bug related to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2053" title="#2053: Patches: porting boost to avr32 linux platform (closed: fixed)">#2053</a>, there's code in <code>libs/thread/src/pthread/thread.cpp</code> that attempts to only call <code>get_nprocs</code> on gnu platforms that define _GNU_SOURCE (cf. <a class="ext-link" href="http://lists.boost.org/Archives/boost/2010/05/166414.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2010/05/166414.php</a>) </p> <p> Unfortunately, intel 11.1 appears to define _GNU_SOURCE, but not provide get_nprocs: </p> <pre class="wiki">$ icpc --version icpc (ICC) 11.1 20100401 Copyright (C) 1985-2010 Intel Corporation. All rights reserved. $ icpc intelSymbols.cc intelSymbols.cc(2): catastrophic error: #error directive: "_GNU_SOURCE is defined" #error "_GNU_SOURCE is defined" ^ compilation aborted for intelSymbols.cc (code 4) $ cat !$ cat intelSymbols.cc #if defined(_GNU_SOURCE) #error "_GNU_SOURCE is defined" #endif </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4395 Trac 1.4.3 anonymous Tue, 06 Jul 2010 14:45:56 GMT <link>https://svn.boost.org/trac10/ticket/4395#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4395#comment:1</guid> <description> <p> i think the test for _GNU_SOURCE should come as the last, otherwise linking against uclibc is failing too </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Anthony Williams</dc:creator> <pubDate>Tue, 06 Jul 2010 16:55:25 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4395#comment:2 https://svn.boost.org/trac10/ticket/4395#comment:2 <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> Ticket