[bug] "conan install" detects the wrong compiler version with gcc 10 and fails

See original GitHub issue

I am trying to upgrade one of my projects to use gcc 10 so I can use some C++20 features, but I ran into some issues with Conan not wanting to cooperate with the newer gcc version.

See this question for my initial findings: https://github.com/conan-io/conan/issues/6538

It turns out that even after I add “10” as a valid compiler version in “~/.conan/settings.yml” the “conan install” command still looks for the wrong version and fails saying that “1” is not a valid version.

As a temporary workaround I am able to add “1” to the list of versions in “~/.conan/settings.yml” but there’s definitely something wrong going on here. Once I add “1” it works.

Environment Details (include every applicable attribute)

  • Operating System+version: Ubuntu 19.1.0
  • Compiler+version: gcc 10.0.1
  • Conan version: 1.22.1
  • Python version: 2.7.17

Steps to reproduce (Include if Applicable)

  1. Try to use Conan with a project that uses gcc 10 as the compiler. (currently to use gcc 10 it must be built from source here https://github.com/gcc-mirror/gcc)
  2. Add version “10” as a valid compiler in “~/.conan/settings.yml”
  3. Attempt to do “conan install” for the project (it will fail saying version “1” is not valid)
ERROR: Invalid setting '1' is not a valid 'settings.compiler.version' value.
Possible values are ['10', '4.1', '4.4', '4.5', '4.6', '4.7', '4.8', '4.9', '5', '5.1', '5.2', '5.3', '5.4', '5.5', '6', '6.1', '6.2', '6.3', '6.4', '7', '7.1', '7.2', '7.3', '7.4', '8', '8.1', '8.2', '8.3', '9', '9.1', '9.2']
  1. Add version “1” to the list (even though this seems totally wrong)
  2. Try again – “conan install” will work.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tjwronacommented, Feb 17, 2020

Awesome thanks! As it turns out I actually won’t be requiring gcc 10 because moving calculations to compile time didn’t improve performance as much as I had hoped… Glad I could help find an issue though!

0reactions
memshardedcommented, Feb 17, 2020

No problem, that way it is fixed when gcc 10 is actually officially released, and more people start to use it! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting — conan 1.16.1 documentation
E.g. the package creator built packages from the recipe for gcc 4.8 and ... ERROR: Invalid setting '4.19' is not a valid 'settings.compiler.version'...
Read more >
conan install --build fails due to mismatching versions even ...
In which case for some packages I get: Compiler version specified in your conan profile: 10.3 Compiler version detected in CMake: 9.3 Please ......
Read more >
troubleshooting · master · RD51 Software and Firmware for ...
CMake Error at cmake/modules/conan.cmake:371 (message): Conan install ... error, which states that the compiler and the compiler version are not stated.
Read more >
Unable to finish tutorial "Step 3. Adding object detection" due ...
log". CMake Error at /root/develop/build-opencv_object_detection_analytics_plugin-Desktop-Debug/conan.cmake:522 (message): Conan install failed ...
Read more >
CMake: "ERROR: Package [...] build failed", error in m4 build ...
It sounds like the error is related to the conan build system's own m4_installer , rather than anything related to your system's native...
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