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

Cross compiling for ARM #71

Closed
bryfry opened this issue May 24, 2020 · 9 comments
Closed

Cross compiling for ARM #71

bryfry opened this issue May 24, 2020 · 9 comments

Comments

@bryfry
Copy link

bryfry commented May 24, 2020

I get the below error when trying to build the piv-go project to run on arm. Apologies if I am simply missing a dependency.

ubuntu@tmc:~/go/src/github.com/filosottile/yubikey-agent$ GOOS=linux GOARCH=arm GOARM=5 go build 
# github.com/go-piv/piv-go/piv
../../../../pkg/mod/github.com/go-piv/piv-go@v1.5.0/piv/piv.go:100:7: undefined: scContext
../../../../pkg/mod/github.com/go-piv/piv-go@v1.5.0/piv/piv.go:101:7: undefined: scHandle
../../../../pkg/mod/github.com/go-piv/piv-go@v1.5.0/piv/piv.go:102:7: undefined: scTx

ubuntu@tmc:~/go/pkg/mod/github.com/go-piv/piv-go@v1.5.0/piv$ GOOS=linux GOARCH=arm GOARM=5 go build
# github.com/go-piv/piv-go/piv
./piv.go:100:7: undefined: scContext
./piv.go:101:7: undefined: scHandle
./piv.go:102:7: undefined: scTx
@ericchiang
Copy link
Collaborator

There are OS specific files that need to be added for this package to work for ARM. See the FreeBSD PR: #70

@ghaithsabba
Copy link

i had the same problem, so i try to compile it on arm alpine and i got the following error
/go/pkg/mod/github.com/go-piv/piv-go@v1.5.0/piv/pcsc_linux.go:29:12: constant 2148532270 overflows _Ctype_long

@philandstuff
Copy link
Contributor

@Ghaith0101 that sounds like the same error reported in #76

@ghaithsabba
Copy link

ghaithsabba commented Jul 28, 2020

Actually it is exactly what you described in #76 i already forked the repo and currently I am testing it if it will work with windows and OS, then I will make a merge request

@ostaebler
Copy link

@Ghaith0101 Any news on the PR? I'm running in the same issue...

@ghaithsabba
Copy link

@ostaebler ishould be done with it this weekend, sorry for being late

@ghaithsabba
Copy link

#81

@flokli
Copy link

flokli commented Sep 30, 2020

This should be fixed by #81, shouldn't it?

@ghaithsabba
Copy link

ghaithsabba commented Oct 2, 2020

Yes i tested it under

FROM i386/golang:1.15.2-buster
FROM arm32v7/golang:1.15.2-buster

and it built

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

6 participants