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] Conversion of AutoToolsBuildEnvironment based recipe to conan v2.0 unsuccessful #13384
Comments
Hi @sorny92 Thanks for your question. Your issue might not be that related to the helper, but to the fact that |
Did you manage to make it work @sorny92 with that hint? |
It did not fix it, but the problem was what I mentioned in the Issue. If you are curious about this is the link to the library: We build a custom embedded Python so there's some dependencies that are just needed to build the dependency tree, as such tool_requires are ideal because they don't leak requires to whatever consumer uses embedded_python. We are not really using it as it should I guess but that's better than leaking all those build time dependencies to the consumers |
With Conan 2.0, the dependencies are not leaked to consumers (in the headers + linkage meaning), because the new dependency graph takes care of that. The recipe of the dependency might still be needed, to correctly compute the I suggest having a look to the first video in https://docs.conan.io/2/knowledge/videos.html, it will explain the new "traits" in 2.0. For a even-more decoupling approach, it would be the "re-package" concept, this is planned in the 2.X roadmap, this is the ticket that you could track to see progress: #13171 |
In our case the dependency that failed was |
If you are using zlib strictly as a tool (you only want the executable to unzip things), it is perfectly valid to use it as If any library links with zlib libraries, then by default Conan 2.0 will propagate things to make conflict if that consumer library is static (because you can only link statically 1 version of zlib), otherwise, Conan 2.0 makes possible to hide static libraries by shared libraries to avoid these conflicts. There is also a explicit |
A tool needs to link to zlib library (there's no executable) but only during the build step. That's the weird part. As you say, if it's an executable it's easy, but it's just dynamically linking during the build process. So setting zlib as a require but with |
Yes, that might be one of the cases that would benefit from Also it depends on the "embedded_python" |
What is your question?
I have a recipe which uses
AutoToolsBuildEnvironment
to manage the build process.The key part more or less looks like this:
This recipe has some
build_requires
sotools.environment_append(env_vars)
it's used to exposeCFLAGS
andLDFLAGS
to make.I'm trying to convert this recipe to conan 2 but I'm suffering a problem when
self.conanfile.run("make install -j8")
is run as it won't be able to find one of the libraries that is atool_requires
.I understand the key part is not being able to do properly
with tools.chdir("./build"), tools.environment_append(env_vars)
with conan 2.I've replicated https://github.com/conan-io/conan-center-index/tree/master/docs/package_templates/autotools_package for my package but I haven't been able to succeed.
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: