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

Does not compile on Raspberry Pi OS 64 Bit #14

Closed
cHemingway opened this issue Aug 5, 2023 · 5 comments
Closed

Does not compile on Raspberry Pi OS 64 Bit #14

cHemingway opened this issue Aug 5, 2023 · 5 comments

Comments

@cHemingway
Copy link

Using go 19.4 arm64 on Raspberry Pi OS 64bit 2023-05-03

$ uname -smor
Linux 6.1.21-v8+ aarch64 GNU/Linux
$go version
go version go1.19.4 linux/arm64

When compiling, I get this unrecognized instruction error:

$ CGO_LDFLAGS="-latomic" go build -tags=arm
[... snipped ...]
# runtime/internal/syscall
/usr/local/go/src/runtime/internal/syscall/defs_linux_arm64.go:7:7: SYS_FCNTL redeclared in this block
        /usr/local/go/src/runtime/internal/syscall/defs_linux_arm.go:7:7: other declaration of SYS_FCNTL
# math
/usr/local/go/src/math/sqrt_arm.s:13: unrecognized instruction "SQRTD"
asm: assembly of /usr/local/go/src/math/sqrt_arm.s failed
@malykhin
Copy link
Member

malykhin commented Aug 6, 2023

Thanks for reporting this. Last time I tried compiling it for 64 bit Raspbian it wasn’t working due to camera-related dependencies. There is still a handful of pancakes which aren’t compatible with 64 bit. Is there a specific reason you wanna run it on this is version ?

@cHemingway
Copy link
Author

No particular reason, its just what I already was running. I will try the 32 bit and report back.
Might I suggest the README is updated to specify it only works on 32 bit?

@cHemingway
Copy link
Author

Running a clean install of the latest Raspberry Pi OS 32 bit, it compiles for me fine, so I can confirm this issue is 64 bit specific.

@cHemingway
Copy link
Author

Related, it appears I can't run go-delve on 32 bit arm, which I was going to use for debugging as thats what the VSCode extension uses. See go-delve/delve#1933

@malykhin
Copy link
Member

malykhin commented Sep 6, 2023

Hi @cHemingway,

I successfully compiled bot_box on 64-bit Raspbian using go1.21.1.linux-arm64. The correct command for arm64 is: CGO_LDFLAGS="-latomic" go build -tags=arm64.

Thanks for reporting this. I'll update the README.md to include this information.

@malykhin malykhin closed this as completed Sep 7, 2023
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

No branches or pull requests

2 participants