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] Unable to install grpc/1.50.1 #12646

Closed
gouriano opened this issue Dec 1, 2022 · 4 comments
Closed

[bug] Unable to install grpc/1.50.1 #12646

gouriano opened this issue Dec 1, 2022 · 4 comments
Assignees

Comments

@gouriano
Copy link

gouriano commented Dec 1, 2022

Hello
I have a simple conanfile.txt:

[requires]
grpc/1.50.1
[generators]
cmake

I run "conan install ." and get this error:

$ conan install ..
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=7
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

ERROR: googleapis/cci.20220711: Error in validate() method, line 58
    if self.settings.compiler in ["Visual Studio", "msvc"] and self.options.shared:
    ConanException: Invalid setting 'msvc' is not a valid 'settings.compiler' value.
Possible values are ['Visual Studio', 'apple-clang', 'clang', 'gcc', 'sun-cc']
Read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-invalid-setting"

I use Conan version 1.55.0
What I am doing wrong?

@jcar87 jcar87 self-assigned this Dec 1, 2022
@jcar87
Copy link
Contributor

jcar87 commented Dec 1, 2022

Hi @gouriano - thank you for reporting this.

The msvc as a compiler was added to Conan's default settings.yml in version 1.33. This file is inside the .conan folder in your user home. Typically, new versions of Conan don't update it if you have made custom changes.

You can check the current values settings.yml here: https://docs.conan.io/en/latest/index.html

On that note, this is also a small bug in the googleapis recipe in Conan Center, as there are ways of performing that check while preventing this very error you are getting. I will make sure this is also tracked as an issue in Conan Center.

Could you check if the error goes away for you if you add the msvc block to your settings.yml as it is in the most recent versions? https://docs.conan.io/en/latest/index.html

otherwise, if you don't have any custom changes the settings.yml file, you can delete it and call conan config init for Conan to recreate it with the default values.

@gouriano
Copy link
Author

gouriano commented Dec 1, 2022

I have now renamed ~/.conan/settings.yml.new into ~/.conan/settings.yml and tried again - same error
I can verify that ~/.conan/settings.yml indeed has "compiler: msvc:" entries.
Should I do something else?

It would be nice if Conan handled settings updates "automatically".

@jcar87
Copy link
Contributor

jcar87 commented Dec 1, 2022

Is the error exactly the same as before? WHen conan outputs the following messages, it lists the compilers in settings.yml.

Possible values are ['Visual Studio', 'apple-clang', 'clang', 'gcc', 'sun-cc']

And this seems to be missing quite a few, not just msvc.

Any chance you can verify that your Conan client is configured to read settings from your local home folder?
conan config home should output the directory that contains settings.yml.

I would give it a go to remove (or rename) settings.yml altogether and call conan config init so that conan re-creates it.

It would be nice if Conan handled settings updates "automatically".

Conan attempts to do this already, but stops itself when it detects the user may have local changes in the files - as it wouldn't be appropriate to clobber the user's custom changes. However Conan will warn with a message on first run after an update, such that the user can take appropriate action.

@gouriano
Copy link
Author

gouriano commented Dec 1, 2022

conan config home

Ah, this is what I have missed. Thank you very much. everything is fine now.

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

2 participants