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

Add ARM build #36

Closed
2phost opened this issue Jan 15, 2020 · 18 comments
Closed

Add ARM build #36

2phost opened this issue Jan 15, 2020 · 18 comments

Comments

@2phost
Copy link

2phost commented Jan 15, 2020

Describe the bug

When I run this container on an ARM system I see the following error:

standard_init_linux.go:207: exec user process caused "exec format error"

I think it may be related to the system being ARM based, and your image was not compiled in ARM based systems.
Is it possible to add an ARM build? For example using the tag arm and arm64 for each system.

Tested on Kubernetes 1.17

@amouat
Copy link
Contributor

amouat commented Jan 16, 2020

Yes, I'm pretty sure you're right. It shouldn't be a problem to add an ARM build. Previously, there was an issue with some underlying libraries that made it difficult.

I'm afraid I'm away from the office for around a week, but I'll get to this when I'm back. In the meantime I'll update the title to track this issue.

@amouat amouat changed the title standard_init_linux.go:207: exec user process caused "exec format error" Add ARM build Jan 16, 2020
@2phost
Copy link
Author

2phost commented Jan 16, 2020

Ok, thanks.
If you need further information or any help (for example testing/debugging something or other) just ask and I will do it on my side.

@amouat
Copy link
Contributor

amouat commented Jan 16, 2020

Thanks, I'll probably ask you to test it if that's ok.

@amouat
Copy link
Contributor

amouat commented Jan 22, 2020

I just did a build for arm64 and it seems to have worked without changes. Is there a specific platform you wanted? arm64 or arm/v7?

Whilst it's easy to do a one-off build, I'm not sure how to set up infrastructure to do this automatically yet.

@2phost
Copy link
Author

2phost commented Jan 22, 2020

Thanks. My target system is ARMv7 based, as soon as you have the build ready I can test it and give you feedback.

Setup this build automatically it is a nice to have feature. I am not sure about your pipeline to create the builds, but you can build it with buildx of docker and create different tags for each architecture.

@amouat
Copy link
Contributor

amouat commented Jan 23, 2020

Please try out the image containersol/trow:armv7.

There's actually no need for different tags for each architecture thanks to manifest lists (https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) which allows the client to pick the correct image for the architecture.

The problem is Trow currently uses Docker Hub automated builds, and I don't think I can (easily) get the Docker Hub to do multi-platform builds - it doesn't seem to support buildx.

I've also ran into some problems with QEMU when doing builds for other platforms, which is another problem. The ideal solution is to have a build cluster with dedicated amd/armv7/arm64 machines for doing this. But I don't have the money or time to support that currently.

I'll have a think, but I suspect all I can do for the minute is manually create multi-platform builds for releases and extra documentation & scripts for creating such builds.

@2phost
Copy link
Author

2phost commented Jan 24, 2020

I just tried it out and I am getting the same error message as before:

standard_init_linux.go:207: exec user process caused "exec format error"

I just changed the tag, but I will try to debug the issue during this weekend.

@amouat
Copy link
Contributor

amouat commented Jan 25, 2020

You can also try amouat/trow:armv7 which I built in a slightly different way. I've added some docs to the User Guide to explain the different ways to build for different platforms.

Can I ask exactly what hw you're building for? If it's a raspberry pi, which model is it?

@amouat
Copy link
Contributor

amouat commented Jan 25, 2020

Just playing with the image on an Pi model 3 and getting the same issue. I see the architecture is wrong in docker inspect. I'll see what I can do, but I'm wondering if it's a bug in Docker.

@2phost
Copy link
Author

2phost commented Jan 25, 2020 via email

@amouat
Copy link
Contributor

amouat commented Jan 25, 2020

I just got it working on a Pi 3. I think I was hitting a "feature" in buildkit (moby/buildkit#1057) and a bug in QEMU. However containersol/trow:armv7 should now work for you.

@2phost
Copy link
Author

2phost commented Jan 26, 2020

I just tried it again and it seems to be working now.
Thanks for the build!

Maybe you can create some documentation about it before close this issue.

@2phost
Copy link
Author

2phost commented Jan 26, 2020

I just checked your documentation and it seems to have the Multiplatform Builds section ;)

@amouat
Copy link
Contributor

amouat commented Jan 27, 2020

Yeah, I added that over the weekend. It needs changed though - it seems builds with QEMU fail with an error message, so I'll recommend the cross-compilation with Rust method.

Once I've updated the docs, I'll close this issue. I might also create an arm64 build.

@amouat amouat closed this as completed in c3dd12a Jan 27, 2020
@munntjlx
Copy link

Just a quick question, how much memory does the whole kettle of fish use?

@kervel
Copy link

kervel commented Mar 10, 2021

the arm64 build seems to work just fine (installed using helm). however, this document https://github.com/ContainerSolutions/trow/blob/master/docs/USER_GUIDE.md still mentions that there is only support for amd64...

@amouat
Copy link
Contributor

amouat commented Mar 11, 2021

@munntjlx sorry, I never noticed this question. Honestly, I don't know the answer. It shouldn't be a lot as it's largely stateless. I'm in the middle of doing some refactorings that may have an impact, once things are more stable, I'd like to do some profiling.

@kervel thanks, that's good to know. I'll update the guide. It might be old or it might be more just that I'll find it hard to explicitly provide support for those platforms.

@amouat
Copy link
Contributor

amouat commented Mar 12, 2021

@kervel the User Guide was just out-of-date. I've updated the text, thanks a lot for pointing it out.

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