Is there a Docker image for cross-compiling packages?

Development on core packages and the distribution goes on in here.

Is there a Docker image for cross-compiling packages?

Postby Malvineous » Mon Aug 16, 2021 2:17 am

Hi all,

I want to compile some packages for a Raspberry Pi (ARMv6) but I don't want to have to install the whole build environment on the Pi itself, not to mention how slow it is compiling large projects.

Is there a Docker image I can run on an x86_64 Arch Linux machine, that mirrors the Arch Linux ARM environment well enough that I can launch the Docker image, then inside it extract the source, run "makepkg" and end up with a package file I can copy onto the Pi and install normally with pacman?

I've done this before with other non-ARM cross compilers and having it all inside a Docker container is a really neat solution that avoids all the hassle of installing and configuring the cross-platform build tools and all dependent libraries locally on a desktop machine. Having said that, I'm not quite sure how it would work pulling x86_64 packages for running programs inside Docker, but also installing packages from different ARM architectures needed as build dependencies. Like for example I presume it would need glibc for x86_64 (for the host), plus armv6 and armv7 if you wanted to target those two architectures.

Does this sort of thing exist? If not, is anyone else cross compiling without involving an ARM machine? I've seen references here to using distcc but that still requires all the build tools to be on the ARM device which is what I'm ultimately trying to avoid.
Malvineous
 
Posts: 40
Joined: Sat Mar 11, 2017 1:45 pm

Return to Arch Linux ARM

Who is online

Users browsing this forum: Majestic-12 [Bot] and 6 guests