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

Make working on arm64 and ppc64le too #209

Closed
luxas opened this issue May 17, 2016 · 8 comments
Closed

Make working on arm64 and ppc64le too #209

luxas opened this issue May 17, 2016 · 8 comments

Comments

@luxas
Copy link
Contributor

luxas commented May 17, 2016

When building for arm64 or ppc64le, it fails with these messages:

# github.com/containernetworking/cni/pkg/ns
pkg/ns/ns.go:26: undefined: setNsNr
# github.com/containernetworking/cni/vendor/golang.org/x/sys/unix
vendor/golang.org/x/sys/unix/flock.go:18: undefined: Flock_t
vendor/golang.org/x/sys/unix/sockcmsg_linux.go:14: undefined: Ucred
vendor/golang.org/x/sys/unix/sockcmsg_linux.go:27: undefined: Ucred
vendor/golang.org/x/sys/unix/sockcmsg_unix.go:42: undefined: Cmsghdr

The ns.go issue seems easy to fix, but the golang.org/x/sys/unix ones seems harder.
We'll need cni for these arches for Kubernetes

@luxas
Copy link
Contributor Author

luxas commented May 17, 2016

cc @Pensu

@luxas
Copy link
Contributor Author

luxas commented May 17, 2016

The first one is easy, we just need to create some more files: https://github.com/opencontainers/runc/blob/master/libcontainer/system/setns_linux.go#L13-22

@luxas
Copy link
Contributor Author

luxas commented May 17, 2016

Checked the golang.org/x/sys dependency out and it's really old. Now the package has 155 commits, the vendored version has only 76, so only a godep update will do

@steveej steveej modified the milestone: v1.0.0 May 19, 2016
@steveej
Copy link
Member

steveej commented May 19, 2016

@luxas please submit a PR with the mentioned godep update. In the longterm we might want to include compilation for other architectures in our CI. For this purpose it would be shared the build steps, unless you're building this natively ;-)

@luxas
Copy link
Contributor Author

luxas commented May 24, 2016

I'm cross-compiling, and will send a PR as soon as I have time :)

@luxas
Copy link
Contributor Author

luxas commented Jun 8, 2016

Seems like c0d34c6 fixed the SetNsNr issue.
I'm sending a PR now...

@luxas
Copy link
Contributor Author

luxas commented Jun 8, 2016

#241
I think you can move this to v0.4.0

luxas added a commit to luxas/cni that referenced this issue Jul 3, 2016
The current vendor of sys/unix is really old, and doesn't work on arm64 and ppc64le
Updating to the latest version might also fix other issues

ref containernetworking#209
luxas added a commit to luxas/cni that referenced this issue Jul 3, 2016
… architectures

This makes it possible to cross-compile cni like so:
$ GOARCH=arm ./build
$ GOARCH=arm64 ./build
$ GOARCH=ppc64le ./build

ref containernetworking#209
luxas added a commit to luxas/cni that referenced this issue Jul 3, 2016
Cross-compile cni for arm, arm64 and ppc64le with go1.6 only
Allow go tip to fail
Set fast_finish to true, which means travis will instantly return build failure when any of the required builds fail

ref containernetworking#209
luxas added a commit to luxas/cni that referenced this issue Jul 3, 2016
Modify the releasing script to cross-compile for the new architectures, but also keep backwards-compability

ref containernetworking#209
luxas added a commit to luxas/cni that referenced this issue Aug 13, 2016
The current vendor of sys/unix is really old, and doesn't work on arm64 and ppc64le
Updating to the latest version might also fix other issues

ref containernetworking#209
luxas added a commit to luxas/cni that referenced this issue Aug 13, 2016
… architectures

This makes it possible to cross-compile cni like so:
$ GOARCH=arm ./build
$ GOARCH=arm64 ./build
$ GOARCH=ppc64le ./build

ref containernetworking#209
luxas added a commit to luxas/cni that referenced this issue Aug 13, 2016
Cross-compile cni for arm, arm64 and ppc64le with go1.6 only
Allow go tip to fail
Set fast_finish to true, which means travis will instantly return build failure when any of the required builds fail

ref containernetworking#209
luxas added a commit to luxas/cni that referenced this issue Aug 13, 2016
Modify the releasing script to cross-compile for the new architectures, but also keep backwards-compability

ref containernetworking#209
luxas added a commit to luxas/cni that referenced this issue Aug 13, 2016
The current vendor of sys/unix is really old, and doesn't work on arm64 and ppc64le
Updating to the latest version might also fix other issues

ref containernetworking#209
luxas added a commit to luxas/cni that referenced this issue Aug 13, 2016
… architectures

This makes it possible to cross-compile cni like so:
$ GOARCH=arm ./build
$ GOARCH=arm64 ./build
$ GOARCH=ppc64le ./build

ref containernetworking#209
luxas added a commit to luxas/cni that referenced this issue Aug 13, 2016
Cross-compile cni for arm, arm64 and ppc64le with go1.6 only
Allow go tip to fail
Set fast_finish to true, which means travis will instantly return build failure when any of the required builds fail

ref containernetworking#209
luxas added a commit to luxas/cni that referenced this issue Aug 13, 2016
Modify the releasing script to cross-compile for the new architectures, but also keep backwards-compability

ref containernetworking#209
@luxas
Copy link
Contributor Author

luxas commented Oct 2, 2016

This is working now when #241 is merged. Thanks!

@luxas luxas closed this as completed Oct 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants