add linux/arm64 build #55

Closed
opened 2025-12-29 01:21:15 +01:00 by adam · 9 comments
Owner

Originally created by @vielmetti on GitHub (Oct 15, 2021).

This issue tracks work to build headscale for arm64 and to test
it on the usual suspects for that platform: Raspberry Pi 3/4
with 64-bit OS, Ampere, Graviton2, and the like.

I think it might be as simple as adding a stanza to the
goreleaser code, at first glance.

Originally created by @vielmetti on GitHub (Oct 15, 2021). This issue tracks work to build headscale for arm64 and to test it on the usual suspects for that platform: Raspberry Pi 3/4 with 64-bit OS, Ampere, Graviton2, and the like. I think it might be as simple as adding a stanza to the goreleaser code, at first glance.
adam added the bug label 2025-12-29 01:21:15 +01:00
adam closed this issue 2025-12-29 01:21:15 +01:00
Author
Owner

@vielmetti commented on GitHub (Oct 15, 2021):

For what it's worth, on a Lenovo Yoga C630 (Windows on Arm, WSL1, Ubuntu 20.04) "make" and "make test" work as expected, and the binary produced works at least as well as producing a usage message.

@vielmetti commented on GitHub (Oct 15, 2021): For what it's worth, on a Lenovo Yoga C630 (Windows on Arm, WSL1, Ubuntu 20.04) "make" and "make test" work as expected, and the binary produced works at least as well as producing a usage message.
Author
Owner

@juanfont commented on GitHub (Oct 16, 2021):

Done!

Will come in 0.10.3

@juanfont commented on GitHub (Oct 16, 2021): Done! Will come in 0.10.3
Author
Owner

@juanfont commented on GitHub (Oct 16, 2021):

Hey @vielmetti https://github.com/juanfont/headscale/releases/tag/v0.10.3

Can you confirm they work? I don't have any arm64 machine...

@juanfont commented on GitHub (Oct 16, 2021): Hey @vielmetti https://github.com/juanfont/headscale/releases/tag/v0.10.3 Can you confirm they work? I don't have any arm64 machine...
Author
Owner

@vielmetti commented on GitHub (Oct 16, 2021):

I'll confirm correct operations as soon as I bring up a network, @juanfont - hopefully as soon as this weekend.

@vielmetti commented on GitHub (Oct 16, 2021): I'll confirm correct operations as soon as I bring up a network, @juanfont - hopefully as soon as this weekend.
Author
Owner

@juanfont commented on GitHub (Oct 19, 2021):

@vielmetti any update?

@juanfont commented on GitHub (Oct 19, 2021): @vielmetti any update?
Author
Owner

@vladvasiliu commented on GitHub (Oct 20, 2021):

This doesn't seem to work:

Error initializing: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

Tried this on both 0.10.5. and 0.10.4 on aarch64 (AWS ARM instance).

I'm not particularly familiar with Go, but according to a quich search around go-sqlite3, you may need to compile this with CGO_ENABLED=1: https://chromium.googlesource.com/external/github.com/mattn/go-sqlite3/#arm

@vladvasiliu commented on GitHub (Oct 20, 2021): This doesn't seem to work: ``` Error initializing: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub ``` Tried this on both 0.10.5. and 0.10.4 on aarch64 (AWS ARM instance). I'm not particularly familiar with Go, but according to a quich search around go-sqlite3, you may need to compile this with `CGO_ENABLED=1`: https://chromium.googlesource.com/external/github.com/mattn/go-sqlite3/#arm
Author
Owner

@06kellyjac commented on GitHub (Oct 21, 2021):

If you're desperate for an aarch64 build of headscale you can try using the nix/nixpkgs build: https://search.nixos.org/packages?channel=unstable&show=headscale&from=0&size=50&sort=relevance&type=packages&query=headscale

It's currently on 0.9.2 so I'll try update it to 0.10.5 (where I might run into this issue)

$ uname -sm
Linux aarch64

