Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal instruction on Raspberry Pi with arm version #4540

Closed
franzs opened this issue Oct 26, 2023 · 5 comments · Fixed by #4542
Closed

Illegal instruction on Raspberry Pi with arm version #4540

franzs opened this issue Oct 26, 2023 · 5 comments · Fixed by #4542

Comments

@franzs
Copy link

franzs commented Oct 26, 2023

Output of restic version

restic 0.16.1

Problem description / Steps to reproduce

Calling restic 0.16.1 for arm on a Raspberry Pi results in an Illegal instruction.

./restic_0.16.1_linux_arm version
Illegal instruction

More details:

cat /proc/cpuinfo 
processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 697.95
Features        : half thumb fastmult vfp edsp java tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7
uname -a
Linu xxx 6.1.21+ #1642 Mon Apr  3 17:19:14 BST 2023 armv6l GNU/Linux
cat /etc/debian_version 
11.7

Version 0.16.0 runs on the same Raspberry Pi without issues:

./restic_0.16.0_linux_arm version
restic 0.16.0 compiled with go1.20.6 on linux/arm
@JsBergbau
Copy link
Contributor

JsBergbau commented Oct 26, 2023

Same problem with me. The official binary seems not to be build with go run build.go --goos linux --goarch arm --goarm 6

You can use this binary in the meantime. I've just built it from repo with commit from yesterday.

resticARM6.zip

Update: Probably RPi 1 is not used widely anmore, but the popular Raspberry Pi Zero (W) is also uses ARM v6, which makes ARM v6 support so important.

@MichaelEischer
Copy link
Member

restic 0.16.0 was built using GOARM=5, whereas restic 0.16.1 uses GOARM=7. This has apparently changed in Go 1.21 https://go.dev/blog/rebuild :

“assume HWFP unless the build is running on an ARM system without floating-point hardware”

Calling restic 0.16.1 for arm on a Raspberry Pi results in an Illegal instruction.

This only affect the Raspberry Pi 1, which only supports the ARMv6 instruction set. All later models support ARMv7.

@MichaelEischer
Copy link
Member

#4542 will change the build process to set GOARM=6. I'm a bit undecided whether we should already drop GOARM=5 support for a 0.16.2 release or only in 0.17.0. At least from a semver standpoint the latter would be the way to go.

@franzs
Copy link
Author

franzs commented Oct 27, 2023

@MichaelEischer Thanks a lot for your efforts. 😃

@mirabilos
Copy link

I’m in the process of setting up an RPi 1 right now, so thanks for keeping it supported ;)

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 a pull request may close this issue.

4 participants