"error: No best alternative for {dir}/libs/mpi/build/boost_mpi", but the build succeeds

I'm building the full stock, unmodified Boost 1.87.0. I have previously built Boost 1.80.0 without issue. After bootstrapping, when running `b2` to actually build Boost, I get the following "errors": ... - has stat::st_birthtimespec : yes [5] - has fdopendir(O_NOFOLLOW) : yes [5] - has dirent::d_type : yes [5] - has POSIX *at APIs : no [5] - has fallocate : no [5] - cxx11_static_assert : yes [5] error: No best alternative for {dir}/libs/mpi/build/boost_mpi with <abi>aapcs <address-model>64 <architecture>arm <asynch-exceptions>off <binary-format>mach-o <boost.beast.allow-deprecated>on <boost.beast.separate-compilation>on <boost.cobalt.executor>any_io_executor <boost.cobalt.pmr>std <context-impl>fcontext <coverage>off <cxxstd-dialect>iso <cxxstd>20 <debug-symbols>off <exception-handling>on <extern-c-nothrow>off <inlining>full <instruction-set>nocona <known-warnings>hide <link>shared <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>3.9 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>darwin <testing.execute>on <threadapi>pthread <threading>multi <toolset-clang:platform>darwin <toolset-clang:version>14 <toolset>clang <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on <x-deduced-platform>arm_64 matched: (empty) matched: (empty) error: No best alternative for {dir}/libs/mpi/build/boost_mpi with <abi>aapcs <address-model>64 <architecture>arm <asynch-exceptions>off <binary-format>mach-o <boost.beast.allow-deprecated>on <boost.beast.separate-compilation>on <boost.cobalt.executor>any_io_executor <boost.cobalt.pmr>std <coverage>off <cxxstd-dialect>iso <cxxstd>20 <debug-symbols>off <exception-handling>on <extern-c-nothrow>off <inlining>full <instruction-set>nocona <known-warnings>hide <link>shared <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>3.9 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>darwin <testing.execute>on <threadapi>pthread <threading>multi <toolset-clang:platform>darwin <toolset-clang:version>14 <toolset>clang <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on <x-deduced-platform>arm_64 matched: (empty) matched: (empty) - gcc visibility : yes [2] - cxx14_decltype_auto : yes [2] - cxx14_generic_lambdas : yes [2] ... I used scare quotes around "errors," because these errors do not appear to actually break anything. The build completes fully and successfully, and all the libraries are built as expected. It appears to be more of a warning than an error, but I don't love warnings either, so I'd like to solve it. The only relevant result I could find Googling about this was [this other mailing list message]( https://lists.boost.org/Archives/boost/2024/11/258275.php), which was a reply to "[release] Boost 1.87.0 Beta 2 Release Candidate is available," and to which nobody ever replied. Doesn't really clear anything up for me. FWIW, I get these "errors" on RHEL 8 GCC 8, 9 GCC 11, and 9 GCC 14; Ubuntu 20.04 GCC 9, 22.04 GCC 11, and 24.04 GCC 13; macOS 12 Clang 14 (Intel and ARM), 14 Clang 16 (Intel and ARM), and 15 Clang 16 (Intel and ARM); Windows 10 MSVC 2022 and 11 MSVR 2022; and Windows Server 2022 MSVC 2022 and 2025 MSVC 2022. Any insights or guidance would be appreciated. Thanks, Nick

чт, 16 янв. 2025 г. в 18:10, Nicholas Williams via Boost-users <boost-users@lists.boost.org>:
error: No best alternative for {dir}/libs/mpi/build/boost_mpi with <abi>aapcs <address-model>64 <architecture>arm <asynch-exceptions>off <binary-format>mach-o <boost.beast.allow-deprecated>on <boost.beast.separate-compilation>on <boost.cobalt.executor>any_io_executor <boost.cobalt.pmr>std <context-impl>fcontext <coverage>off <cxxstd-dialect>iso <cxxstd>20 <debug-symbols>off <exception-handling>on <extern-c-nothrow>off <inlining>full <instruction-set>nocona <known-warnings>hide <link>shared <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>3.9 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>darwin <testing.execute>on <threadapi>pthread <threading>multi <toolset-clang:platform>darwin <toolset-clang:version>14 <toolset>clang <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on <x-deduced-platform>arm_64 matched: (empty) matched: (empty)
This essentially says "there are several recipes for target boost_mpi, and I cannot decide which is the best". The interesting thing is that there's actually only one alternative for that target, as far as I can see in the build script for Boost.MPI. Well, there's another one, but it is only defined if MPI is not configured.
I used scare quotes around "errors,"
The error should result in boost_mpi not being built. If you don't actually need it, add --without-mpi to your b2 invocation command.
Any insights or guidance would be appreciated.
Can you provide the full command, the full b2 output and the contents of your project-config.jam (and any other b2 config files, if there are any)? The latter two are probably better put into gists.

