-
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
[question] how to use lockfiles together with build-requires? #12719
Comments
Hello
The resulting lockfile contains again the dependency to the toolchain, this time with context: build
I still get the error. I would appreciate any help :) @memsharded: during my experiments, I might have discovered another minor bugs. Is it worth creating it as separate bug ticket? Here's a summary:
|
Duplicate of #10544? |
Thanks for the link and your hint about using 2.0 lockfiles. I will give it a try if 2.0 resovles this issue as well. I think it's not entirely a duplicate cause I dont have the dependency as both requires and build_requires but only as build_requires (which is defined in the profile). cheers |
I do not face this issue with conan 2.0. |
I'd like to add a couple comments and/or questions on this issue as I'm experiencing a similar problem when trying to use lock files with conan 1.x. I'm the one that created issue: #13162
{
"build_requires": [
"32",
"33",
"34"
],
} When I look at where some of these references are listed in the lock files, I wonder if the context value is correct. The context value is "host" throughout the entire file. Should the context value be set to build or host? "32": {
"ref": "nasm/2.15.05#799d63b1672a337584b09635b0f22fc1",
"options": "",
"package_id": "01edd76db8e16db9b38c3cca44ec466a9444c388",
"prev": "bc150d26d6dde7a726c4b39a62cecab8",
"context": "host"
}, |
Hello @BoilerTom90, I switched from build_requires to tool_requires just to see if the issue persists, this was kind of a desperate move..
I started looking into the conan 2 docs today and tried a few things. To me it also does not look ready, I was e.g. missing some features that are not marked as deprecated like https://docs.conan.io/1/reference/env_vars.html#conan-user-home |
When you switched from build_requires to tool_requires, did it make a difference? I was also thinking about hand-modifying the lock file and changing the value of the context attribute from host to build for the build_requires entries to see if that helped. Thoughts? -- Update -- Tom |
Hello,
I took your lockfile ci example and modified the profile to contain a build_requires package with my cross-compilers.
When running the lockfile ci example, I get:
How can I include the build_requires into the lockfiles?
Some more info for reference:
I'm using conan 1.55.0
Here is my lockfile-ci-example profile:
The
toolchain
package is installed locally in the cache and is used for the builds.It seems that the error appears in the simulated "product pipeline" when performing the builds detected by calculate build order, when running this command:
conan install libd/0.1 --build=libd/0.1 --lockfile=locks/app1_release.lock --lockfile-out=locks/app1_release_updated.lock"
The app1_release.lock looks like this and misses to lock the dependency to the toolchain package.
What I tried out so far:
When changing:
To not use
--reference
but instead point to theapp1/conanfile.py
, then magically, the lockfile contains the lock of the toolchain package, but the issue"ERROR: Build-require 'toolchain' cannot be found in lockfile"
remains.Is the difference between using --reference and directly referring conanfile.py intended?
Can you please give me a hint how to solve this?
Thanks and best regards
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: