question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] How to use customed settings.yml I already `conan config install`?

See original GitHub issue

Hello, Here, by default, my default ~/.conan/settings.yml didn’t have libcxx = libc++ in gcc, but I will provide the tool chain from other place. What I need is to add a custom settings.yml like

compiler:
  gcc:
    version: [ "8.3.0", "830" ]
    libcxx: [ libstdc++, libstdc++11, libc++ ]

to make sure my profile could pass conan check with ~/.conan/settings.yml. I follow the doc to conan config install my_settings.yml it, but it still

ERROR: Invalid setting 'libc++' is not a valid 'settings.compiler.libcxx' value.
Possible values are ['libstdc++', 'libstdc++11']
Read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-invalid-setting"

I already install the config, but it seems never enabled? I try to delete default settings.yml,

~/.conan/my_config/settings.yml
0: {'type': 'dir', 'uri': '~/my_config', 'verify_ssl': True, 'args': None, 'source_folder': '~/my_config, 'target_folder': 'my_config'}

but it appears again. How could I enable my settings.yml? Docs said conan config install settings.yml will Override default config, but it’s not?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
benet96commented, Aug 16, 2021

Perhaps it might need more constraints if we hope compiler’ arguments is configured as simple as settings like just compiler.libcxx=libstdc++. Copmilers could take more than just one but a series of options, like clang has a list to find candidate GCC toolchain installed, and make a decision to add which path of stdc++ headers to include in compatible with which libstc++.so to link. If it’s gcc with libc++, we have add -nostdxxx and -isystem path/to/clang/c++/headers. But -isystem word and CMake SYSTEM is rare to see in conan project.

If you are going to have custom logic for your builds, I’d recommend to consider the extensibility of the CMakeToolchain: https://docs.conan.io/en/latest/reference/conanfile/tools/cmake/cmaketoolchain.html#extending-and-customizing-cmaketoolchain. It is quite powerful, you can create your logic, put it in a python_requires and use it through your recipes. The CMakeToolchain is still experimental, but it is quickly stabilizing.

Yes, CMakeToolchain is really cute… (To write some RayTracer project…) Because I have already seen how to build toolchain in Bazel by starlark and, I have to say that’s really hurt… And I love CMakeToolchain again…

1reaction
benet96commented, Aug 16, 2021

--type file might be automatically deduced yes, here is an excerpt of the code:

 elif os.path.isdir(uri):
                config.type = "dir"
            elif os.path.isfile(uri):
                config.type = "file"

It should be there for extra check and some backward compatibility, as the file support was added later to the feature, and to avoid fallbacks to try to interpret as git or http if you want to ensure a file.

Then, did it work? Can we close the feature now?

Yes, cannot agree more. Safe check is always necessary. It did work, I will close, and really appreciate for your help, Thank you. @memsharded

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customizing settings.yml from the clean state during CI #1463
I have a project that uses custom settings, so it requires customizing settings.yml to work with. In CI environment, conan is installed into ......
Read more >
conan config — conan 1.43.4 documentation
The config install is intended to share the Conan client configuration. For example, in a company or organization, is important to have common...
Read more >
How to force conan to build from source, but only if it is not in ...
I am invoking conan install as part of an automated build script, so I would like to not have to modify the invocation...
Read more >
Changing `gitlab.yml` and `application.yml` settings | GitLab
yml setting with Omnibus GitLab, you need to do so via /etc/gitlab/gitlab.rb . The translation works as follows. For a complete list of...
Read more >
Configuring CircleCI
Designates the config.yaml for use of CircleCI's dynamic configuration feature. The setup field enables you to conditionally trigger configurations from outside ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found