-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[bug] [lockfiles] Build-require XXX cannot be found in lockfile #10345
Comments
Hi, I tried to create a small test to reproduce this error (I think it also affects me) but I think in my case i'm hitting another error (might be related?): tool/1.2.3
lib/1.2.3 with a build_requires
and a consumer conanfile.txt
After exporting recipes I follow with the typical commands to create base & specialized lockfiles:
And in the install phase I get an exception:
Interestingly if I generate the base lockfile providing
|
Sorry in my previous comment I had a bug in the reproduciton example. This should be good: tool/conanfile.py
lib/conanfile.py
consumer/conanfile.txt
Reproduction script
Output:
And the lockfile contents looke like this: base.lock
specific.lock
What is the reason why conan is not incorporating the build_requires into the build? Unfortunately this isue makes implementing something like https://docs.conan.io/en/latest/versioning/lockfiles/ci.html# borderline impossible if build_requires are present into the mix. |
Yes maybe my example is not suitable to reproduce this bug. Because if you don't use |
This referred to old Conan 1.X lockfiles. Lockfiles have been fully revamped in Conan 2.0, I am closing this ticket as outdated, please create new tickets referring to the new lockfiles for any further question or issue. Thanks! |
I've prepared a reproducible example, didn´t have time to investigate the underlying issue:
Environment, compiler, profiles,...:
conanfile.txt
Commands
Create base lockfile (note the
--build
):Specialize it for a given configuration:
And then, try to install-build everything needed:
Error is not enough to know the recipe that build-requires this
automake
and fails. My guess is that there is some build-require that also build-requiresautomake
, and this transitive expansion is not done while creating the lockfile with--build
.I could probably work around it if I build all the build-requires first and then remove the
--build
from the command line, but it would really make the process more complex.The text was updated successfully, but these errors were encountered: