Closed DavidZemon closed 4 years ago
Oh, and btw, if I do conan install ...
for the iodb
package, that's shows you why Catch2
was getting pulled in:
...
...
conanfile.py (iodb/2.3.1): Installing package
Requirements
Packages
Build requirements
Catch2/2.6.1@catchorg/stable from 'rlc' - Cache
googletest/1.8.1@wsbu/stable from 'rlc' - Cache
wsbu-docgen/0.1.3@wsbu/stable from 'rlc' - Cache
...
...
Hi @DavidZemon, this sounds similar to #6067 (related to build requirements), do you have a test_package
folder?
If so, does removing it "fixes" the issue? This might be the same bug.
I deleted the test_package
folder from iodb, then rebuilt it as iodb/2.3.1@foo/bar
, then went back to the "big" application with the lockfile and the error remains: ERROR: 'Catch2' cannot be found in lockfile for this package
Was there a different test_package
folder you were referring to?
No, it seems to be a different problem then :/
Hi, @DavidZemon
I still think that the problem is the same as #6067. For each build requires Conan creates a different node in the graphlock, so Catch2
should appear several times in your graph, at least:
conanfile.txt
iodb
and those two nodes are different, with different ID.
It looks like you are reusing an existing lockfile (/home/david/reusable/Documents/Programming/RedLion/base/targets/s5t/conan/conan.lock
) that doesn't contain the node for the Catch2 as a BR of iodb
and, as you are requesting to build everything from source, Conan generates the full graph (with all the build_requires) and that particular node is not found in the existing lockfile (it isn't in the lockfile you have copy-pasted).
The way to go is to generate the lockfile with all the nodes (--build '*'
) and then use it.
Let's try to identify what is causing the error first and then we can think about the way to fix it (I have a use-case in mind that could need a new feature related to the conan graph
command... and yours might need another one).
Thanks
That sounds like you hit the nail on the head. I did not realize I needed to pass --build '*'
to conan graph ...
. I'll give that a try and I'll bet it starts working :)
That did it. My lockfile is now generated with --build '*'
which allows conan install ... --build '*'
to do its thing.
I'll let you decide if this is actually a bug, but as far as I'm concerned, this is fine. Feel free to close if you'd like.
It's fine, it is how it works.
Many thanks for submitting this kind of issues, they let us know and think about all these scenarios, about how you all are using it, and with this information we are able to iterate the feature.
At first, I thought I understood exactly what this error meant. I thought it meant "you need to add
Catch2
to your lock file," which I assumed would best be done by adding it to the recipe. So I did. But the error didn't go away. Can you help me out?Please note the
--build '*'
in theconan install ...
command. We added this as an option to our firmware project as a way for the CI server to (every so slowly) verify that all of the packages work together, while developers can build complete firmware packages locally and quickly.This is Conan version 1.20.3 with Python 3 on Linux.
The error:
The recipe being used:
And the lockfile: