From 3ac3f1ab922de712ee814cca577a64c4e9181521 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Wed, 4 Feb 2026 18:21:39 +0900 Subject: [PATCH 1/2] drm: add DRM_MODE_CONNECTOR_USB define for old releases When building with mesa 20 (debian bullseye) this define is missing, so backport it. --- .../platform/linux_embedded/window/native_window_drm.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/flutter/shell/platform/linux_embedded/window/native_window_drm.cc b/src/flutter/shell/platform/linux_embedded/window/native_window_drm.cc index 73023fd2..b720fd94 100644 --- a/src/flutter/shell/platform/linux_embedded/window/native_window_drm.cc +++ b/src/flutter/shell/platform/linux_embedded/window/native_window_drm.cc @@ -13,6 +13,13 @@ #include "flutter/shell/platform/linux_embedded/logger.h" #include "flutter/shell/platform/linux_embedded/surface/cursor_data.h" +// Allow building with mesa < 21 +// This is a linux uapi header value so there is no risk in hardcoding it if +// unset +#ifdef DRM_MODE_CONNECTOR_USB +#define DRM_MODE_CONNECTOR_USB 20 +#endif + namespace flutter { namespace { constexpr char kFlutterDrmConnectorEnvironmentKey[] = "FLUTTER_DRM_CONNECTOR"; From fc14b42d740ed4aa9c148c6b6dc62b7e870414fe Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Thu, 5 Feb 2026 12:34:39 +0900 Subject: [PATCH 2/2] release: use old bullseye container for release build Building with trixie requires a recent glibc/stdc++ environment (GLIBC_2.38 / GLIBCXX_3.4.32), which might not be available on the target environment. Conversely, as far as libc/stdlib are concerned we are guarnateed to be able to run an old binary on a newer system, so building on a system as old as possible should address this particular issue. Unfortunately libflutter*so also link against system libraries (GL, X, wayland, fontconfig and many others), so if there is any so bump or imcompatible ABI then this is still far from perfect: future improvement should rebuild flutter-embedded-linux on demand for the required target, from flutter-elinux's CMake configuration The elinux embedded itself is not hard to build but libflutter_engine.so will be more work, so settle with "back to the old state" level for now. --- release/Dockerfile | 55 ++++++++++++++++++++++++++++++++++++------- release/README.md | 5 +--- release/run-docker.sh | 4 +++- 3 files changed, 50 insertions(+), 14 deletions(-) mode change 100644 => 100755 release/run-docker.sh diff --git a/release/Dockerfile b/release/Dockerfile index c4958ec5..e80a3fda 100644 --- a/release/Dockerfile +++ b/release/Dockerfile @@ -1,18 +1,55 @@ -FROM debian:trixie-slim +# Build releases with the oldest possible supported target +# The built binaries will depend on symbols from the libc used here, +# so this should work on newer OS but might not work on older OS + +# Recommended version should be kept in sync with the wiki: +# https://github.com/flutter-elinux/flutter-elinux/wiki/flutter-elinux-install +FROM debian:bullseye-slim ENV DEBIAN_FRONTEND noninteractive RUN <