-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[package] openssl/3.3.2: Build fails on Windows using Clang-CL #26391
Comments
Hi @razaqq - thanks for raising this issue. I think you're just experiecing a limitation of the openssl build scripts: openssl/openssl#24939 - where clang-cl simply ignores the |
I made a small patch to work around this: vasama@e32912f Is this something that might be considered for Conan Center? |
I can confirm, the patch fixes the issue |
In principle, yes - however, upon inspecting the openssl build logs with clang-cl, I can see warnings that the optimization flag is being ignored, potentially causing the "Release" binaries to not be optimized - unsure if this is a recipe issue, an OpenSSL issue or a Conan issue. There is always a risk in patching things so that they "build" - when what we ultimately care about is that they run as intended - given that clang-cl is explicitly not supported by the upstream authors of OpenSSL, I'm not sure whether it's beneficial to the community to enable something that is so untested - especially when taking into account that this is OpenSSL. My advice would be to take advantage of the fact that clang-cl and msvc are binary compatible, and ensure that OpenSSL is built with msvc instead, by adding the following to the profile:
and in your case, ensuring that the following are not applied to openssl, by prepending with
|
That makes sense, but maybe conan should default to building openssl with msvc when clang is being used instead of failing to build at all? |
Description
Package and Environment Details
Conan profile
[settings]
arch=x86_64
build_type=Debug
os=Windows
compiler=clang
compiler.cppstd=23
compiler.runtime=dynamic
compiler.runtime_version=v144
compiler.version=17
[conf]
tools.cmake.cmake_layout:build_folder_vars+=["settings.compiler"]
tools.cmake.cmaketoolchain:generator=Ninja
tools.build:exelinkflags+=["clang_rt.builtins-x86_64.lib"]
tools.build:sharedlinkflags+=["clang_rt.builtins-x86_64.lib"]
tools.build:compiler_executables={"cpp": "clang-cl", "c": "clang-cl"}
Steps to reproduce
conan build . --build=missing --profile=clang
Logs
Click to expand log
The text was updated successfully, but these errors were encountered: