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

[bug] setting 2nd level settings forces specifying 1st level setting even if it exists. #6684

Closed
fulara opened this issue Mar 14, 2020 · 1 comment

Comments

@fulara
Copy link
Contributor

fulara commented Mar 14, 2020

Following great comment from SSE4: #6157 (comment) Which actually saved my day as I thought that I am doomed and unable to migrate from cppstd tocompiler.cppstd I went to test it.

However I was met with a slightly off behavior, upon invoking:
conan create . lib1/1.0@ -s compiler.cppstd=14 -s lib0:compiler.cppstd=17
I am getting an error:

ERROR: /home/fulara/.conan/data/lib0/1.0/_/_/export/conanfile.py: compiler not defined for compiler.cppstd
Please define compiler value first too

Even though the compiler value already exists, see full output:

[fulara@localhost lib1]$ conan create . lib1/1.0@ -s compiler.cppstd=14  -s lib0:compiler.cppstd=17
[HOOK - attribute_checker.py] pre_export(): WARN: Conanfile doesn't have 'url'. It is recommended to add it as attribute
[HOOK - attribute_checker.py] pre_export(): WARN: Conanfile doesn't have 'license'. It is recommended to add it as attribute
[HOOK - attribute_checker.py] pre_export(): WARN: Conanfile doesn't have 'description'. It is recommended to add it as attribute
Exporting package recipe
lib1/1.0 exports_sources: Copied 1 '.h' file: h.h
lib1/1.0 exports_sources: Copied 1 '.cpp' file: h.cpp
lib1/1.0 exports_sources: Copied 1 '.txt' file: CMakeLists.txt
lib1/1.0: The stored package has not changed
lib1/1.0: Exported revision: 110ee250f4990ce2f2a348d460cc0b60
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=14
compiler.libcxx=libstdc++
compiler.version=8
os=Linux
os_build=Linux
lib0:compiler.cppstd=17
[options]
[build_requires]
[env]

ERROR: /home/fulara/.conan/data/lib0/1.0/_/_/export/conanfile.py: compiler not defined for compiler.cppstd
Please define compiler value first too

I am forced to do this nasty command:
conan create . lib1/1.0@ -s compiler.cppstd=14 -s lib0:compiler=$(conan profile get settings.compiler default) -s lib0:compiler.cppstd=17

I've chatted with SSE4 and he said:

(...) no, might be some limitation in code, I'd suggest you to create an issue
@AbrilRBS
Copy link
Member

AbrilRBS commented Jun 5, 2023

Closing following #6702 (comment)

@AbrilRBS AbrilRBS closed this as completed Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants