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] onanException: Invalid setting 'baremetal' is not a valid 'settings.os' value. #10412

Closed
GDelevoye opened this issue Jan 24, 2022 · 4 comments

Comments

@GDelevoye
Copy link

Environment Details (include every applicable attribute)

  • Operating System+version: Ubuntu LTS 20.04.3
  • Compiler+version: gcc 9.3
  • Conan version: 1.44.1
  • Python version: 3.10.0

Steps to reproduce (Include if Applicable)

Install this recipe : fmt/8.0.1: revision 25e2134351cb1a3be5fc0f5fe56aec14

Logs (Executed commands with output) (Include/Attach if Applicable)

(cpp) guillaume@A320MA:~/GitHub/C++/Fallback/build$ conan install .. --build=missing
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

fmt/8.0.1: Not found in local cache, looking in remotes...
fmt/8.0.1: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.42k]                                          
Downloading conanfile.py completed [4.42k]                                               
Downloading conan_export.tgz completed [0.24k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
fmt/8.0.1: Downloaded recipe revision 25e2134351cb1a3be5fc0f5fe56aec14
ERROR: fmt/8.0.1: Error in config_options() method, line 52
        elif self.settings.os == "baremetal":
        ConanException: Invalid setting 'baremetal' is not a valid 'settings.os' value.
Possible values are ['AIX', 'Android', 'Arduino', 'Emscripten', 'FreeBSD', 'Linux', 'Macos', 'Neutrino', 'SunOS', 'Windows', 'WindowsCE', 'WindowsStore', 'iOS', 'tvOS', 'watchOS']
@memsharded
Copy link
Member

Hi @GDelevoye

It seems for some reason your cache settings.yml was not migrated properly while upgrading. The most typical reason is that it had some local modifications, or you have your own settings.yml. You can solve this by:

  • removing the Conan cache ~/.conan/settings.yml, and let conan create a new one.
  • or, add yourself baremetal to your settings.yml

In parallel, it could be suggested to conan-center-index repo about the fmt recipe that they could try self.settings.get_safe("os") == "baremetal" instead, so it doesn't fail (though reviewers there could reject this, saying that for ConanCenter, an updated compatible settings.yml is necessary.

@jwillikers
Copy link
Contributor

jwillikers commented Jan 27, 2022

This should be fixed for the package in Conan Center by conan-io/conan-center-index#9098

@GDelevoye
Copy link
Author

It seems that this is indeed what happened !

Should't the .conan data files be removed after a pip uninstall or for forced reinstallation ?

Apart from that I use this post as an occasion to thank you guys for developping conan. It is the tool that developpers have been waiting for , and it reconciled me with C++

@memsharded
Copy link
Member

Hi @GDelevoye

No, one "conan" tool instalation can have multiple .conan folders, like one per user, or actually tons of thems if using CONAN_USER_HOME, like in a CI environment. There is no 1-1 correspondence between the tool and the data. So we try to apply migrations over the data folder when it is possible, and we even have one for updating the settings.yml. But it is not smart enough to merge, and if it detects changes in user settings, then it will not upgrade them to the latest ones. We prefer to be "safe" not destroying user files, than the opposite, even if sometimes there could be issues like this one.

Apart from that I use this post as an occasion to thank you guys for developping conan. It is the tool that developpers have been waiting for , and it reconciled me with C++

Thanks very much for your kind words! That really means a lot and encourages us to keep working hard on it. If Conan 1.X is good, wait to see Conan 2.0, we are very excited about it. Keep the feedback coming!

If the issue was then solved, maybe we can close this issue already? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants