Need help compiling for arm #470

Closed
opened 2025-12-29 01:29:57 +01:00 by adam · 2 comments
Owner

Originally created by @abosaad11 on GitHub (Apr 13, 2023).

Hello

I really need an armhf binary and I can't compile. To start I tried compiling just as the instructions say (on a 64bit raspberry pi), which should output an arm64 binary but I'm still failing. I installed nix, protobuf tools and go and then I edited the makefile to include:

nix build --extra-experimental-features nix-command --extra-experimental-features flakes

instead of nix build

but it results in an error:

pi@raspi3:~/headscale $ make build
nix build --extra-experimental-features nix-command --extra-experimental-features flakes
warning: Git tree '/home/pi/headscale' is dirty
error: builder for '/nix/store/x3zdq6lh5w1cpiy2xmynsvb3rwy74qi6-headscale-dev.drv' failed with exit code 1;
       last 10 log lines:
       > Building subPackage ./integration
       > Building subPackage ./integration/dockertestutil
       > Building subPackage ./integration/hsic
       > Building subPackage ./integration/integrationutil
       > Building subPackage ./integration/tsic
       > buildPhase completed in 16 minutes 26 seconds
       > running tests
       > github.com/jackc/pgx/v5/pgtype: /nix/store/26gwr82s1bfd1llbwq7cvrkzqkc562in-go-1.20.2/share/go/pkg/tool/linux_arm64/compile: signal: killed
       > FAIL   github.com/juanfont/headscale [build failed]
       > FAIL
       For full logs, run 'nix log /nix/store/x3zdq6lh5w1cpiy2xmynsvb3rwy74qi6-headscale-dev.drv'.
make: *** [Makefile:22: build] Error 1

See the log:

pi@raspi3:~/headscale $ nix log /nix/store/x3zdq6lh5w1cpiy2xmynsvb3rwy74qi6-headscale-dev.drv --extra-experimental-features nix-command
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/v2kfvk4p6babyn6d0i37nlxv2g9j155z-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Building subPackage .
Building subPackage ./cmd/gh-action-integration-generator
Building subPackage ./cmd/headscale
Building subPackage ./cmd/headscale/cli
Building subPackage ./gen/go/headscale/v1
Building subPackage ./integration
Building subPackage ./integration/dockertestutil
Building subPackage ./integration/hsic
Building subPackage ./integration/integrationutil
Building subPackage ./integration/tsic
buildPhase completed in 16 minutes 26 seconds
@nix { "action": "setPhase", "phase": "checkPhase" }
running tests
github.com/jackc/pgx/v5/pgtype: /nix/store/26gwr82s1bfd1llbwq7cvrkzqkc562in-go-1.20.2/share/go/pkg/tool/linux_arm64/compile: signal: killed
FAIL    github.com/juanfont/headscale [build failed]
FAIL

Now all this is while trying to use nix build. Here are my questions:

  1. Why is the build failing?
  2. How do I compile for armhf? Do I need to edit flake.nix? (I'm forced to use arm64 raspberry pi to install the nix and protobuf tools)

Thank you

Originally created by @abosaad11 on GitHub (Apr 13, 2023). Hello I really need an armhf binary and I can't compile. To start I tried compiling just as the instructions say (on a 64bit raspberry pi), which should output an arm64 binary but I'm still failing. I installed nix, protobuf tools and go and then I edited the makefile to include: `nix build --extra-experimental-features nix-command --extra-experimental-features flakes` instead of `nix build` but it results in an error: ``` pi@raspi3:~/headscale $ make build nix build --extra-experimental-features nix-command --extra-experimental-features flakes warning: Git tree '/home/pi/headscale' is dirty error: builder for '/nix/store/x3zdq6lh5w1cpiy2xmynsvb3rwy74qi6-headscale-dev.drv' failed with exit code 1; last 10 log lines: > Building subPackage ./integration > Building subPackage ./integration/dockertestutil > Building subPackage ./integration/hsic > Building subPackage ./integration/integrationutil > Building subPackage ./integration/tsic > buildPhase completed in 16 minutes 26 seconds > running tests > github.com/jackc/pgx/v5/pgtype: /nix/store/26gwr82s1bfd1llbwq7cvrkzqkc562in-go-1.20.2/share/go/pkg/tool/linux_arm64/compile: signal: killed > FAIL github.com/juanfont/headscale [build failed] > FAIL For full logs, run 'nix log /nix/store/x3zdq6lh5w1cpiy2xmynsvb3rwy74qi6-headscale-dev.drv'. make: *** [Makefile:22: build] Error 1 ``` See the log: ``` pi@raspi3:~/headscale $ nix log /nix/store/x3zdq6lh5w1cpiy2xmynsvb3rwy74qi6-headscale-dev.drv --extra-experimental-features nix-command @nix { "action": "setPhase", "phase": "unpackPhase" } unpacking sources unpacking source archive /nix/store/v2kfvk4p6babyn6d0i37nlxv2g9j155z-source source root is source @nix { "action": "setPhase", "phase": "patchPhase" } patching sources @nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" } updateAutotoolsGnuConfigScriptsPhase @nix { "action": "setPhase", "phase": "configurePhase" } configuring @nix { "action": "setPhase", "phase": "buildPhase" } building Building subPackage . Building subPackage ./cmd/gh-action-integration-generator Building subPackage ./cmd/headscale Building subPackage ./cmd/headscale/cli Building subPackage ./gen/go/headscale/v1 Building subPackage ./integration Building subPackage ./integration/dockertestutil Building subPackage ./integration/hsic Building subPackage ./integration/integrationutil Building subPackage ./integration/tsic buildPhase completed in 16 minutes 26 seconds @nix { "action": "setPhase", "phase": "checkPhase" } running tests github.com/jackc/pgx/v5/pgtype: /nix/store/26gwr82s1bfd1llbwq7cvrkzqkc562in-go-1.20.2/share/go/pkg/tool/linux_arm64/compile: signal: killed FAIL github.com/juanfont/headscale [build failed] FAIL ``` Now all this is while trying to use nix build. Here are my questions: 1. Why is the build failing? 2. How do I compile for armhf? Do I need to edit flake.nix? (I'm forced to use arm64 raspberry pi to install the nix and protobuf tools) Thank you
adam added the bug label 2025-12-29 01:29:57 +01:00
adam closed this issue 2025-12-29 01:29:57 +01:00
Author
Owner

@kradalby commented on GitHub (Apr 19, 2023):

Hi @abosaad11 we are adding back versions for old ARM in the next release, take a look at the current alpha release and give that a go.

@kradalby commented on GitHub (Apr 19, 2023): Hi @abosaad11 we are adding back versions for old ARM in the next release, take a look at the current alpha release and give that a go.
Author
Owner

@abosaad11 commented on GitHub (Apr 19, 2023):

Hi @abosaad11 we are adding back versions for old ARM in the next release, take a look at the current alpha release and give that a go.

Thank you the deb arm package works! Please continue supporting arm there are a bunch of us :)

@abosaad11 commented on GitHub (Apr 19, 2023): > Hi @abosaad11 we are adding back versions for old ARM in the next release, take a look at the current alpha release and give that a go. Thank you the deb arm package works! Please continue supporting arm there are a bunch of us :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#470