Bug 281771

Summary: x11-toolkits/gtk-layer-shell fails to build in poudriere testport
Product: Ports & Packages Reporter: void
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me CC: rozhuk.im
Priority: --- Flags: jbeich: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on: 281846    
Bug Blocks:    

Description void 2024-09-30 08:40:43 UTC
context: 
poudriere-git-3.4.99.20240811
host: 15.0-CURRENT #1 n271832-04262ed78d23 amd64 1500023 1500023
poudriere builder jail is 14.1-STABLE 1401502 c09ca8f43 

build fails here

[00:00:17] FAILED: src/libgtk-layer-shell.so.0.9.0.p/custom-shell-surface.c.o
[00:00:17] cc -Isrc/libgtk-layer-shell.so.0.9.0.p -Isrc -I../src -Iinclude -I../include -I../gtk-priv/h -I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0 -I/usr/local/include -I/usr/local/include/cairo -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/at-spi-2.0 -I/usr/local/include/atk-1.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/usr/local/include/fribidi -I/usr/local/include/pixman-1 -I/usr/local/include/harfbuzz -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/gio-unix-2.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/libepoll-shim -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu11 -Wno-pedantic -Werror=unused-function -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -D_THREAD_SAFE -pthread -DGTK_LAYER_SHELL_MAJOR=0 -DGTK_LAYER_SHELL_MINOR=9 -DGTK_LAYER_SHELL_MICRO=0 -MD -MQ src/libgtk-layer-shell.so.0.9.0.p/custom-shell-surface.c.o -MF src/libgtk-layer-shell.so.0.9.0.p/custom-shell-surface.c.o.d -o src/libgtk-layer-shell.so.0.9.0.p/custom-shell-surface.c.o -c ../src/custom-shell-surface.c
[00:00:17] ../src/custom-shell-surface.c:18:10: fatal error: 'gdk/gdkwayland.h' file not found
[00:00:17]    18 | #include <gdk/gdkwayland.h>
[00:00:17]       |          ^~~~~~~~~~~~~~~~~~
[00:00:17] 1 error generated.
[00:00:17] ninja: build stopped: subcommand failed.
[00:00:17] ===> Compilation failed unexpectedly.
[00:00:17] Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
[00:00:17] the maintainer.
[00:00:17] *** Error code 1
[00:00:17]
[00:00:17] Stop.
[00:00:17] make: stopped in /usr/ports/x11-toolkits/gtk-layer-shell
[00:00:18] build of x11-toolkits/gtk-layer-shell | gtk-layer-shell-0.9.0 ended at Mon Sep 30 08:35:24 BST 2024
[00:00:18] build time: 00:00:18
[00:00:18] !!! build failure encountered !!!
[00:00:44] Error: Build failed in phase: build

also fails trying to build by hand in the ports tree. It fails to find various components that are already installed.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2024-09-30 12:04:10 UTC
I can't reproduce. Also builds fine on the package cluster, see https://pkg-status.freebsd.org/beefy22/data/latest-per-pkg/gtk-layer-shell/0.9.0/140amd64-default.log

Did you disable WAYLAND in x11-toolkits/gtk30 (see gdk/gdkwayland.h in pkg-plist) ? The ports/ framework currently doesn't support overriding options in dependencies. Besides, headless or X11-only users probably want to disable gtk-layer-shell dependency (option name may vary) instead of rebuilding gtk30 with WAYLAND enabled.
Comment 2 void 2024-09-30 16:18:00 UTC
(In reply to Jan Beich from comment #1)

I've not deliberately disabled wayland, no. It was set like this:

new [X] ATK_BRIDGE AT-SPI ATK bridge support                                                                                             
new [X] COLORD     Color profile support                                                                     
new [X] CUPS       CUPS printing system support                                                              new [ ] DEBUG      Build with debugging support                                                              new [X] DOCS       Build and/or install documentation                                                        

BACKENDS [select at least one]                    

new [X] BROADWAY   Enable GDK Broadway backend for showing GTK in the webbrowser using HTML5 and web sockets.
new [X] WAYLAND    GDK Wayland backend
new [X] X11        GDK X11 backend

I'd like to remain on X11/xorg if possible, as I have an old Geforce card using nvidia-driver-470. I use xfce4 desktop.

I'll try disabling gtk-layer-shell
Comment 3 Jan Beich freebsd_committer freebsd_triage 2025-02-18 09:44:02 UTC
*** Bug 284874 has been marked as a duplicate of this bug. ***
Comment 4 commit-hook freebsd_committer freebsd_triage 2025-02-18 10:03:47 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=48495a1f33ab5af2131fc475c110c2c8a3165b29

commit 48495a1f33ab5af2131fc475c110c2c8a3165b29
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2025-02-18 09:51:15 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2025-02-18 10:02:45 +0000

    x11-toolkits/gtk-layer-shell: abort early non-Wayland builds

    ../src/api.c:19:10: fatal error: 'gdk/gdkwayland.h' file not found
       19 | #include <gdk/gdkwayland.h>
          |          ^~~~~~~~~~~~~~~~~~

    PR:             281771

 x11-toolkits/gtk-layer-shell/Makefile | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 5 Jan Beich freebsd_committer freebsd_triage 2025-02-18 10:04:08 UTC
(In reply to void from comment #2)
> I've not deliberately disabled wayland, no.

See x11-toolkits/gtk30/pkg-plist. Maybe you've disabled it via make.conf(5) instead.