fix(ci): install x86_64 glibc cross libraries for qemu user emulation
Build Android APK / Build Release APKs (push) Failing after 7m49s

This commit is contained in:
2026-09-13 22:44:53 +02:00
parent d04d539e68
commit e71063f179
2 changed files with 8 additions and 4 deletions
+4 -2
View File
@@ -34,13 +34,15 @@ jobs:
# We install qemu-user-static and generate thin wrappers to run the linux-x64 gen_snapshot seamlessly.
if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then
echo "Setting up ARM64 Flutter gen_snapshot wrappers via QEMU..."
apt-get update -qq && apt-get install -y -qq qemu-user-static
apt-get update -qq && apt-get install -y -qq qemu-user-static libc6-amd64-cross libstdc++6-amd64-cross
mkdir -p /lib64
ln -sf /usr/x86_64-linux-gnu/lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
QEMU_BIN=$(command -v qemu-x86_64-static || command -v qemu-x86_64)
flutter precache --android
for dir in /sdks/flutter/bin/cache/artifacts/engine/android-*; do
if [ -d "$dir/linux-x64" ]; then
mkdir -p "$dir/linux-arm64"
printf '#!/bin/sh\nSCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"\nexec %s "$SCRIPT_DIR/../linux-x64/gen_snapshot" "$@"\n' "$QEMU_BIN" > "$dir/linux-arm64/gen_snapshot"
printf '#!/bin/sh\nSCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"\nexec %s -L /usr/x86_64-linux-gnu "$SCRIPT_DIR/../linux-x64/gen_snapshot" "$@"\n' "$QEMU_BIN" > "$dir/linux-arm64/gen_snapshot"
chmod +x "$dir/linux-arm64/gen_snapshot"
echo "Configured gen_snapshot wrapper for $(basename "$dir")"
fi