On Thu, Jan 16, 2025 at 12:09 PM Дмитрий Архипов via Boost-users < boost-users@lists.boost.org> wrote:
чт, 16 янв. 2025 г. в 18:10, Nicholas Williams via Boost-users <boost-users@lists.boost.org>:
error: No best alternative for {dir}/libs/mpi/build/boost_mpi with <abi>aapcs <address-model>64 <architecture>arm <asynch-exceptions>off <binary-format>mach-o <boost.beast.allow-deprecated>on <boost.beast.separate-compilation>on <boost.cobalt.executor>any_io_executor <boost.cobalt.pmr>std <context-impl>fcontext <coverage>off <cxxstd-dialect>iso <cxxstd>20 <debug-symbols>off <exception-handling>on <extern-c-nothrow>off <inlining>full <instruction-set>nocona <known-warnings>hide <link>shared <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>3.9 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>darwin <testing.execute>on <threadapi>pthread <threading>multi <toolset-clang:platform>darwin <toolset-clang:version>14 <toolset>clang <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on <x-deduced-platform>arm_64 matched: (empty) matched: (empty)
This essentially says "there are several recipes for target boost_mpi, and I cannot decide which is the best". The interesting thing is that there's actually only one alternative for that target, as far as I can see in the build script for Boost.MPI. Well, there's another one, but it is only defined if MPI is not configured.
I used scare quotes around "errors,"
The error should result in boost_mpi not being built. If you don't actually need it, add --without-mpi to your b2 invocation command.
Ah, yes, indeed, it is not being built (there is no library file output, even though the b2 output initially says "- mpi : building." We do need to build it, as far as I know.
Any insights or guidance would be appreciated.
Can you provide the full command, the full b2 output and the contents of your project-config.jam (and any other b2 config files, if there are any)? The latter two are probably better put into gists.
This is from just one platform (as stated in my original post, all platforms have the exact same error): https://gist.github.com/beamerblvd/5bbc952d8ece4a44e38df8630837114a _______________________________________________
Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users

чт, 16 янв. 2025 г. в 23:59, Nicholas Williams <nicholas@nicholaswilliams.net>:
This is from just one platform (as stated in my original post, all platforms have the exact same error):
https://gist.github.com/beamerblvd/5bbc952d8ece4a44e38df8630837114a
It turns out, the problem is that you need to configure the mpi module. Put using mpi ; into either user-config.jam or project-config.jam (the former is better, because the bootstrap script rewrites project-config.jam). Boost.MPI was supposed to tell you that you need to do this, but something made this part to do nothing: message boost_mpi : "warning: skipping optional Message Passing Interface (MPI) library." : "note: to enable MPI support, add \"using mpi ;\" to user-config.jam." : "note: to suppress this message, pass \"--without-mpi\" to b2." : "note: otherwise, you can safely ignore this message." ;

It also turns out that I've been told we do not need MPI, which is good because we don't have MPI compilers installed on our builders, so "using mpi ;" did nothing (understandably). That was probably the problem all along FWIW. Thanks, Nick On Fri, Jan 17, 2025 at 7:49 AM Дмитрий Архипов via Boost-users < boost-users@lists.boost.org> wrote:
This is from just one platform (as stated in my original post, all
чт, 16 янв. 2025 г. в 23:59, Nicholas Williams < nicholas@nicholaswilliams.net>: platforms have the exact same error):
https://gist.github.com/beamerblvd/5bbc952d8ece4a44e38df8630837114a
It turns out, the problem is that you need to configure the mpi module. Put
using mpi ;
into either user-config.jam or project-config.jam (the former is better, because the bootstrap script rewrites project-config.jam).
Boost.MPI was supposed to tell you that you need to do this, but something made this part to do nothing:
message boost_mpi : "warning: skipping optional Message Passing Interface (MPI) library." : "note: to enable MPI support, add \"using mpi ;\" to user-config.jam." : "note: to suppress this message, pass \"--without-mpi\" to b2." : "note: otherwise, you can safely ignore this message." ; _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Nicholas Williams
-
Дмитрий Архипов