ITK cross compilation using Julia's BinaryBuilder.jl

Related to ITK on Julia, Shared Library Files, @cj-mclaughlin and I are trying to get an automated cross-compiled version of ITK built using the Julia package BinaryBuilder.jl which manages the cross-compilation process through pre-configured build environments (~13 platforms currently supported, listed below).

To do so, we need to provide a cross-platform bash script for BinaryBuilder to use in each build environment. Currently our build script looks like this, but is suffering from a lot of missing TryRun() variables, and fails seemingly because of this.

Does anyone know of a simple way to make this successful across all the environments? That might be asking a lot.

BinaryProvider.jl supported platforms

 Linux(:i686, libc=:glibc)                    
 Linux(:x86_64, libc=:glibc)                  
 Linux(:aarch64, libc=:glibc)                 
 Linux(:armv7l, libc=:glibc, call_abi=:eabihf)
 Linux(:powerpc64le, libc=:glibc)             
 Linux(:i686, libc=:musl)                     
 Linux(:x86_64, libc=:musl)                   
 Linux(:aarch64, libc=:musl)                  
 Linux(:armv7l, libc=:musl, call_abi=:eabihf) 
1 Like

@ianshmean welcome to the ITK community! :sunny:

To address the TryRun configuration results, a nice approach is to set the CMAKE_CROSSCOMPILING_EMULATOR configuration variable. On a Linux host, for the Linux targets the QEMU User space emulator can be used. On a Linux host for a Windows target, WINE can be used.

Also possibly useful is dockcross.


Thanks @matt.mccormick. This is really helpful.
However, unfortunately cross compiling emulators aren’t yet available in Julia’s BinaryBuilder, but they are on the development plan… So I’ve decided to pause my efforts until they’re available. See

I’ll post back here with any progress