-
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] opencolorio/2.1.0: Cannot be built from source if profile defines compiler.libcxx #11905
Comments
A user reports being unable to build this package from source in one of the comments in the conan-io/conan#11695 thread. I have been able to reproduce this. This is a combination of a few things:
Because the variable is previously set by Conan, but not as a cache variable this call fails. I don't think CMake themselves prescribe While it could be argued that perhaps that behaviour makes the project not suitable to be included as part of a different CMake tree (rather than be the root of the tree itself), we may want to consider patching this to make the logic more robust. If done properly I'd imagine that this is something that can be contributed upstream without impacting their desired functionality. |
It should be patched to rely on cxx compile features. |
I wouldn't jump to the conclusion and disqualify these as "bad" CMakeLists. Having inspected the build script from this library, the maintainers of OpenColorIO take a cautious and sensible approach of only setting it if it was not already previously defined, and if it is previously defined, they assume a cache variable (as is the case with variables passed as command line arguments). In this instance however, it is previously defined but not as a cache variable, and thus the error. I'm not sure what the arguments are for considering this universally bad practice - setting it as a regular variable in the top-level A point to be made is that perhaps very few CMakeLists maintainers write the scripts with an eye on supporting the entire project to be included as part of a different tree - and assume they are the root tree, or that some variables are to be globally defined (as cache variables) instead of being restricted to their scope. |
Is there any workaround to fix the build on my machine? |
This has been fixed for a while now, openimageio compiles correctly in Conan 2 |
Package and Environment Details
Conan profile
Steps to reproduce
conan install opencolorio/2.1.0@ -pr clang-debug --build=missing
Logs
Click to expand log
The text was updated successfully, but these errors were encountered: