Repository navigation
android: build Xwayland from an explicit source dir - #3
Merged
Merged
Conversation
`meson setup` takes the *current directory* as the source tree when it is given a
single positional argument, and this script never changed directory. So the build
dir it configures depends on where the caller happens to stand: run it from the
gamescope checkout — which gamescope's package script now does on every pack —
and meson configures gamescope's tree into `build-android` with Xwayland's
cross file. Xwayland's cross file defines only `c`; gamescope's meson.build is
C++, so compiler detection fails with
meson.build:1:0: ERROR: 'cpp' compiler binary not defined in cross file
and the reported source dir in that error is gamescope's, not this tree's.
Both directories are now named on the command line, matching what the xkbcomp
setup in the same script already did, so the build dir is configured against
Xwayland wherever the script is invoked from. The failure is non-destructive —
meson aborts during compiler detection, before writing coredata.dat, so an
existing build dir keeps its correct source dir.
Verified from both directories: `Source dir: .../gamenative-xwayland`, then
`ninja: no work to do.` and rc 0, from the gamescope checkout and from this one,
with `build-android/hw/xwayland/Xwayland` left intact.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
meson setuptreats the current directory as the source tree when it is given a single positional argument, andandroid/build-xwayland.shnever changed directory. The build dir it configures therefore depended on where the caller stood.That was latent while the script ran only when
Xwaylandwas missing. With GameNative/gamescope#29 the gamescope package script runs it on every pack, from the gamescope checkout, and the failure is:meson was configuring gamescope's tree into Xwayland's build dir, with Xwayland's cross file — which defines only
c, while gamescope'smeson.buildis C++. Nothing is wrong with the cross file or the NDK, and the reported source dir is the giveaway.Fix
Both directories are named explicitly, matching what the xkbcomp setup in the same script already did:
Verification
Run from the gamescope checkout, which is the failing case:
and from this repo's own directory, same result.
bash -nclean;build-android/hw/xwayland/Xwayland(2 052 456 bytes) intact throughout.The failure is non-destructive — meson aborts during compiler detection, before
coredata.datis written, so an existing build dir keeps its correct source dir and no clean is needed.