Building on Raspberry Pi

Building on Raspberry Pi

LightGUI builds and runs on a Raspberry Pi 4 or 5 running the 64-bit Raspberry Pi OS Bookworm. No source changes are needed: the code has no x86-only assembly, no SSE/AVX, no hardcoded x86 library paths, and ARM is little-endian like x86, so the same tree builds as-is on aarch64.

Verified Dec 6, 2026: the designer plus all 562 XFrame widget demos build and make test passes inside an aarch64 Debian Bookworm chroot (the Raspberry Pi OS equivalent). The seam test reports ALL PASS: converter 562/562, load+generate PASS, and the generated project builds to a 29,109,080-byte aarch64 app binary.

Prerequisites

On the Pi, install the toolchain and libraries:

sudo apt update
sudo apt install -y build-essential pkg-config libgtk-3-dev libx11-dev libxext-dev libcairo2-dev glade cmake gdb xvfb python3 git

libgtk-3-dev pulls in most of the X11/Cairo stack on its own; libx11-dev, libxext-dev and libcairo2-dev are listed explicitly because the XFrame canvas includes the X11 headers directly.

Build and run

git clone https://github.com/cnmcdee/lightgui.git
cd lightgui
make
./ide

make lightgui builds just the designer; make widgets just the widget demos. make test runs the seam test (no display needed) — run sudo make install first, or the generated project’s cmake configure fails looking for the widget headers at /usr/local/include/lightgui. The full GUI suite is ./tests/run_matrix.sh (needs Xvfb, included above).

Notes

  • 64-bit Pi OS only. The 32-bit (armhf) Raspberry Pi OS is not tested and not supported — use the 64-bit image.
  • Wayland: UNVERIFIED. Raspberry Pi OS Bookworm defaults to Wayland (labwc) on Pi 4/5. LightGUI is X11-based (GTK 3 X11 backend plus X11 calls in the XFrame canvas), so under Wayland it runs via XWayland. That path has not been tested — there is no Pi or Wayland compositor in the build environment — so Wayland behaviour is unverified. If the designer fails to start or renders wrong under Wayland, switch the Pi to X11: sudo raspi-config → Advanced Options → Wayland → X11, then reboot. X11 is the supported session for LightGUI on the Pi.
  • Generated apps are plain XFrame / X11 programs and run on the Pi the same way; they link only libX11 — no GTK runtime needed.
  • See also: the LightGUI (C) repository — the Raspberry Pi section of its README carries the same instructions.
Source code: git.lightgui.com/thinkmelt/lightgui
LightGUI source code on Gitea The LightGUI XFrame widget toolkit — get the source, report issues, and contribute: LightGUI (C) · LightGUI (Rust) · LightGUI (Python) git.lightgui.com · Gitea