Skip to content
New issue

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

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

Already on GitHub? # to your account

Cross-compile powerpc binary #1

Merged
merged 1 commit into from
May 10, 2018
Merged

Conversation

linki
Copy link

@linki linki commented Apr 18, 2018

@hchenxa An update to your PR over at linki#60.

Would it be possible to cross-compile on x86 for power so that we can build the image on quay.io? To make this build an image on my machine I had to remove dumb-init and the adduser calls in the final image. Maybe you have an idea on how to keep them.

Unfortunately, I don't have a machine to test that this actually works.

see linki#60 (comment)

@linki
Copy link
Author

linki commented May 8, 2018

@hchenxa Can you give it a try on your cluster?

docker run quay.io/linki/chaoskube:hchenxa_master --version

@hchenxa
Copy link
Owner

hchenxa commented May 10, 2018

@linki , sorry for later, and here is the output

[root@icp3p11 ~]# uname  -a
Linux icp3p11 3.10.0-862.el7.ppc64le #1 SMP Wed Mar 21 22:20:19 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux
[root@icp3p11 ~]# docker run quay.io/linki/chaoskube:hchenxa_master --version
v0.7.0-2-g11cb956
[root@icp3p11 ~]#

I think it works fine. thanks @linki

@hchenxa hchenxa merged commit 0e82403 into hchenxa:master May 10, 2018
@linki linki deleted the hchenxa_master branch May 10, 2018 15:52
@linki
Copy link
Author

linki commented May 14, 2018

@hchenxa Thanks for testing it 😃

Interestingly, it also runs on my intel-backed macbook:

$ docker pull quay.io/linki/chaoskube:hchenxa_master
Digest: sha256:2bb7507ddc482b594226e6bf54387a2b6b0421cc9176ad623f199588f55d71b1
$ docker info | grep Architecture
Architecture: x86_64
$ docker run quay.io/linki/chaoskube:hchenxa_master --version
v0.7.0-2-g11cb956

I checked that the image is the cross-compiled one by running it on one of my intel-backend linux boxes:

$ docker pull quay.io/linki/chaoskube:hchenxa_master
Digest: sha256:2bb7507ddc482b594226e6bf54387a2b6b0421cc9176ad623f199588f55d71b1
$ docker info | grep Architecture
Architecture: x86_64
$ docker run quay.io/linki/chaoskube:hchenxa_master --version
panic: standard_init_linux.go:178: exec user process caused "exec format error" [recovered]

Is this expected?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants