Skip to content

ci: cross-compile the linuxArm64 nightly engine - #617

Merged
carlonzo merged 1 commit into
mainfrom
cursor/fix-nightly-arm64-engine-bdb3
Oct 16, 2026
Merged

carlonzo merged 1 commit into
mainfrom
cursor/fix-nightly-arm64-engine-bdb3

Conversation

@carlonzo

Copy link
Copy Markdown
Owner

The nightly workflow has not published a release since 1.0.0-nightly.850 (Sep 24). The nightly tag moves before the builds run, so a failed attempt is not retried the next day: later green runs (including Oct 15) were the gate seeing no new commits and exiting without publishing.

Oct 16 — arm64 tarball staging (run 38847497853)

linux-native (arm64) failed at Stage native Linux tarball (arm64):

error: missing cli/build/bin/linuxArm64/releaseExecutable/klardrop-engine.kexe

The Gradle step before it was BUILD SUCCESSFUL, but the log also says:

The Kotlin/Native compiler does not support your current host platform: linux-aarch64.
> Task :cli:linkReleaseExecutableLinuxArm64 SKIPPED

Kotlin/Native 2.4 only runs on linux x64, windows x64, and macOS. On ubuntu-24.04-arm the plugin disables linuxArm64, the link task is skipped, and Gradle still exits 0. Staging then cannot find the engine. The matrix fail-fast cancelled the x64 leg, so publish never ran.

Oct 14 (run 38510125816)

Three jobs failed. Two of them are already fixed on main and succeeded on Oct 16. The third is the same arm64 host problem, at an earlier step.

  • arm64 build/test. The invocation was :klardrop-common:linuxArm64Test, which Gradle rejects as ambiguous (linuxArm64TestBinaries, linuxArm64TestKlibrary, linuxArm64TestProcessResources). The host warning is in that log too. fix(ci): unbreak main, nightly release, and Renovate PRs #612 renamed the task to linuxArm64TestBinaries, so this step no longer fails — it skips, and the missing binary shows up later at staging (the Oct 16 failure).
  • Windows MSI collect. Copy-Item into dist/ failed with The directory name is invalid because dist/ was never created. The MSI itself had been written. fix(ci): unbreak main, nightly release, and Renovate PRs #612 added New-Item -ItemType Directory. The Oct 16 Windows job collected and uploaded the MSI.
  • TestFlight group. The IPA upload succeeded (Upload succeeded / EXPORT SUCCEEDED). The following step called /v1/apps/{id}/betaGroups?filter[name]=..., which App Store Connect rejects with 400 PARAMETER_ERROR.ILLEGAL. fix(ci): unbreak main, nightly release, and Renovate PRs #612/ci(nightly): fix TestFlight beta group lookup #613 query /v1/betaGroups?filter[app]&filter[name] instead. The Oct 16 iOS job completed “Add build to TestFlight Klardrop External Testers group”.

What changed

The arm64 Kotlin/Native engine is cross-compiled on ubuntu-24.04 (-Pklardrop.forceLinuxArm64=true). packaging/linux/install-arm64-cross-deps.sh installs the aarch64 multiarch dev packages from ports.ubuntu.com (archive.ubuntu.com does not publish arm64, and an unrestricted apt-get update 404s). The cinterop .def files and linker search paths are per target (compilerOpts.linux_arm64 / linkerOpts.linux_arm64), so the cross compile uses aarch64 headers and libraries rather than the host’s x86_64 ones.

Qt and the Rust client stay native builds on ubuntu-24.04-arm (those steps succeeded on Oct 16). That job downloads the engine and stages klardrop-native-linux-arm64.tar.gz. The raw .kexe is removed before the release assets are checksummed, so it is not attached to the GitHub release. The same split is in release.yml, which had the identical arm64 runner.

linuxArm64TestBinaries is not part of the cross job. The Linux test actuals live in linuxX64Test, and the default hierarchy only creates a shared linuxTest source set when both Linux targets are declared — which a normal x64 build is not. x64 still runs that suite.

An ordinary ./gradlew build on x64 still does not declare linuxArm64.

Verification

On an x64 Ubuntu 24.04 host, with the cross packages installed:

  • ./gradlew :cli:linkReleaseExecutableLinuxArm64 -Pklardrop.forceLinuxArm64=true succeeded.
  • readelf reports Machine: AArch64 and interpreter /lib/ld-linux-aarch64.so.1. NEEDED entries include libsqlite3, libavahi-client, libssl, and libsystemd.
  • The same build’s linuxX64 engine is still Advanced Micro Devices X86-64 with /lib64/ld-linux-x86-64.so.2.
  • Re-running the apt script is a no-op (0 upgraded, 0 newly installed).

Not verified here

  • The ubuntu-24.04-arm Qt build, Qt tests, Rust client, and tarball staging. Those commands are the ones that passed on Oct 16; this environment is x64, so they were not re-run.
  • macOS signing/notarization, the TestFlight upload, the Play upload, and the Windows MSI. Those jobs were not changed, and they succeeded on the Oct 16 run. They need the Apple, Play, and Windows runners plus the signing secrets.
  • A full nightly publish. This PR does not dispatch the workflow, push the nightly tag, or publish a release.
Open in Web Open in Cursor 

Kotlin/Native 2.4 has no linux-aarch64 compiler, so the arm64 nightly
runner skipped linkReleaseExecutableLinuxArm64, Gradle still exited 0,
and tarball staging failed because klardrop-engine.kexe was never
produced. That cancelled the x64 leg and nothing was published.

Co-authored-by: Carlo Marinangeli <carlonzo@users.noreply.github.com>
@carlonzo
carlonzo merged commit 49e295f into main Oct 16, 2026
9 checks passed
@carlonzo
carlonzo deleted the cursor/fix-nightly-arm64-engine-bdb3 branch October 16, 2026 06:27
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