$ nix-env -i headscale
installing 'headscale-0.9.2'
these 2 paths will be fetched (4.28 MiB download, 16.90 MiB unpacked):
  /nix/store/qd3g8rk5hx5zkb70idjh6fa12sh6bipg-mailcap-2.1.53
  /nix/store/rik1a4jznllqnz1dn9qx301if2yzjcjf-headscale-0.9.2
copying path '/nix/store/qd3g8rk5hx5zkb70idjh6fa12sh6bipg-mailcap-2.1.53' from 'https://cache.nixos.org'...
copying path '/nix/store/rik1a4jznllqnz1dn9qx301if2yzjcjf-headscale-0.9.2' from 'https://cache.nixos.org'...
building '/nix/store/jw2q8605liww8hwl55ggxb76qcgg2pdp-user-environment.drv'...

$ headscale --help

headscale is an open source implementation of the Tailscale control server

https://github.com/juanfont/headscale

Usage:
  headscale [command]

Available Commands:
  completion  generate the autocompletion script for the specified shell
  help        Help about any command
  namespaces  Manage the namespaces of Headscale
  nodes       Manage the nodes of Headscale
  preauthkeys Handle the preauthkeys in Headscale
  routes      Manage the routes of Headscale
  serve       Launches the headscale server
  version     Print the version.

Flags:
  -h, --help            help for headscale
  -o, --output string   Output format. Empty for human-readable, 'json' or 'json-line'

Use "headscale [command] --help" for more information about a command.
@06kellyjac commented on GitHub (Oct 21, 2021): If you're desperate for an aarch64 build of headscale you can try using the nix/nixpkgs build: https://search.nixos.org/packages?channel=unstable&show=headscale&from=0&size=50&sort=relevance&type=packages&query=headscale It's currently on `0.9.2` so I'll try update it to `0.10.5` (where I might run into this issue) ``` $ uname -sm Linux aarch64 $ nix-env -i headscale installing 'headscale-0.9.2' these 2 paths will be fetched (4.28 MiB download, 16.90 MiB unpacked): /nix/store/qd3g8rk5hx5zkb70idjh6fa12sh6bipg-mailcap-2.1.53 /nix/store/rik1a4jznllqnz1dn9qx301if2yzjcjf-headscale-0.9.2 copying path '/nix/store/qd3g8rk5hx5zkb70idjh6fa12sh6bipg-mailcap-2.1.53' from 'https://cache.nixos.org'... copying path '/nix/store/rik1a4jznllqnz1dn9qx301if2yzjcjf-headscale-0.9.2' from 'https://cache.nixos.org'... building '/nix/store/jw2q8605liww8hwl55ggxb76qcgg2pdp-user-environment.drv'... $ headscale --help headscale is an open source implementation of the Tailscale control server https://github.com/juanfont/headscale Usage: headscale [command] Available Commands: completion generate the autocompletion script for the specified shell help Help about any command namespaces Manage the namespaces of Headscale nodes Manage the nodes of Headscale preauthkeys Handle the preauthkeys in Headscale routes Manage the routes of Headscale serve Launches the headscale server version Print the version. Flags: -h, --help help for headscale -o, --output string Output format. Empty for human-readable, 'json' or 'json-line' Use "headscale [command] --help" for more information about a command. ```
Author
Owner

@juanfont commented on GitHub (Oct 22, 2021):

Can you check? https://github.com/juanfont/headscale/releases/download/v0.10.8/headscale_0.10.8_linux_arm64

@juanfont commented on GitHub (Oct 22, 2021): Can you check? https://github.com/juanfont/headscale/releases/download/v0.10.8/headscale_0.10.8_linux_arm64
Author
Owner

@vladvasiliu commented on GitHub (Oct 22, 2021):

This seems to work.

Don't have the time to do extensive testing, but I could create a namespace and start the server, so I guess the SQLite issue is solved.

@vladvasiliu commented on GitHub (Oct 22, 2021): This seems to work. Don't have the time to do extensive testing, but I could create a namespace and start the server, so I guess the SQLite issue is solved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#55