RootFS

RootFS

The execution environment that all BinaryBuilder.jl builds are executed within is referred to as the "root filesystem" or _RootFS_. This RootFS is built through the crossbuild Dockerfiles hosted within the staticfloat/julia-docker repository. The rootfs image is based upon the docker alpine image, and is used to build compilers for every target platform we support. The target platform compiler toolchains are stored within /opt/${triplet}, so the 64-bit Linux (using glibc as the backing libc) compilers would be found in /opt/x86_64-linux-gnu/bin.

Each compiler "shard" is packaged separately, so that users do not have to download a multi-GB tarball just to build for a single platform. The docker image that contains the whole image is exported and chopped up into an overall "root" shard, and then target-specific shards, that are downloaded and mounted on demand by BinaryBuilder.jl.

Each shard is made available both as a .tar.gz file, and as a .squashfs image. When mounting, a .tar.gz file must be extracted, taking up extra diskspace, whereas a .squashfs image can be mounted directly, but this unfortunately requires root privileges on the host machine. This will hopefully be fixed in a future Linux kernel release, but if you have sudo privileges, it is often desireable to use the .squashfs files to save network bandwidth and disk space. See the Environment Variables for instructions on how to do that.

When launching a process within the RootFS image, BinaryBuilder.jl sets up a set of environment variables to enable a target-specific compiler toolchain, among other niceties. See the src/Runner.jl file within this repository for the details on that. Other tools that are available include a "super" binutils that can understand a ridiculously wide variety of binary formats (stored within /opt/super_binutils/bin), a few useful environment variables such as ${nproc}, ${nbits}, and ${proc_family}.