-
Notifications
You must be signed in to change notification settings - Fork 994
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
Repackaging a library pulls the wrong binary package #3759
Comments
Works on Linux because I'm using |
An easy way to see the problem is when the computed binary configuration hash is different:
or just seeing that .dll files are ending up in the final (supposedly static) package:
|
Seems related to #3639 as this is a wrong behavior in the propagation of options scoped by library name |
Yes, it is true that there is a problem when the There is an onging effort to refactor the dependency graph, these issues should be considered there. Please, let us know if this issue is still important to yo in order to spend more or less time trying to solve it before the new graph arrives. Thanks! |
I switched projects so this is not critical for me. However, the alternative of forking all the recipes of all the software you want to repackages for some simple changes is awful, and plugins don't work for that use case either. It feels like the best solution for us integrators of third party software, as it keeps the code centralized, short, and your packaging changes separate from upstream. You can also either use prisitine upstream recipes, or override on the fly to use your repackaged software, as the package name is the same. Some of the causes of the repackaging could go away if a package content was more standardized in terms of paths, like in the FHS for example, or what Debian does to have license files consistently go at the same place. But I fear some downstream will always have need for repackaging, for example to remove unwanted files before shipping, and this shouldn't require full rebuilds and hard dependencies on renamed/rebranded packages. |
The issue with Conan (at the development point where we are now) is that you cannot repackage binaries AND inherit the recipe, but you can do the last one thing, which the main one. I don't find so critical to compile again the binaries for your overriden recipe (in a company you will do it, anyway, you are not going to rely on the binaries generated by someone else). As I said, we will try to keep this issue live and check it against the new graph model. Thanks again! 👍 |
Well, that's a matter of trust. Did you rebuild your Linux distro from source, or did you trust it to provide binaries on good faith? Now if you say I can't trust the official binaries provided by the Conan team, even though they're signed, then I don't need inheritance at all. Inheritance hides the recipe details, so what I'd need is to fork each package. However if I can trust Conan, I can avoid forking all the components, and closely follow the packages provided by the community and the fixes in the recipes while keeping our maintenance burden on community-maintained packages as low as possible. I can also report bugs based on the exact stuff you deliver. And then if I trust Conan, repackaging official packages without rebuilding them makes sense. |
Same as #3639, this kind of repackaging will lead to a loop in the graph: two recipes with the same name requiring each other :/ |
The context
I'm repackaging the gtest library. Basically, I'm creating a gtest package with a different version, that uses the original gtest as a build dependency. The problem comes from the way the options are interpreted. The final goal is to package an app that depends on my repackaged gtest, and that app has other dependencies, so I need to use
-o *:shared=True -o gtest:shared=False
because. To simplify, I reproduced the problem just with the recipe below.The problem
Both packages are named gtest, but
gtest:shared=False
is applied only togtest/1.8.0-mypkg@sbre/nightly
, andgtest/1.8.0@bincrafters/stable
gets*:shared=True
. This is wrong, both packages are named gtest, so both should usegtest:shared=False
. Because of that, the repackaged verision is marked as being a static lib, but contains a dynamic library, and linking fails on Windows + MSVC 15. Oddly, the CI works on Linux, I need to check how this is possible.The recipe
The logs:
Using Conan 1.8.2 on Windows Server 2016 with MSVC 15.
The text was updated successfully, but these errors were encountered: