Skip to content

Conan troubleshooting

Elliot Lee edited this page Oct 11, 2023 · 2 revisions

Errors may occur regarding apple-clang 15. This is not related to Boost 1.82.

conan install .. --output-folder . --build missing --settings build_type=Debug

ERROR: Invalid setting '15' is not a valid 'settings.compiler.version' value.
Possible values are ['5.0', '5.1', ... '9.1', '10.0', '11.0', '12.0', '13', '13.0', '13.1', '14', '14.0']
Read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-invalid-setting"


conan profile show default
Configuration for profile default:
[settings]
OS=Macos os_build-Macos arch=armv8
arch_build-armv8 compiler=apple-clang compiler.version=15 compiler. libcxx=libc++ build_type=Debug compiler.cppstd-20 [options ]
[confl tools.build: cxxflags-['-DBOOST_ASIO_DISABLE_CONCEPTS']
[build_requires]
[env]
CXXFLAGS=-DBOOST_ASIO_DISABLE_CONCEPTS

conan --version
Conan version 1.59.0

clang --version
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Solutions:

  • Edit the ~/.conan/settings.yml file. Append "15" into the allowed versions of the apple-clang compiler. It can be found in the last few lines of the file.
    • With this solution, you can use Conan version 1.55.0 or conan 1.59.0.
  • Alternatively, you can update Conan. See https://docs.conan.io/en/1.61/faq/troubleshooting.html#error-invalid-setting
    • pip install --upgrade 'conan<2'
    • The first line of the output shows the conan version.
    • This may not update the conan you're actually using, depending on how you installed Conan. For example, Conan 1.61 could be installed into one Python environment, while your shell is configured to use a different Python environment. If you installed it with Python 3.x, then you may need to update Conan a different way.

Notes

You may need to add conan profile 15 to your profile. Example full profile:

[settings]
os=Macos
os_build=Macos
arch=x86_64
arch_build=x86_64
compiler=apple-clang
compiler.version=15
compiler.libcxx=libc++
build_type=Release
compiler.cppstd=20
[options]
boost:extra_b2_flags="define=BOOST_ASIO_HAS_STD_INVOKE_RESULT"
[conf]
tools.build:cflags=['-DBOOST_ASIO_HAS_STD_INVOKE_RESULT']
tools.build:cxxflags=['-DBOOST_ASIO_HAS_STD_INVOKE_RESULT']
tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]
[build_requires]
[env]
CXXFLAGS=-DBOOST_ASIO_DISABLE_CONCEPTS
CFLAGS=-DBOOST_ASIO_HAS_STD_INVOKE_RESULT
CXXFLAGS=-DBOOST_ASIO_HAS_STD_INVOKE_RESULT

It is OK for the architecture to be different (e.g. arm64 is fine) and to have a different additional flags section.

Note that the project does not currently work with conan 2.0.