Virtual Cross-Compile Farm

The following schreenschot depicts the cross compilation process of linux rpm-packages.


Cross Compile or virtual CPU-Emulation?

Cross compilation is in general applicable for any system but might have practical impacts in some cases. Cross compilation suits quite good for individual packages and could be adapted personally with less efforts. But for systems with varying runtime environments and different operating systems there are some major practical challanges.

A typical application for cross compilation is the compilation of the re-configured Linux kernel for for the hosting OS within x86 architectures.


What to do if Cross Compile does not work?

In some cases even this could be impossible. The rpmbuild utility for example has a bug in a given version, thus preventing the compilation on amd64 for i386/i586.


Cross Compile with virtual CPU-Emulation!

In this case the native compilation is the only viable approach. Due to limits of available native architectures with i386 CPUs the decision was made to apply a virtualized native installation as compilation environment.

For reasons of the actual performance - 1.5h for a compiler run - and frequently required repetition it was required to set up a distributed parallel build environment.

The concrete solution is based on VMware-Server(TM) with a 32-bit installation of the target Linux system. This was also the prefered solution due to the availability of ready-to-use system templates.

In the concrete case the j-option of "make" is utilized, which is used in conjunction of ccache and distcc / distcc.org for load distribution.


Compilation execution


The compilation time was reduced in the basic constallation by an avarage factor of 3.


Compilation result


The start, execution of the compilation, and the finish of the complete environment is performed by means of the UnifiedSessionsManager. This comprises the systems monitoring tools too, where each gkrellm represents it's own physical or virtual machine. The whole process is performed as a batch-call by a preconfigured script.