-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Cross compiling with a native dependency from a subproject #10947
Comments
The quickjs subproject overrides a cross version of the dependency. But you tried to look up a native version of it. |
You are right, I forgot the native flag for the executable but even with it it doesn't work? This is the updated meson example:
and the logs:
|
The |
I hope I'm not in way over my head, but could you point me to what prevent from using the same cross compilation configuration for the subprojects? I would like to take a look at it if you think it's possible for someone without experience in the Meson codebase |
On a related note: whenever this is implemented, I'd appreciate if native subprojects would not install as well, since the only (I think?) reason to have something native is to use it exclusively during build. |
Meson currently doesn't support subprojects to be native and non-native at the same time. See: mesonbuild/meson#10947 Unfortunately, sdb depends on rz_util which in turn depends on PCRE2. Excluding PCRE2 from the native build makes linking of rz_util not possible anymore. Adding it, will make Meson complain that the dependencies cannot be mixed. Hence, we compile a copy of PCRE2 for the native build if required.
* Replace OpenBSD regex library with PCRE2. PCRE2 has way better performance than the OpenBSD library (something around 20 times faster). The following flags are enabled for every pattern: - PCRE2_UTF - PCRE2_MATCH_INVALID_UTF - PCRE2_NO_UTF_CHECK All the others are optional. Changes made: - Adds PCRE2 as subproject. - Changes the API away from POSIX to PCRE2. - Edits many regex patterns because: - ' ' is skipped in patterns, if the EXTENDED flag is set for matching. '\s' must be set now. - '.' doesn't match newlines by default. - Changes the API so matches and their groups are bundled into PVectors. - Moves the regex component to rz_util. * Fix cross build - add copy of PCRE2 dependecy Meson currently doesn't support subprojects to be native and non-native at the same time. See: mesonbuild/meson#10947 Unfortunately, sdb depends on rz_util which in turn depends on PCRE2. Excluding PCRE2 from the native build makes linking of rz_util not possible anymore. Adding it, will make Meson complain that the dependencies cannot be mixed. Hence, we compile a copy of PCRE2 for the native build if required.
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
I'm currently working on solving this. As of this evening it works as long as a subproject is only needed for either |
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Where we cannot use the same subproject state for both machines. We may not even need to use a subproject for both machines, for example if the build machine has a dependency installed, and we only need to fall back to a subproject for the host machine. Fixes: mesonbuild#10947
Describe the bug
I'm not sure of this is the same as #8043 because it says something about CMake there. But, I can't seem to compile a native dependency that is fetched using the wrap system when cross compiling to a different system. It will build the subproject but say nothing was found. Here is the full log:
log
To Reproduce
A minimal meson.build for example:
with a subproject containing quickjs from Frida.
Just need to cross compile it.
Expected behavior
The expected behavior of course would be that it would work just like without cross compilation.
system parameters
The text was updated successfully, but these errors were encountered: