conan-io / examples2

Conan 2.x examples
MIT License
94 stars 48 forks source link

settings.os.embedded_libc value not defined #167

Closed JamesPei closed 6 days ago

JamesPei commented 1 week ago

I just try to run an example of offical tutorial when I execute conan install . --output-folder build --build=missing I got this:

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu14
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu14
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux

======== Computing dependency graph ========
Graph root
    conanfile.py: /home/XXX/github/examples2/tutorial/consuming_packages/conanfile_py/conanfile.py
Requirements
    zlib/1.2.11#fca992a7d96a1b92bd956caa8a97d18f - Cache
Build requirements
    cmake/3.22.6#32cced101c6df0fab43e8d00bd2483eb - Cache

======== Computing necessary packages ========
Requirements
    zlib/1.2.11#fca992a7d96a1b92bd956caa8a97d18f:72c852c5f0ae27ca0b1741e5fd7c8b8be91a590a - Invalid
Build requirements
    cmake/3.22.6#32cced101c6df0fab43e8d00bd2483eb:63fead0844576fc02943e16909f08fcdddd6f44b - Invalid
ERROR: There are invalid packages:
cmake/3.22.6: Invalid: 'settings.os.embedded_libc' value not defined
zlib/1.2.11: Invalid: 'settings.os.embedded_libc' value not defined
ERROR: There are invalid packages:
cmake/3.22.6: Invalid: 'settings.os.embedded_libc' value not defined
zlib/1.2.11: Invalid: 'settings.os.embedded_libc' value not defined

why? conan version is 2.9.2,and it's same at conan 2.8.0

memsharded commented 1 week ago

Hi @JamesPei

Thanks for your question.

settings.os.embedded_libc

This is not an standard default Conan setting. This means that someone added embedded_libc as an os subsetting in your settings.yml or settings_user.yml in your cache (which can be installed with conan config install)

Then, your default profile is not defining the embedded_libc, because that is a custom setting Conan is not aware of. That should be solved:

JamesPei commented 6 days ago

thank you @memsharded Problem solved. I'm just a little weird because I'm doing all this in a clean environment, so, I don't know why there are these items in the ~/.conan2/settings.yml; But that's okay. Anyway, everything's fine now

memsharded commented 6 days ago

Great, closing the issue as solved then, thanks for your feedback!