Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] MSVC Clang-Cl compiler error on Boost recipe, why? #26239

Open
ibis-hdl opened this issue Dec 21, 2024 · 0 comments
Open

[question] MSVC Clang-Cl compiler error on Boost recipe, why? #26239

ibis-hdl opened this issue Dec 21, 2024 · 0 comments
Labels
question Further information is requested

Comments

@ibis-hdl
Copy link

What is your question?

I am trying to build a Conan v2 recipe on Windows 10 with VS 2022 (community) and the supplied clang-cl - with boost 1.86 recipe. I have created a Conan profile msvc-cl for this purpose

[settings]
arch=x86_64
build_type=Release
compiler=clang
compiler.cppstd=gnu17
compiler.runtime=dynamic
compiler.runtime_version=v143
compiler.version=18
os=Windows
[conf]
tools.cmake.cmaketoolchain:generator=Visual Studio 17 2022

set the compiler.version=18 to the version number of the bundled clang-cl,

> clang-cl --version
clang version 18.1.8
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin

and tested it (as suggested in Conan's doc) successfully with conan new cmake_lib.

Conan's command line is:

> pwsh -Command conan install . --settings compiler.cppstd=20 --settings build_type=Debug --conf tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" --build=missing --profile:all=msvc-cl

and the error messages now appears in the real project for all recipes:

...
conanvcvars.bat: Activating environment Visual Studio 17 - amd64 - winsdk_version=None - vcvars_ver=14.3
[ERROR:vcvars.bat] Toolset directory for version '14.3' was not found.
[ERROR:VsDevCmd.bat] *** VsDevCmd.bat encountered errors. Environment may be incomplete and/or incorrect. ***
...
conanvcvars.bat: Activating environment Visual Studio 17 - amd64 - winsdk_version=None - vcvars_ver=14.3
[ERROR:vcvars.bat] Toolset directory for version '14.3' was not found.
[ERROR:VsDevCmd.bat] *** VsDevCmd.bat encountered errors. Environment may be incomplete and/or incorrect. ***
[ERROR:VsDevCmd.bat] In an uninitialized command prompt, please 'set VSCMD_DEBUG=[value]' and then re-run
[ERROR:VsDevCmd.bat] vsdevcmd.bat [args] for additional details.
[ERROR:VsDevCmd.bat] Where [value] is:
[ERROR:VsDevCmd.bat]    1 : basic debug logging
[ERROR:VsDevCmd.bat]    2 : detailed debug logging
[ERROR:VsDevCmd.bat]    3 : trace level logging. Redirection of output to a file when using this level is recommended.
[ERROR:VsDevCmd.bat] Example: set VSCMD_DEBUG=3
[ERROR:VsDevCmd.bat]          vsdevcmd.bat > vsdevcmd.trace.txt 2>&1

boost/1.86.0: ERROR: 
Package 'ac512eddf2e24b0e3aa02deb09048b5331337818' build failed
boost/1.86.0: WARN: Build folder C:\Users\Olaf\.conan2\p\b\boostded99e149e468\b\build-debug
ERROR: boost/1.86.0: Error in build() method, line 1167
        self.run(full_command)
        ConanException: Error 1 while executing
Process failed because did not return a successful return code. Returned 1

Even if I set compiler.runtime_version=v144 I wasn't able to successfully compile the recipes (Somewhere in the logs I saw v14.4, can't remember where, vswhere doesn't seems to show it).

Have I forgotten something, or is the Boost recipe not intended for this?

The conanfile.py is nothing special:

from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMakeDeps, cmake_layout
from conan.tools.files import load, save
import json
import os

class IbisConan(ConanFile):
    settings = "os", "compiler", "build_type", "arch"

    def requirements(self):
        self.requires('boost/1.86.0')
        self.requires('cli11/2.4.2')
        self.requires('fmt/11.0.2')
        self.requires('range-v3/0.12.0')
        self.requires('strong_type/v15')

    def layout(self):
        cmake_layout(self)

    def generate(self):
        deps = CMakeDeps(self)
        deps.generate()
        tc = CMakeToolchain(self)
        tc.user_presets_path = "ConanCMakePresets.json"
        tc.generate()
@ibis-hdl ibis-hdl added the question Further information is requested label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant