Skip to content
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

Make Xwayland optional at runtime #294

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Make Xwayland optional at runtime #294

merged 1 commit into from
Dec 11, 2023

Conversation

emersion
Copy link
Contributor

Closes: #293

@Winterhuman
Copy link

Winterhuman commented Nov 26, 2023

I'm trying to compile this pull, but I keep getting this from ninja:

$ meson build --buildtype=release -Dxwayland=true
The Meson build system
Version: 1.3.0
Source dir: /home/user/cage
Build dir: /home/user/cage/build
Build type: native build
Project name: cage
Project version: 0.1.5
C compiler for the host machine: cc (gcc 13.2.1 "cc (GCC) 13.2.1 20230801")
C linker for the host machine: cc ld.bfd 2.41.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: YES (/usr/bin/pkg-config) 2.0.3
Run-time dependency wlroots found: YES 0.18.0-dev
Run-time dependency wayland-protocols found: YES 1.32
Run-time dependency wayland-server found: YES 1.22.0
Run-time dependency xkbcommon found: YES 1.6.0
Library m found: YES
Program wayland-scanner found: YES (/usr/bin/wayland-scanner)
Program git found: YES (/usr/bin/git)
Build-time dependency scdoc found: YES 1.11.2
Program /usr/bin/scdoc found: YES (/usr/bin/scdoc)
Program sh found: YES (/usr/bin/sh)
Configuring config.h using configuration
Message: 
Cage 0.1.5-1f3e304 (branch 'master')

    xwayland: true

Build targets in project: 2

cage 0.1.5

  User defined options
    buildtype: release
    xwayland : true

Found ninja-1.11.1 at /usr/bin/ninja
Cleaning... 0 files.                                                                                                    
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.

---

$ ninja -C build
ninja: Entering directory `build'
[3/10] Compiling C object cage.p/idle_inhibit_v1.c.o
FAILED: cage.p/idle_inhibit_v1.c.o 
cc -Icage.p -I. -I.. -I/usr/include/pixman-1 -I/usr/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -DWLR_USE_UNSTABLE -Wundef -Wno-unused-parameter -MD -MQ cage.p/idle_inhibit_v1.c.o -MF cage.p/idle_inhibit_v1.c.o.d -o cage.p/idle_inhibit_v1.c.o -c ../idle_inhibit_v1.c
../idle_inhibit_v1.c:11:10: fatal error: wlr/types/wlr_idle.h: No such file or directory
   11 | #include <wlr/types/wlr_idle.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[4/10] Compiling C object cage.p/seat.c.o
FAILED: cage.p/seat.c.o 
cc -Icage.p -I. -I.. -I/usr/include/pixman-1 -I/usr/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -DWLR_USE_UNSTABLE -Wundef -Wno-unused-parameter -MD -MQ cage.p/seat.c.o -MF cage.p/seat.c.o.d -o cage.p/seat.c.o -c ../seat.c
../seat.c:22:10: fatal error: wlr/types/wlr_idle.h: No such file or directory
   22 | #include <wlr/types/wlr_idle.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[5/10] Compiling C object cage.p/cage.c.o
FAILED: cage.p/cage.c.o 
cc -Icage.p -I. -I.. -I/usr/include/pixman-1 -I/usr/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -DWLR_USE_UNSTABLE -Wundef -Wno-unused-parameter -MD -MQ cage.p/cage.c.o -MF cage.p/cage.c.o.d -o cage.p/cage.c.o -c ../cage.c
../cage.c:28:10: fatal error: wlr/types/wlr_idle.h: No such file or directory
   28 | #include <wlr/types/wlr_idle.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[6/10] Compiling C object cage.p/xwayland.c.o
FAILED: cage.p/xwayland.c.o 
cc -Icage.p -I. -I.. -I/usr/include/pixman-1 -I/usr/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -DWLR_USE_UNSTABLE -Wundef -Wno-unused-parameter -MD -MQ cage.p/xwayland.c.o -MF cage.p/xwayland.c.o.d -o cage.p/xwayland.c.o -c ../xwayland.c
In file included from ../xwayland.c:15:
../server.h:7:10: fatal error: wlr/types/wlr_idle.h: No such file or directory
    7 | #include <wlr/types/wlr_idle.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[7/10] Compiling C object cage.p/output.c.o
FAILED: cage.p/output.c.o 
cc -Icage.p -I. -I.. -I/usr/include/pixman-1 -I/usr/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -DWLR_USE_UNSTABLE -Wundef -Wno-unused-parameter -MD -MQ cage.p/output.c.o -MF cage.p/output.c.o.d -o cage.p/output.c.o -c ../output.c
../output.c:29:10: fatal error: wlr/types/wlr_output_damage.h: No such file or directory
   29 | #include <wlr/types/wlr_output_damage.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[8/10] Compiling C object cage.p/view.c.o
FAILED: cage.p/view.c.o 
cc -Icage.p -I. -I.. -I/usr/include/pixman-1 -I/usr/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -DWLR_USE_UNSTABLE -Wundef -Wno-unused-parameter -MD -MQ cage.p/view.c.o -MF cage.p/view.c.o.d -o cage.p/view.c.o -c ../view.c
In file included from ../view.c:19:
../output.h:6:10: fatal error: wlr/types/wlr_output_damage.h: No such file or directory
    6 | #include <wlr/types/wlr_output_damage.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[9/10] Compiling C object cage.p/xdg_shell.c.o
FAILED: cage.p/xdg_shell.c.o 
cc -Icage.p -I. -I.. -I/usr/include/pixman-1 -I/usr/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -DWLR_USE_UNSTABLE -Wundef -Wno-unused-parameter -MD -MQ cage.p/xdg_shell.c.o -MF cage.p/xdg_shell.c.o.d -o cage.p/xdg_shell.c.o -c ../xdg_shell.c
In file included from ../xdg_shell.c:17:
../server.h:7:10: fatal error: wlr/types/wlr_idle.h: No such file or directory
    7 | #include <wlr/types/wlr_idle.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.

Sorry if this is trivial to fix, I'm trying to follow https://github.com/cage-kiosk/cage/wiki/Installation as closely as I can.

EDIT: I think it's related to #281

@emersion
Copy link
Contributor Author

Yeah, it's trying to build with wlroots 0.18, however cage needs wlroots 0.17 at the moment.

@joggee-fr
Copy link
Collaborator

wlroots 0.17 is even a work in progress right now, wlroots 0.16 branch is OK for current master.
Funny, I was thinking of adding a lazy/force/none command line option to control XWayland behavior at runtime (inspired by Sway once again).

@emersion
Copy link
Contributor Author

Oh right, got versions mixed up.

Funny, I was thinking of adding a lazy/force/none command line option to control XWayland behavior at runtime (inspired by Sway once again).

Yeah, I wonder how useful that'd be. "force" doesn't seem very useful, and "none" is not super different from "lazy" and ending up never connecting...

@joggee-fr
Copy link
Collaborator

Yeah, I wonder how useful that'd be. "force" doesn't seem very useful, and "none" is not super different from "lazy" and ending up never connecting...

A (minor) benefit for a command line argument I can think of is to ensure XWayland is well disabled even when using a Cage which can support it. This is the case for example with a Cage binary provided by a distro package.

@emersion emersion merged commit 34eb3ec into master Dec 11, 2023
10 checks passed
@emersion emersion deleted the optional-xwayland branch December 11, 2023 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cage fails if /usr/bin/Xwayland doesn't exist, even for Wayland-only apps
3 participants