Skip to content

Add Debian 12 (GTK 4.8 / libadwaita 1.2) build compatibility - #16

Open
Navigata1 wants to merge 4 commits into
no1msd:mainfrom
Navigata1:debian12-libadwaita1.2-compat
Open

Add Debian 12 (GTK 4.8 / libadwaita 1.2) build compatibility#16
Navigata1 wants to merge 4 commits into
no1msd:mainfrom
Navigata1:debian12-libadwaita1.2-compat

Conversation

@Navigata1

Copy link
Copy Markdown

What

Adds a compatibility layer so séance builds and runs on Debian 12 "bookworm", which ships GTK 4.8.3 and libadwaita 1.2.2 — older than séance's current target (GTK 4.12+, libadwaita 1.4/1.5+). Useful for Debian 12 and other LTS distros that haven't moved to libadwaita 1.4+ yet. Tested on arm64 (aarch64); the substitutions apply equally to amd64.

Why

A clean zig build on Debian 12 fails with ~50 missing-symbol errors across the UI code, because several GTK/libadwaita calls don't exist in the older libraries.

How

Each newer API is replaced with a behaviourally equivalent one that already exists in GTK 4.8 / libadwaita 1.2 (source-level only, no new runtime dependencies):

Upstream API (min version) Debian 12 replacement
gtk_gl_area_set_allowed_apis (GTK 4.12) gtk_gl_area_set_use_es(area, FALSE) — keeps the desktop-GL request
gtk_css_provider_load_from_string (GTK 4.12) gtk_css_provider_load_from_data(p, data, -1)
gtk_search_entry_set_placeholder_text (GTK 4.10) placeholder set on the entry's GtkText editable delegate
GtkFontDialogButton (GTK 4.10) GtkFontButton (via GtkFontChooser font-desc)
AdwAlertDialog (libadwaita 1.5) AdwMessageDialog (1.2)
AdwDialog (libadwaita 1.5) AdwWindow + GtkWindow (modal, transient-for, present)
AdwToolbarView (libadwaita 1.4) vertical GtkBox (header on top, content below)
AdwBanner (libadwaita 1.4) GtkRevealer + label + optional action button
AdwSpinRow (libadwaita 1.4) AdwActionRow + GtkSpinButton
AdwSwitchRow (libadwaita 1.4) AdwActionRow + GtkSwitch
adw_combo_row_set_enable_search (libadwaita 1.4) omitted (search box is optional)

Also adds packaging/debian12/:

  • install.sh — installs build deps, fetches Zig 0.15.2 (not packaged in Debian 12), builds, installs.
  • README.md — documents the substitutions, dependencies, and the GPU note below.

Testing

On Debian 12 arm64:

  • ✅ Builds cleanly from source (libghostty + séance).
  • ✅ Launches and stays running; seance ctl pingpong; seance ctl tree / identify work.
  • ✅ OpenGL context creation succeeds.

Caveats / help wanted:

  • My test box is a VM with virtio-gpu and no accelerated GL, so I had to force Mesa's software renderer (LIBGL_ALWAYS_SOFTWARE=1) to get a GL context. The gtk_gl_area_set_use_es(FALSE) substitution preserves the original desktop-GL request, but I'd appreciate confirmation on hardware-GL arm64.
  • Because the panes only initialise once the compositor maps/paints the window, I couldn't fully exercise interactive terminal rendering in my headless session — would value a sanity check on a real desktop.
  • There's a non-fatal Adwaita-CRITICAL ... adw_tab_view_close_page: assertion 'page_belongs_to_this_view' failed logged once at startup. It doesn't appear related to these substitutions (it's in tab-view setup), but flagging it in case it's meaningful.

Happy to adjust the approach (e.g. gate the older paths behind a libadwaita-version check / build option) if you'd prefer to keep the modern APIs as the default.


🤖 Generated with Claude Code

Jony02 and others added 3 commits June 2, 2026 15:25
Debian 12 'bookworm' ships GTK 4.8.3 and libadwaita 1.2.2, which predate
several APIs séance uses. Replace each newer call with a behaviourally
equivalent one available in GTK 4.8 / libadwaita 1.2 so the project builds
and runs on Debian 12 (and other older-LTS distros), on arm64 and amd64.

API substitutions (all source-level, no new runtime deps):
- gtk_gl_area_set_allowed_apis      -> gtk_gl_area_set_use_es(false)
- gtk_css_provider_load_from_string -> gtk_css_provider_load_from_data(.., -1)
- gtk_search_entry_set_placeholder  -> placeholder on GtkText editable delegate
- GtkFontDialogButton               -> GtkFontButton (GtkFontChooser font-desc)
- AdwAlertDialog                    -> AdwMessageDialog
- AdwDialog                         -> AdwWindow + GtkWindow (modal/transient)
- AdwToolbarView                    -> vertical GtkBox
- AdwBanner                         -> GtkRevealer + label + optional button
- AdwSpinRow                        -> AdwActionRow + GtkSpinButton
- AdwSwitchRow                      -> AdwActionRow + GtkSwitch
- adw_combo_row_set_enable_search   -> omitted (optional)

Add packaging/debian12/{install.sh,README.md}: an automated build+install
script (installs deps, fetches Zig 0.15.2, builds, installs) and docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Navigata1

Copy link
Copy Markdown
Author

Update: I was able to confirm interactive pane rendering after all. Running against a painting display (an Xvfb framebuffer with Mesa software GL on the same arm64 box), the GtkGLArea renders and ghostty spawns the pane's shell — a live sh child + pty appear, the pane title tracks the shell prompt (debian@debian: ~), and the header bar, sidebar, and terminal all draw correctly. So the earlier "couldn't fully exercise rendering" caveat was just my headless session never compositing a frame, not a functional gap. The adw_tab_view_close_page startup warning is still emitted once but is non-fatal (pane works).

…arning

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant