-
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] ERROR: Build-require 'nasm' cannot be found in lockfile #13162
Comments
Hi @BoilerTom90 Thanks for your question. Quick question about your reported case: is the lockfile captured for the same recipe/package that is being used later to apply that lockfile? Because one possible cause could be applying a lockfile to a different package in the graph. Lockfiles in 1.X capture the whole graph, with the relations. When applied to a different package in the graph, it might be difficult to find the matching reference in the lockfile, and this could be causing the issues. |
Here's how the lock file was created: This is actually part of a CMake environment, and I'm using conan.cmake. My CMake script does the following:
I'm not sure I answered your question, but I believe the answer to your question is yes, same version and recipe... but as I pointed out above, I find it interesting that I can invoke I was reading up on conan 2.0 and lock files. Since we're using conan as consumers from within Cmake, we make use of conan.cmake. I got the impression there currently isn't a conan.cmake yet in the works for conan 2.0. That's going to make it difficult to migrate to 2.0. |
Might be related to #12719 |
Sorry this was not followed up back then. 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! |
Environment details
Steps to reproduce
Running the
conan install
command shown below yields the error in the title of this issue.I'm confused because the
nasm
entry is in the lockfile. I saw two similar conan tickets (10345, 10544) about this issue, but in both of those cases, the issue I believe was the build requires dependency was also a regularrequires
dependency. I don't think that's my issue.nasm
is only abuild_requires
dependency.Pertinent section of conanfile.txt
Pertinent sections of conan.lock
Complete conanfile.txt and conan.lock files:
conanfile.txt
conan.lock.txt
Interesting Data Point ...
Our conan install used to work with the same set of dependencies. when it works, we were not explicitly specifying the build_requires dependencies. We just let conan figure that out. Also, when running conan install, we were using the conanfile.txt instead of a conanlock file. We want to use the conan lock file so we can lock in the versions and recipes for dependencies and transitive dependencies. So, I don't know if the root issue is installing with a conan lock file, or explicitly specifying the
build_requires
section, or a combination of both.Logs
Entire output from running conan install:
The text was updated successfully, but these errors were encountered: