Boost C++ Libraries: Ticket #10788: GetLogicalProcessor isn't available for Windows platform less or equals to 0x0502 https://svn.boost.org/trac10/ticket/10788 <p> I've runned into an issue while using boost 1.56.0 and boost 1.57.0 while ours software was deployed on a Windows XP SP2. When using the threading library from boost, we have found out that it was using a feature only available on Windows XP SP3 and higher. </p> <p> The effect are that the software built with Boost 1.56.0 and boost 1.57.0 refuse to start even after we force the feature set of windows XP to be used by the Windows Platform SDK. </p> <p> I will attach a patch as a proposed fix for future version of boost. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10788 Trac 1.4.3 steve.tousignant@… Wed, 12 Nov 2014 19:47:04 GMT attachment set https://svn.boost.org/trac10/ticket/10788 https://svn.boost.org/trac10/ticket/10788 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-1.57.0-WinXP-SP2-PhysicalConcurrency-Return0.patch</span> </li> </ul> <p> Proposed patch for boost threading </p> Ticket viboes Sun, 07 Jun 2015 08:51:29 GMT component changed https://svn.boost.org/trac10/ticket/10788#comment:1 https://svn.boost.org/trac10/ticket/10788#comment:1 <ul> <li><strong>component</strong> <span class="trac-field-old">threads</span> → <span class="trac-field-new">thread</span> </li> </ul> <p> Please, don't use the threads component but the thread one. </p> Ticket viboes Sun, 28 Jun 2015 09:07:10 GMT owner, status changed https://svn.boost.org/trac10/ticket/10788#comment:2 https://svn.boost.org/trac10/ticket/10788#comment:2 <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">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> The current code is </p> <pre class="wiki"> unsigned thread::physical_concurrency() BOOST_NOEXCEPT { #if BOOST_PLAT_WINDOWS_RUNTIME || (defined(__MINGW32__) &amp;&amp; !defined(__MINGW64_VERSION_MAJOR)) return hardware_concurrency(); #else unsigned cores = 0; DWORD size = 0; GetLogicalProcessorInformation(NULL, &amp;size); if (ERROR_INSUFFICIENT_BUFFER != GetLastError()) return 0; std::vector&lt;SYSTEM_LOGICAL_PROCESSOR_INFORMATION&gt; buffer(size); if (GetLogicalProcessorInformation(&amp;buffer.front(), &amp;size) == FALSE) return 0; const size_t Elements = size / sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION); for (size_t i = 0; i &lt; Elements; ++i) { if (buffer[i].Relationship == RelationProcessorCore) ++cores; } return cores; #endif } </pre><p> Does it works for you? </p> Ticket viboes Sat, 05 Sep 2015 14:45:28 GMT <link>https://svn.boost.org/trac10/ticket/10788#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10788#comment:3</guid> <description> <p> PING !!! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Wed, 23 Sep 2015 22:48:11 GMT</pubDate> <title>type changed https://svn.boost.org/trac10/ticket/10788#comment:4 https://svn.boost.org/trac10/ticket/10788#comment:4 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Support Requests</span> </li> </ul> Ticket viboes Sun, 27 Sep 2015 13:01:48 GMT type changed https://svn.boost.org/trac10/ticket/10788#comment:5 https://svn.boost.org/trac10/ticket/10788#comment:5 <ul> <li><strong>type</strong> <span class="trac-field-old">Support Requests</span> → <span class="trac-field-new">Bugs</span> </li> </ul> Ticket viboes Sun, 27 Sep 2015 13:18:36 GMT milestone changed https://svn.boost.org/trac10/ticket/10788#comment:6 https://svn.boost.org/trac10/ticket/10788#comment:6 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.60.0</span> </li> </ul> <p> <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/11683" title="#11683: Bugs: Boost thread 1.59 problems on WinXP SP2 (closed: duplicate)">#11683</a> describes the history of this function and how we rolled back a fix. </p> <p> I've update the develop branch. </p> <p> <a class="ext-link" href="https://github.com/boostorg/thread/commit/9a8759a3dda2c63342d55d5e97ed906826cee981"><span class="icon">​</span>https://github.com/boostorg/thread/commit/9a8759a3dda2c63342d55d5e97ed906826cee981</a> </p> Ticket Daniel Mon, 28 Sep 2015 07:07:56 GMT <link>https://svn.boost.org/trac10/ticket/10788#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10788#comment:7</guid> <description> <p> Please also take into account the issue with comments after preprocessor continuation for VS2010 (<a class="closed ticket" href="https://svn.boost.org/trac10/ticket/10824#comment:6" title="Comment 6 for #10824: Bugs: Boost.Thread 1.57 breaks Windows XP compatibility for SP2 and below. (closed: fixed)">comment:6:ticket:10824</a>): commit/8e1be55c6d560c44fb07cc497a3480527957576c </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Wed, 21 Oct 2015 22:17:52 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/10788#comment:8 https://svn.boost.org/trac10/ticket/10788#comment:8 <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> Ticket