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

Quick cross build of pillar from amd64 to arm64 seems to be broken #71

Closed
rvs opened this issue Jun 10, 2019 · 5 comments
Closed

Quick cross build of pillar from amd64 to arm64 seems to be broken #71

rvs opened this issue Jun 10, 2019 · 5 comments

Comments

@rvs
Copy link
Contributor

rvs commented Jun 10, 2019

Description

Quick cross build of pillar from amd64 to arm64 seems to be broken

Steps to reproduce the issue:

On amd64:

$ cd pkg/pillar
$ make GOARCH=arm64 build-docker

Sometime is desirable to simply cross-build pillar alone and then replace it inside of the image that is being build for deployment

@deitch
Copy link
Contributor

deitch commented Jun 10, 2019

Yes! I have had this open for a while.

Question: do we care if we build in alpine or Debian? The reason I ask is installing the cross-compilers. In alpine, you need to download the right cross-compiler, usually from https://musl.cc but there are others. It currently doesn't work because of URL changes.

In Debian, you can do something like:

RUN dpkg --add-architecture arm64
RUN apt update
RUN apt install -y binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu

and get what you need. Alpine explicitly does not package up cross-compilers and says they have no intention to do so (I checked last week again).

Of course, the final image is FROM alpine:3.8, so it should not affect the results (need to watch out for libc and dynamically linked dependencies).

@rvs
Copy link
Contributor Author

rvs commented Jun 10, 2019

I believe we can't avoid building in alpine on account on musl. Remember that the goal here is to get A SINGLE zedbox binary cross-built and then use image linkuxkit file stanza to replace it in the final image.

@deitch
Copy link
Contributor

deitch commented Jun 10, 2019

Remember that the goal here is to get A SINGLE zedbox binary cross-built

Yes, definitely. The only concern I would have is with libc (glibc vs must), and even then, only if it makes certain calls. I have done some projects that distribute on alpine but build on Debian, precisely because of the cross-building ease. Assuming we do statically linked (which we definitely should be doing), then that would be the only potential issue.

It is easy to test, of course. I will try to get to it.

The real issue here is the CGO. Without that, we don't need any of the cross-compilers, since go itself does it so well.

@rouming
Copy link
Contributor

rouming commented Feb 6, 2023

@eriknordmark @deitch do we keep this or outdated? there was a PR recently #2998 so no issues expected.

@rene
Copy link
Collaborator

rene commented Apr 24, 2023

Correct @rouming and I can't reproduce this error anymore, let's close it.

@rene rene closed this as completed Apr 24, 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

4 participants