cmake-conan icon indicating copy to clipboard operation
cmake-conan copied to clipboard

Unable to build example project of https://github.com/conan-io/cmake-conan/tree/develop2

Open laxmij-cmd opened this issue 1 year ago • 12 comments

machine: CentOS Linux release 7.9.2009, 8.5.2111 Error: example-conan2 0

Please help in resolving the issue.

laxmij-cmd avatar Mar 22 '23 04:03 laxmij-cmd

adding... fmt-config.cmake is present in cmake-conan/build/conan/build/Release/generators/fmt-config.cmake

laxmij-cmd avatar Mar 22 '23 04:03 laxmij-cmd

Hi @laxmij-cmd

Could you please provide the full output and your conanfile.txt? Also not as an image, but as text (with triple backticks), that helps reading it. It is important also to run latest Conan 2.0.2, please double check that.

memsharded avatar Mar 22 '23 07:03 memsharded

conan version - 2.1.0-dev conanfile.txt: [requires] fmt/9.1.0

[layout] cmake_layout

ERROR: ''' CMake Error at conan_support.cmake:152 (string): string sub-command JSON member 'graph node 0 generators_folder' was not found. Call Stack (most recent call first): conan_support.cmake:168 (conan_install) CMakeLists.txt:7 (find_package) ''' Due to above error it is not able to get fmt-config.cmake which is existing in cmake-conan/build/conan/build/Release/generators/fmt-config.cmake

laxmij-cmd avatar Mar 22 '23 15:03 laxmij-cmd

machine: CentOS Linux release 7.9.2009, 8.5.2111

laxmij-cmd avatar Mar 22 '23 15:03 laxmij-cmd

It might be possible that develop2 branch (the one that you are running apparently) doesn't have all the changes released in latest 2.0.2 (branch release/2.0) merged back. I'd suggest trying with released 2.0.2 or release/2.0 branch, please let us know.

memsharded avatar Mar 22 '23 15:03 memsharded

from where I can access release/2.0? I cannot see at https://github.com/conan-io/cmake-conan/

laxmij-cmd avatar Mar 23 '23 04:03 laxmij-cmd

That is the Conan version, not the cmake-conan version.

You reported above conan version - 2.1.0-dev, which should only happen if you are running Conan from source (or are you getting it from PyPITest?). You can change the branch in the Conan repo to release/2.0 and pull changes.

memsharded avatar Mar 23 '23 08:03 memsharded

I initially run with conan 2.0 and cmake 3.24, still got same error, so changed to this version of conan. Is develop2 branch of cmake-conan is not stable?

laxmij-cmd avatar Mar 23 '23 09:03 laxmij-cmd

Yes, develop2 branch of cmake-conan is not stable, it is in the Readme:

⚠️ Compatibility with Conan 2.0: integration with Conan 2.0 is currently experimental, may have some limitations, and is subject to change, please read below. The code in this branch only supports Conan 2.0.2 and ablove - if you need Conan 1.x please check the develop branch.

This is the very first iteration over this, it is expected that this will evolve a lot in the following weeks

Still, this has nothing to do with the Conan version. You are running develop2 branch in the Conan repo, not in the cmake-conan repo.

memsharded avatar Mar 23 '23 09:03 memsharded

When I said "develop2" I meant "develop2" branch of cmake-conan. Sorry for the confusion.

My steps were:

  1. conan from release 2.0
  2. cmake-conan from develop2
  3. Try to build example of cmake-conan This resulted in the error which I shared.

My project is cmake based. For this reason I was trying out above steps.

laxmij-cmd avatar Mar 23 '23 09:03 laxmij-cmd

  1. conan from release 2.0

This is what seems to be a bit off. Can you please clarify how did you installed it? Because the message conan version - 2.1.0-dev is not expected from the Conan repo in the release/2.0 branch, it only happens in the develop2 branch. And my suggestion here is running release/2.0 branch in the Conan repo.

memsharded avatar Mar 23 '23 09:03 memsharded

conan 2.1.0-dev is not from conan repo in the release/2.0 branch. These were 2 different steps. I think now I understand the reason of my problem. Thanks for your help

laxmij-cmd avatar Mar 23 '23 09:03 laxmij-cmd