-
Notifications
You must be signed in to change notification settings - Fork 51
ARM compatibility #16
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
Comments
So far the workaround for apt seems to be: apt-get install -y golang git-core mercurial bzr
go get gopkg.in/niemeyer/godeb.v1/cmd/godeb
# or
go get github.com/niemeyer/godeb However the first version returns:
and the second one returns:
|
|
Sorry for spamming. I found this useful resource: http://dave.cheney.net/unofficial-arm-tarballs |
I don't think many changes are needed to make this happen. My Raspberry Pi 4 (armv7l) reports
package main
import (
"fmt"
"go/build"
)
func main() {
fmt.Println("arch", build.Default.GOARCH)
} $ go run arch.go
arch arm
$ uname -m
armv7l I used this info to change func debArch() string {
arch := build.Default.GOARCH
if arch == "386" {
return "i386"
}
if arch == "arm" {
return "armhf"
}
return arch
} And also updated var tbs []*Tarball
for _, v := range versions {
for _, f := range v.Files {
if f.Os == build.Default.GOOS && (f.Arch == build.Default.GOARCH ||
(build.Default.GOARCH == "arm" && f.Arch == "armv6l")) {
t := Tarball{
Version: strings.TrimPrefix(f.Version, "go"),
URL: downloadBaseURL + f.Filename}
tbs = append(tbs, &t)
break
}
}
} It's probably not the best solution, but it works for me. Thoughts? |
Using a Scaleway C1 server, this would be useful.
The text was updated successfully, but these errors were encountered: