-
Notifications
You must be signed in to change notification settings - Fork 993
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 separate generator files by requirements and tool requirements #12342
Comments
I'd like to understand one thing: is the Because in that PR I see: if self._has_build_profile and self.options.get_safe("with_wayland"):
self.tool_requires("wayland/1.21.0")
self.tool_requires("wayland-protocols/1.27") But the |
@memsharded It's used as both a regular |
It's worth noting that several projects locate the There's also an important problem with the current To illustrate, the When attempting to use a separate build context directory for the pkg-config files in the build context, I think it's necessary to include all the required |
I made an oops in my previous change. This actually does end up breaking cross-compilation. The requirements of `wayland-scanner` aren't available in the build context. This causes pkg-config to fail to "find" `wayland-scanner`. The `expat` and `libxml2` files would need to be in this same directory. Omitting the separate build context directory for pkg-config files works around this issue for now. Work will need to be done upstream to ensure dependencies are also made available in the build context for PkgConfigDeps. See conan-io/conan#12342 for progress on the issue upstream. It's important to note that pointing Meson to the generators directory for "native" pkg-config files isn't the safest thing to do. It's possible for Meson to mistakenly think dependencies in the generators directory are meant for the build context when they are of course meant for the host context whenever they lack the `_BUILD` suffix. I've also placed `wayland-protocols` in the build context. While it provides XML files only, really, this maps to how it is used.
…ontext * xkbcommon: Revert using a separate directory for the build context I made an oops in my previous change. This actually does end up breaking cross-compilation. The requirements of `wayland-scanner` aren't available in the build context. This causes pkg-config to fail to "find" `wayland-scanner`. The `expat` and `libxml2` files would need to be in this same directory. Omitting the separate build context directory for pkg-config files works around this issue for now. Work will need to be done upstream to ensure dependencies are also made available in the build context for PkgConfigDeps. See conan-io/conan#12342 for progress on the issue upstream. It's important to note that pointing Meson to the generators directory for "native" pkg-config files isn't the safest thing to do. It's possible for Meson to mistakenly think dependencies in the generators directory are meant for the build context when they are of course meant for the host context whenever they lack the `_BUILD` suffix. I've also placed `wayland-protocols` in the build context. While it provides XML files only, really, this maps to how it is used. * Remove lingering import * Improve the set of topics
Update: It looks like updates for the Flex recipe are facing a similar conundrum, but regarding supplied CMake modules: conan-io/conan-center-index#14013 |
This couldn't be prioritized into 1.X, but I am moving it to 2.X, because it will get more attention there. I think this is doable by introducing a |
Implemented in #15813 for next 2.2 |
In conan-io/conan-center-index#13612
We need to do some hackery in the build script to avoid both the dependencies and build requirements (which overlap)
PkgConfigDeps
being in the same folder.@jwillikers implemented two different solutions
PkgConfigDeps.build_context_suffix
and patching the Meson build script to use the new name.Ideally there would be a generator folder for each for the advance case where we need to seperate them.
I'll get an error if I don't set the
build_context_suffix
for thewayland
package because this library requires thewayland-client
library from thewayland
package as a regular requires while simultaneously requiring thewayland-scanner
tool from thewayland
package as atool_requires
.If we were able to place the build-context pkg-config files in a separate directory from the others, this would avoid naming conflicts and the necessary patching to find the
tool_requires
dependencies. Meson would be able to handle this gracefully just by setting the standard project optionbuild.pkg_config_path
to a value including the directory for the build-context pkg-config files.Originally posted by @jwillikers in conan-io/conan-center-index#13612 (comment)
The text was updated successfully, but these errors were encountered: