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.

Multiple compilers, ConanMultiPackager and CMake troubles

See original GitHub issue

Hi!

I wish to package multiple packages for Linux x64, compiler with GCC/Clang.

To do so, I have two terminals. One has env vars CONAN_GCC_VERSIONS & cie, the other has the Clang variables.

The problem is that the chosen compiler (clang) is not detected by CMake when running test_package. Here is the output I get:

– The C compiler identification is GNU 7.2.0 – The CXX compiler identification is GNU 7.2.0 – Check for working C compiler: /usr/bin/cc – Check for working C compiler: /usr/bin/cc – works – Detecting C compiler ABI info – Detecting C compiler ABI info - done – Detecting C compile features – Detecting C compile features - done – Check for working CXX compiler: /usr/bin/c++ – Check for working CXX compiler: /usr/bin/c++ – works – Detecting CXX compiler ABI info – Detecting CXX compiler ABI info - done – Detecting CXX compile features – Detecting CXX compile features - done – Conan: called by CMake conan helper CMake Error at build/9fad4defe7e3af96f74f9172f136f8e10e7bf90a/conanbuildinfo.cmake:381 (message): Incorrect ‘clang’, is not the one detected by CMake: ‘GNU’

When creating a single package with conan create theo/stable -pr clang50, everything works fine:

– The C compiler identification is Clang 5.0.0 – The CXX compiler identification is Clang 5.0.0 – Check for working C compiler: /usr/bin/clang – Check for working C compiler: /usr/bin/clang – works – Detecting C compiler ABI info – Detecting C compiler ABI info - done – Detecting C compile features – Detecting C compile features - done – Check for working CXX compiler: /usr/bin/clang++ – Check for working CXX compiler: /usr/bin/clang++ – works

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:25 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
lasotecommented, Dec 7, 2017

The @uilianries fix to iterate the builds and alter the env sounds good to me, not very hacky. I’m going to try the approach of passing a profile and will report again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using CMake with multiple compilers for the same language
It's impossible to do this with CMake. CMake only keeps one set of compiler properties which is shared by all targets in a...
Read more >
Building multi-compiler C/C++ applications with conan
We are going to build OpenSSL conan package with gcc 4.9 compiler ... We only need the above profile file to mix two...
Read more >
Conan Package Tools - Porter.io
Conan package tools can generate automatically a matrix of build configurations combining architecture, compiler, compiler.version, compiler.
Read more >
How to use the conan.packager.ConanMultiPackager function ...
ConanMultiPackager examples, based on popular ways it is used in public ... def testSerialize(self): self.packager.add({"os": "Windows", "compiler": "Visual ...
Read more >
Introduction to Conan package manager - Kuba Sejdak
In the previous article of this series, I have listed several problems that we as developers have to deal with while using dependencies...
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