Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conan Essentials course - exercises in "consumer" folder fail the cmake generate step ("cmake ..") #87

Open
cppal opened this issue Nov 5, 2021 · 3 comments

Comments

@cppal
Copy link

cppal commented Nov 5, 2021

  include could not find load file:

    /home/conan/training/consumer/conanbuildinfo.cmake


CMake Error at CMakeLists.txt:7 (conan_basic_setup):
  Unknown CMake command "conan_basic_setup".


-- Configuring incomplete, errors occurred!

Same outcome when running the catchup script for exercise #6.

Environment info: running in your docker on an Ubuntu terminal on Windows 11, with Docker for Windows running in WSL mode.

@memsharded
Copy link
Member

Hi @cppal

This is weird, it seems there is something that has been changed and is not correct, affecting also the catchup script. I recommend wiping up both the folder and the conan cache (conan remove "*" -f), and then quickly running the catchup script, all steps from 1 to 6.

I would say that you have changed the consumer folder during exercise 4, instead of modifying the cmake_find_package folder or something like that. It would be necessary to have the whole output of the command, not just the last lines: was the cmake generator called? Is there a message saying it generated the file?

Please try the above and let us know

@cppal
Copy link
Author

cppal commented Nov 6, 2021

@memsharded Here's something even weirder:

conan@f3914949e97b:~/training$ conan remove "*" -f
WARN: No package recipe matches '*'

And also:

conan search
There are no packages

And to top it up, here's what happens when I try to run step #1 in the catchup script:

Enter choice: 1
performing Exercise 1 (consumer, with CMake)
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=7
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

hello/0.1@user/testing: Not found in local cache, looking in remotes...
hello/0.1@user/testing: Trying with 'conancenter'...
ERROR: Unable to find 'hello/0.1@user/testing' in remot
```es

@memsharded
Copy link
Member

But this happens because you have modified the conanfile.txt in the consumer project, to add a [requires] to "hello/0.1@user/testing". But you haven't created it (exercise 5 I think), so it tries to look for it in the local cache, then in the server, and then it fails. You need to start from scratch, or make sure you create the package correctly before trying to reuse it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants