How BinaryBuilder.jl handles binary compatibility and portability
masterBinaryBuilder.jl automatically manages several low-level compatibility issues to ensure binaries are portable across different machines and operating systems. These include:
- Uniform Compiler Interface: Provides a consistent environment where
gcc,g++, andgfortranare available via standard names or triplet-prefixed names (e.g.,x86_64-linux-gnu-gcc). glibcVersioning: Compiles against olderglibcversions to ensure maximum compatibility with newer Linux distributions.gfortranABI Compatibility: Handles the broken ABI transitions ingfortran(6.X $\rightarrow$ 7.X and 7.X $\rightarrow$ 8.X) by building against multiple versions and selecting the correct one at runtime.- Library Dependencies: Automatically fixes improper library linkage (especially on macOS) by using
RPATH/RUNPATHsemantics. - Embedded Absolute Paths: Automatically converts symlinks within the build prefix to relative paths and warns if files contain absolute paths to the build prefix.
- Instruction Set Architecture (ISA): Disassembles binaries to ensure they do not use instructions that exceed the target architecture's minimum supported instruction set. It also detects
cpuidinstructions, which indicate the binary is handling instruction set detection internally.