Boost C++ Libraries: Ticket #5864: unable to compile boost::mpi under Windows using msvc-2008-compiller https://svn.boost.org/trac10/ticket/5864 <p> My steps to reproduce: </p> <ol><li>Setup environment for msvc-2008 compiler using bat-file for Visual Studio 2008 command line environment. </li><li>Compile library openmpi-1.4.3 using cmake (as specified in its documentation) and install it to "d:\Libs\mpi-1.4.3\Release". </li><li>Add path to "d:\Libs\mpi-1.4.3\Release\bin" to my PATH environment. </li><li>Check, that mpic++ works good: <pre class="wiki">&gt; mpic++ --showme cl.exe /I"d:/Libs/mpi-1.4.3/Release/include" /TP /EHsc /D "OMPI_IMPORTS" /D "OPAL_IMPORTS" /D "ORTE_IMPORTS" /link /LIBPATH:"d:/Libs/mpi-1.4.3/Release/lib" libmpi.lib libopen-pal.lib libopenrte.lib libmpi_cxx.lib libmpi.lib libopen-pal.lib libopen-rte.lib advapi32.lib Ws2_32.lib shlwapi.lib </pre></li><li>Add string 'using mpi ;' to my &lt;boost_dir&gt;\tools\build\v2\user-config.jam file. </li><li>Try to compile boost::mpi: <pre class="wiki">&gt; bjam.exe --prefix=d:\Programming\mpi-work\boost-mpi\installed --build-dir=d:\Programming\mpi-work\boost-mpi\bld --with-mpi install </pre></li></ol><p> As a result I got the error: </p> <pre class="wiki">Системе не удается найти указанный путь. Системе не удается найти указанный путь. Системе не удается найти указанный путь. Системе не удается найти указанный путь. MPI auto-detection failed: unknown wrapper compiler mpic++ Please report this error to the Boost mailing list: http://www.boost.org You will need to manually configure MPI support. </pre><p> ('Системе не удается найти указанный путь.' - means 'System can't find specified path') </p> <p> The same result I got using b2.exe instead of bjam.exe. </p> <p> I tried to read the documentation to setup exact paths to openmpi for mpi module in the user-config.jam. But I couldn't understand, where should I put include- and library-paths in it. </p> <p> My environment - Windows XP SP2 x32, Visual Studio 2008 with compiler version 15.00.21022.08. I have attached partial command line environment as file to the bug report. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5864 Trac 1.4.3 Slav Grig <armagvvg@…> Mon, 05 Sep 2011 06:27:26 GMT attachment set https://svn.boost.org/trac10/ticket/5864 https://svn.boost.org/trac10/ticket/5864 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">env.txt</span> </li> </ul> <p> Partial console environment </p> Ticket Taras Kozlov Sat, 03 Aug 2013 14:39:04 GMT attachment set https://svn.boost.org/trac10/ticket/5864 https://svn.boost.org/trac10/ticket/5864 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">mpi-windows-build.patch</span> </li> </ul> <p> Fix build on windows </p> Ticket Taras Kozlov Sat, 03 Aug 2013 14:39:27 GMT <link>https://svn.boost.org/trac10/ticket/5864#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5864#comment:1</guid> <description> <p> After digging into mpi.jam I found what is the root of the problem. </p> <pre class="wiki"># Determine if it is safe to execute the given shell command by trying # to execute it and determining whether the exit code is zero or # not. Returns true for an exit code of zero, false otherwise. local rule safe-shell-command ( cmdline ) { local result = [ SHELL "$(cmdline) &gt; /dev/null 2&gt;/dev/null; if [ "$?" -eq "0" ]; then echo SSCOK; fi" ] ; return [ MATCH ".*(SSCOK).*" : $(result) ] ; } </pre><p> It silently always return false on windows, because this is not correct cmd.exe command. I have attached patch that made windows specific workaround. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Taras Kozlov</dc:creator> <pubDate>Sat, 03 Aug 2013 14:41:50 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/5864 https://svn.boost.org/trac10/ticket/5864 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">mpi-windows-build2.patch</span> </li> </ul> <p> Fix build on windows </p> Ticket anonymous Sat, 03 Aug 2013 14:44:53 GMT <link>https://svn.boost.org/trac10/ticket/5864#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5864#comment:2</guid> <description> <p> Please use <strong>mpi-windows-build2.patch</strong> I have accidentally attached incorrect one. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Taras Kozlov</dc:creator> <pubDate>Sat, 03 Aug 2013 23:27:02 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/5864 https://svn.boost.org/trac10/ticket/5864 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">mpi-windows-build3.patch</span> </li> </ul> <p> Fix build on windows </p> Ticket Taras Kozlov Sat, 03 Aug 2013 23:32:39 GMT <link>https://svn.boost.org/trac10/ticket/5864#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5864#comment:3</guid> <description> <pre class="wiki">msvc.link.dll bin.v2\libs\mpi\build\msvc-10.0\debug\threading-multi\boost_mpi-vc 100-mt-gd-1_53.dll Microsoft (R) Incremental Linker Version 10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved. LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:' </pre> </description> <category>Ticket</category> </item> </channel> </rss>