How to build a binary distribution for ARM V5

Hello,

I have tried building from source but unfortunately my ev3dev image (ARM V5) is running out of memory. I have also tried building with the taskset command to minimize the number of threads but still getting errors for what seems to be out of memory issues.

Anyway, I would like to use the cross-compile capabilities of GO to build GO binary distribution for ARM V5. I have read some articles in cross-compilation, but all provide instruction on how to build go applications but not enough information on how to build GO for another platform.

I would appreciate any pointers to the right command to do this.

Thanks,
Marcelo

Is this a duplicate of Installation of Go on ARM v8

Short version, unless you have a very powerful armv5 system you will not succeed in compiling on that system.

I recommend cross compiling your program from your workstation directly to armv5 and avoiding compiling locally on armv5

Dave,

I think I understand I can cross-compile my programs and I think I figured it out how to do that.

What I still do’t understand is how to build (cross-compile) the GO tool chain for ARM5.

Thanks and sorry for the misunderstanding.

Marcelo

I’ve outlined the process in this post, https://dave.cheney.net/2015/10/16/bootstrapping-go-1-5-on-non-intel-platforms

However I advise you not to try as I double your ARM5 system will have the resources necessary to complete the bootstrap process.

Thanks Dave. I understand now. So, basically the cross-compile is generating an ARM5 executable and with that I don’t even need to have GO installed on my ARM5 device to be able to run.
Thanks

Yup, that’s it exactly.

I’ve run the arm5 CI build agent for several years, until it became impossible, and the hardware requirements for a builder are formidable. You need 512mb of ram per core (luckily every arm5 system I’ve found is only single core) and a clock speed comparable to a modern intel machine (which is also near impossible, most ARMv5 systems clock in around 500-600mhz).

In short, you’ll spend literally hours building an environment to build locally on your arm5 host, and that’s if everything works well. But if you cross compile, which you can do today with the Go installation on your machine, it will take you seconds.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.