Skip to content

ci: add Linux aarch64 libretro build#458

Merged
LibretroAdmin merged 2 commits into
libretro:masterfrom
WizzardSK:ci-linux-aarch64
Jul 25, 2026
Merged

ci: add Linux aarch64 libretro build#458
LibretroAdmin merged 2 commits into
libretro:masterfrom
WizzardSK:ci-linux-aarch64

Conversation

@WizzardSK

@WizzardSK WizzardSK commented Jul 24, 2026

Copy link
Copy Markdown

Adds a libretro-build-linux-aarch64 job so the core is built for Linux aarch64 on the buildbot (there is currently no Linux aarch64 nightly for dolphin).

The core already compiles for aarch64 via the existing android-arm64-v8a job (JitArm64, ARM64 FFmpeg, etc.), and the CMake build handles aarch64 correctly (sets _M_ARM_64, ARM64 output paths). This job simply reuses the same CMake path with GCC 12 on the aarch64 backports image, mirroring the existing libretro-build-linux-x64 job (same -DLIBRETRO=ON -DENABLE_LTO=ON args).

Verified locally

Built on aarch64 Linux (postmarketOS, glibc, GCC 15) with -DLIBRETRO=ON, producing a 19.4 MB dolphin_libretro.so with no errors. I had to build with -DENABLE_LTO=OFF because the LTO link OOMs on my 3.8 GB test device; the CI runners have the headroom, so the job keeps the default -DENABLE_LTO=ON to match the x64 job.

Runtime check on the resulting core (RetroArch 1.22.2, Adreno 618 / Mesa freedreno + Turnip): Mario Kart: Double Dash!! boots and renders at 60 fps with JitArm64 and the OGL backend. The Vulkan backend also negotiates its HW render context without errors.

Unrelated pre-existing bug found while testing

Not caused by this PR, but worth flagging: on aarch64 the default option combination dolphin_cpu_core = JITARM64 + dolphin_main_cpu_thread = enabled deadlocks — black screen and the frontend's main loop stops responding entirely (RetroArch does not even react to a network QUIT command). Reproduced 3/3. Changing either one of the two resolves it:

  • dolphin_cpu_core = JITARM64 + dolphin_main_cpu_thread = disabled -> 60 fps
  • dolphin_cpu_core = Cached Interpreter + dolphin_main_cpu_thread = enabled -> ~17 fps

So it appears to be an interaction between JitArm64 and the separate CPU thread rather than a fault in either on its own. I can open a separate issue with logs if that is useful.

@WizzardSK

Copy link
Copy Markdown
Author

Pushed a correction to this branch: the job no longer pins libretro-build-aarch64-ubuntu:backports.

That tag does not exist. The aarch64 build image only publishes :latest and :main; :backports is an amd64-only thing, because there GCC 12 lives in a separate Dockerfile.backports that the image project's CI pushes under that tag. A job pinning it dies before it compiles anything:

WARNING: Failed to pull image with policy "always": ... failed to resolve reference
"git.libretro.com:5050/libretro-infrastructure/libretro-build-aarch64-ubuntu:backports": not found
ERROR: Job failed: failed to pull image ... with specified policies [always if-not-present]

It isn't needed either — the aarch64 image installs the toolchain in its main Dockerfile:

# Install newer GCC from Ubuntu toolchain PPA
RUN add-apt-repository ppa:ubuntu-toolchain-r/test && apt-get install -y gcc-12 g++-12 && \
    update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 && ...
# Install newer CMake from Kitware
RUN ... apt.kitware.com/ubuntu/ bionic main ... && apt-get install -y cmake

so the default image from .libretro-linux-cmake-aarch64 already provides GCC 12 and a current CMake.

@LibretroAdmin
LibretroAdmin merged commit d735584 into libretro:master Jul 25, 2026
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.

2 participants