You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Boost.Math 1.76/1.77 fails to build on MacOS due to a compiler restriction. I get the following error message when attempting to install via Conan:
boost/1.76.0: Invalid ID: Boost.Math requires a C++11 capable compiler
However, earlier versions of boost (<=1.75) does install successfully. The issue is in the definition of _min_compiler_version_default_cxx11here. When v1.76 was added to Conan, a line was added that requires a compiler version of 99 on apple-clang which in effect just disables building on apple-clang entirely (at least until the year ~2100) considering we are on apple-clang 13.
The motivation given in the diff here says that disabling the MacOS build on apple-clang was due to C++11 support. However, according to this, apple-clang has supported C++11 since apple-clang 10.0 (which in turn is based off clang 6 which is the minimum version used in the definition of _min_compiler_version_default_cxx11). Indeed, the official Boost release page here lists Apple Clang 9.0/10.0/11.0 as supported compilers.
I'm able to build Boost.Mathfrom source on MacOS without Conan but this (>99) change breaks all of my Conan builds. If I manually edit the ConanFile to build with apple-clang by setting the minimum version to 10.0, and set the compiler C++ version to gnu11/gnu14/gnu17 depending upon the project conanfile, I can successfully build Boost.Math so it isn't a limitation of apple-clang.
Is there some subtle reason why changing the minimum version of apple-clang to 10 won't work (because clearly we can build boost 1.76 on apple-clang)? (cc'ing the original folks who made the change @prince-chrismc@madebr)
The text was updated successfully, but these errors were encountered:
rprechelt
changed the title
[package] <boost>/<1.77>: Fails to build on MacOS due to compiler version restrictions
[package] boost/1.76: Fails to build on MacOS due to compiler version restrictions
Oct 27, 2021
The problem is that the default c++ standard of the apple-clang compiler is below 2011.
So you need to explicitly do -s compiler.cppstd=11.
Perhaps we need to change the error message from Boost.Math requires a C++11 capable compiler to Boost.Math requires cppstd>=2011, current one is lower?
Right now, I found the error confusing since I know my compiler supports C++11 - something like what you said Boost.Math requires cppstd>=2011. Set compiler.cppstd to be greater than 11. would be good (since it provides a solution to the problem for projects that aren't explicitly setting a C++ standard) but anything would be fine.
Package and Environment Details (include every applicable attribute)
Conan profile (output of
conan profile show default
orconan profile show <profile>
if custom profile is in use)Steps to reproduce (Include if Applicable)
Boost.Math 1.76/1.77 fails to build on MacOS due to a compiler restriction. I get the following error message when attempting to install via Conan:
However, earlier versions of boost (<=1.75) does install successfully. The issue is in the definition of
_min_compiler_version_default_cxx11
here. Whenv1.76
was added to Conan, a line was added that requires a compiler version of99
onapple-clang
which in effect just disables building onapple-clang
entirely (at least until the year ~2100) considering we are onapple-clang 13
.The motivation given in the diff here says that disabling the MacOS build on
apple-clang
was due to C++11 support. However, according to this,apple-clang
has supported C++11 sinceapple-clang 10.0
(which in turn is based offclang 6
which is the minimum version used in the definition of_min_compiler_version_default_cxx11
). Indeed, the official Boost release page here lists Apple Clang 9.0/10.0/11.0 as supported compilers.I'm able to build
Boost.Math
from source on MacOS without Conan but this (>99) change breaks all of my Conan builds. If I manually edit the ConanFile to build withapple-clang
by setting the minimum version to 10.0, and set the compiler C++ version tognu11
/gnu14
/gnu17
depending upon the project conanfile, I can successfully buildBoost.Math
so it isn't a limitation ofapple-clang
.Is there some subtle reason why changing the minimum version of
apple-clang
to10
won't work (because clearly we can build boost 1.76 onapple-clang
)? (cc'ing the original folks who made the change @prince-chrismc @madebr)The text was updated successfully, but these errors were encountered: