[PR #108] fix: build libwg-go with the boottime-patched Go toolchain #105

Open
opened 2026-10-30 04:59:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amneziawg-android/pull/108
Author: @Timsonrobl
Created: 10/27/2026
Status: 🔄 Open

Base: master ← Head: fix/libwg-go-boottime-toolchain


📝 Commits (1)

  • 357ab80 fix: build libwg-go with the boottime-patched Go toolchain

📊 Changes

1 file changed (+8 additions, -4 deletions)

View changed files

📝 tunnel/tools/libwg-go/Makefile (+8 -4)

📄 Description

Fixes #107

go.mod requires go 1.25.0, but the Makefile prepares and patches 1.24.2. So with GOTOOLCHAIN=auto, go just downloads a stock 1.25.0, and the runtime patch never ends up in libwg-go.so. Details are in the issue.

Makefile-only change:

  • GO_VERSION 1.24.2 → 1.25.0, with hashes from go.dev
  • export GOTOOLCHAIN := local. If go.mod gets ahead of GO_VERSION again, the build fails, rather than quietly using an unpatched toolchain.

I tested it with build.yml (debug_apk) on my fork, then checked which clock runtime.nanotime1 uses in the arm64 libwg-go.so:

The runtime patch applies to Go 1.25.0 without changes, and libwg-go.so builds for all four ABIs (arm64-v8a, armeabi-v7a, x86, x86_64).

I've also been running the patched runtime on a Galaxy S25 Ultra through several sleep/wake cycles, and the post-wake stall is gone.

@vkamn @NickVs2015 it's a small Makefile fix, but it affects every Android build since July 2025. Happy to adjust anything.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amneziawg-android/pull/108 **Author:** [@Timsonrobl](https://github.com/Timsonrobl) **Created:** 10/27/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `fix/libwg-go-boottime-toolchain` --- ### 📝 Commits (1) - [`357ab80`](https://github.com/amnezia-vpn/amneziawg-android/commit/357ab80bee90ccfa35bb6dbdb9c216e87bf3004b) fix: build libwg-go with the boottime-patched Go toolchain ### 📊 Changes **1 file changed** (+8 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `tunnel/tools/libwg-go/Makefile` (+8 -4) </details> ### 📄 Description Fixes #107 go.mod requires go 1.25.0, but the Makefile prepares and patches 1.24.2. So with `GOTOOLCHAIN=auto`, go just downloads a stock 1.25.0, and the runtime patch never ends up in libwg-go.so. Details are in the issue. Makefile-only change: - `GO_VERSION` 1.24.2 → 1.25.0, with hashes from go.dev - `export GOTOOLCHAIN := local`. If go.mod gets ahead of `GO_VERSION` again, the build fails, rather than quietly using an unpatched toolchain. I tested it with build.yml (`debug_apk`) on my fork, then checked which clock `runtime.nanotime1` uses in the arm64 libwg-go.so: - master, [run 40506469184](https://github.com/Timsonrobl/amneziawg-android/actions/runs/40506469184): CLOCK_MONOTONIC (1) - this branch, [run 40506463311](https://github.com/Timsonrobl/amneziawg-android/actions/runs/40506463311): CLOCK_BOOTTIME (7) The runtime patch applies to Go 1.25.0 without changes, and libwg-go.so builds for all four ABIs (arm64-v8a, armeabi-v7a, x86, x86_64). I've also been running the patched runtime on a Galaxy S25 Ultra through several sleep/wake cycles, and the post-wake stall is gone. @vkamn @NickVs2015 it's a small Makefile fix, but it affects every Android build since July 2025. Happy to adjust anything. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-android#105
No description provided.