Closed ericriff closed 5 days ago
Hi @ericriff
Thanks for your report.
Something similar was recently discussed in https://github.com/conan-io/conan/issues/16479.
This is mostly by design. Profiles try to do as little processing as possible, and take the user inputs as-is. The reason for this was users wanting to define some inputs with actual spaces or with actual quotes, or even with quotes and internal escaped quotes, and Conan stripping them was not great.
I see. So the guidelines are to set string-like variables with no quotes at all? What about dict-like variables, e.g.
tools.build:compiler_executables = {"cpp": "arm-poky-linux-gnueabi-g++", "c": "arm-poky-linux-gnueabi-gcc"}
Yes, conf
allows complex Python objects like dicts and lists. Those are loaded evaluating the string defining them.
So the design/logic is as the examples in https://docs.conan.io/2/reference/config_files/profiles.html and other parts of the docs:
eval()
and assigned. The inner elements of the dict/list might need quoting, because Conan is not loading them, but Python is.
Describe the bug
OS: Ubuntu 22.04 Conan: 2.7.0
I configured my cross-compilation profile like this
In most scenarios it works fine, but some recipes fail to build because conan doesn't remove the quotes from
tools.build:sysroot
. I can easily reproduce this by doing(notice that there is a single quote followed by a double quote) It works if I use no quotes at all on the profile, which is not the end of the world but I don't think it s the right solution. One affected recipe is
openssl/3.x.x
, see this but report: https://github.com/conan-io/conan-center-index/issues/4821How to reproduce it
No response