Skip to content

Add Linux arm64 (aarch64) build support / CI job #127

Open

Description

@Kiberbunny

What I did

  1. backend (wgtunnel/core) — added a linux-arm64 rule to backend/native/backend/Makefile (only linux-amd64 existed), built libwg.so for aarch64, placed it into backend/src/jvmMain/resources/natives/linux-aarch64/, and ran ./gradlew :backend:publishToMavenLocal.
    • Also had to bump core in desktop/gradle/libs.versions.toml from 1.10.0 → 1.10.1 to match the local core build.
  2. keyring — added a linux-arm64 rule to keyring/tools/keyring-go/Makefile, and changed BuildKeyringGoLibsTask.kt to run make copy_to_resources PLATFORMS=linux-arm64 on Linux instead of make all (which also tries Windows cross-builds and fails without mingw).
  3. JVM-only build — disabled the Android KMP plugin + android target in backend, and excluded :hevtunnel / :backend-android-jni from settings.gradle.kts (they require an Android SDK, even for JVM-only builds).
  4. PGP signing — disabled (signAllPublications(), signing plugin, signing.required=false) because publishToMavenLocal should not require a signatory.

Bugs found during the build (worth fixing)

  1. Compose version mix: material3 = "1.13.0-beta01" is combined with compose-plugin = "1.12.1". At runtime the native image throws NoSuchMethodError: SemanticsNode.getLayoutNode$ui(). Workaround: use material3 1.12.0-alpha03. This affects x86_64 too, not just arm64.
  2. backend/native/backend/Makefile and keyring/tools/keyring-go/Makefile lack linux-arm64 targets (only amd64 + windows/darwin).
  3. BuildKeyringGoLibsTask runs make all on Linux, which tries Windows cross-builds and fails without mingw.
  4. publishToMavenLocal requires PGP signing (signAllPublications()), which is unnecessary for local publishing.
  5. backend KMP module has an Android target requiring Android SDK even for JVM-only builds.
  6. Linux packaging needs patchelf and zlib1g-dev; npm is a separate package from nodejs on Ubuntu (electron-builder needs it).

Environment

  • Host: ASUS Zenbook A14 UX3407Q (Snapdragon X Plus), aarch64
  • Ubuntu 26.04, kernel 7.2.0-18-qcom-x1e
  • JDK 21 (for core) + GraalVM 25 (for desktop), Go 1.25/1.27, Node 22
  • Build commands:
    • cd core && JAVA_HOME=/usr/lib/jvm/java-21-openjdk-arm64 ./gradlew :backend:publishToMavenLocal
    • cd desktop && JAVA_HOME=<graalvm-25> ./gradlew :composeApp:packageGraalvmDeb :composeApp:packageGraalvmTar -Papp.variant=release -Papp.version=2.4.1 -Papp.packageVersion=2.4.1

Result

  • wgtunnel-2.4.1-linux-arm64.deb + .tar.gz built and working (GUI + daemon launch fine).
  • Native libs placed: natives/linux-aarch64/libwg.so (backend-jvm), linux-aarch64/libkeyring.so (keyring).

Request

Please add a Linux arm64 job to .github/workflows/package-linux.yml (runs-on: ubuntu-24.04-arm) and include linux-arm64 in both Makefiles so arm64 users get official builds. I can help with the workflow / test artifacts if wanted.

The proposed Linux arm64 workflow can be found here: https://gist.github.com/Kiberbunny/715050b8bcc7a60f8bedbb4c9139e534

The built artifacts are available here (deb + tar.gz for aarch64):
https://github.com/Kiberbunny/-wgtunnel-arm64-builds/releases/tag/WG-Tunnel-2.4.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions