-
Notifications
You must be signed in to change notification settings - Fork 981
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] Unnecessary binaries getting installed #16402
Comments
Thanks very much for your detailed report. I have been investigating this, and proposed a PR #16412 with some tests. You are right, the intermediate binary is not skipped when this happen. I have done some checks in the tests:
I have been checking if it is possible to improve the "skip-binaries" computation, but it seems that this would be quite complex, a large effort. As this is mostly a performance improvement (the linkage is correct) that should happen only in certain cases (like in this case, where there are 2 instances/copies of the transitive static library, one inside the shared library and the other inside the executable), it seems that it wouldn't be a priority to improve it now. |
Hi @memsharded, thanks for the detailed explanation. Fair enough, at least we know now why this is the case and can continue using the have a nice day, |
Thanks to you for your feedback @michaelmayer When we can improve this in the future, I will try to come back here and let you know. |
I am working on #16412 that will improve this, with a better computation of what can be skipped. I had to push it to 2.10, because we want to make sure that it will not create issues skipping something that cannot be skipped and breaking, so we keep adding more tests to validate the changes. Keep tuned, it is likely that Conan 2.10 will contain this optimization |
What is your question?
Hi,
let's say we have the following dependency graph:
Usually, the
static
binaries won't be installed for theexe
, if I don't have the dependency fromexe
tostatic_b
.When I add the direct (or indirect) dependency to
static_b
however, I would expect only thestatic_b
binary to be installed. What happens instead is conan installs bothstatic_a
andstatic_b
binaries.To get rid of this I would have to mark the requirement from
shared
tostatic_a
asvisible=False
.Of course this example is rather small, simple and ridiculous. In real life it happened through the
zlib
, and it took me quite some time to figure out why the "static_a" suddenly popped up for the consumers of theshared
lib.Is there a reason for this?
Regards,
Michael
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: