-
Notifications
You must be signed in to change notification settings - Fork 985
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] Howto avoid "Requirement 'x' not in lockfile 'requires'" with input from conan graph build-order #17363
Comments
Hi @marlamb Thanks for your question. I'd say it is very likely that the lockfile or If you don't use Could you please try to check this? If this is not then:
We would like to have a bit more of details to reproduce this. If you can share the exact commands you are using to capture this lockfile, that would help to reproduce and understand. Thanks! |
Hi @memsharded , thanks for the quick reply. I created a minimal example that reproduces the error. It is greatly simplified and does steps manually instead of reading some of the files, but I hope it helps nevertheless to detect the underlying issue. I use the following file structure
The content of the files is:
and finally the
I saw the |
Thanks very much for the detailed reproducible case, it really helped! This helps a lot to quickly identify issues. The missing thing is that:
Is missing the
Note that you want to build the In the Please let me know if this helps. |
Yes, indeed this seems to solve the issue. I will try that out on a bigger problem in the next days. I was hoping to be able to use I extended my example a little in order to check that I got everything right also with respect to cross-build situations, but still have some questions (will follow after the example). It now looks like this:
The files are:
The key point is obviously where I assemble the arguments for the |
Not necessarily, see my comments in the PR for the For running
Steps 2 and 3 will be automated by the new In any case, given the above link, I'd probably recommend If you haven't yet, please check conan-io/docs#3799, hopefully it will be published soon. |
Thanks for pointing out to the PR, it contains really a lot valuable information! Now (I think) I understand, why you are building the But I don't think that this is the only possible design. Within the system I use no Do you think it is possible to treat
I don't get the "leave building from |
Note: the
To clarify, a
Which is slightly different to the
When building all packages in a dependency graph that didn't get changes to their source code, but they need to be rebuilt because some of their dependencies did change, then the So what I mean didn't rebuild twice the same thing, I am just suggesting that implementing the CI pipeline with Please let me know if this clarifies the questions. |
Hi,
I am using
conan graph build-order
to determine the build order for the complete dependency tree of our central project given a central lockfile. Then I use the result to build the dependencies one by one, again using the central lockfile, to ensure consistency. Now it turns out that in some situations the central lockfile does not have a requirement in the correct section (requires vs build-requires). E.g. I have a requirement tolibcurl
, which in turn has a build requirement tolibtool
, which in turn has a requirement toautomake
. In my lockfilelibtool
andautomake
are part of the build-requires, which makes sense. But when I do theconan create <path_to_libtool_recipe> --lockfile=<central_lockfile> <settings_and_options_parsed_from_conan_build_order_json>
it fails withI also saw the problem the exact other way around (often also in test packages).
I read about
--lockfile-partial
, which (if I understand it correctly) is also not what I want, as it would loosen almost everything, but in general I of course want that the exact libs/recipe revisions from the lockfile are used.My question is: is there a way to avoid the error while still ensuring that only defined versions/recipe revs are used? Note that using
conan install
would not be ideal for me, as I would like to execute also the test packages (recipes might change along and I want to ensure that they still work as intended).Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: