BinaryBuilder: enable compilers

I’m trying to start using BinaryBuilder but have no success even for the simplest cases. E.g. I download https://github.com/JuliaPackaging/Yggdrasil/blob/master/H/HelloWorldFortran/build_tarballs.jl and run it as julia build_tarballs.jl. The result is:

You tried to run 'f77' which requires the 'c' shard; add 'compilers=[:c]' to your invocation!
Previous command exited with 1
ERROR: LoadError: Build for HelloWorldFortran on i686-linux-gnu-libgfortran3 did not complete successfully

I tried passing compilers=[:c] into build_tarballs in the script, but nothing changed. Executing gcc also shows the same error. Also tried BINARYBUILDER_RUNNER="privileged".
Am I missing something obvious? As I understand the docs, the build_tarballs.jl script should work when downloaded and executed individually.

If that’s important, I use gentoo with 4.19 kernel, version 1.4 of julia, and version 0.2.4 of binarybuilder.

What version of BinaryBuilder is that? :thinking:

[12aac903] BinaryBuilder v0.2.4 - I thinks this is the latest version. Julia is 1.4.

Can you please show the full stacktrace? I can’t find the error message anywhere.

Edit: ok, I found from where the message is coming from

The full stacktrace anyway, may be it is helpful.

[ Info: Building for i686-linux-gnu-libgfortran3, i686-linux-gnu-libgfortran4, i686-linux-gnu-libgfortran5, x86_64-linux-gnu-libgfortran3, x86_64-linux-gnu-libgfortran4, x86_64-linux-gnu-libgfortran5, aarch64-linux-gnu-libgfortran3, aarch64-linux-gnu-libgfortran4, aarch64-linux-gnu-libgfortran5, armv7l-linux-gnueabihf-libgfortran3, armv7l-linux-gnueabihf-libgfortran4, armv7l-linux-gnueabihf-libgfortran5, powerpc64le-linux-gnu-libgfortran3, powerpc64le-linux-gnu-libgfortran4, powerpc64le-linux-gnu-libgfortran5, i686-linux-musl-libgfortran3, i686-linux-musl-libgfortran4, i686-linux-musl-libgfortran5, x86_64-linux-musl-libgfortran3, x86_64-linux-musl-libgfortran4, x86_64-linux-musl-libgfortran5, aarch64-linux-musl-libgfortran3, aarch64-linux-musl-libgfortran4, aarch64-linux-musl-libgfortran5, armv7l-linux-musleabihf-libgfortran3, armv7l-linux-musleabihf-libgfortran4, armv7l-linux-musleabihf-libgfortran5, x86_64-apple-darwin14-libgfortran3, x86_64-apple-darwin14-libgfortran4, x86_64-apple-darwin14-libgfortran5, x86_64-unknown-freebsd11.1-libgfortran3, x86_64-unknown-freebsd11.1-libgfortran4, x86_64-unknown-freebsd11.1-libgfortran5, i686-w64-mingw32-libgfortran3, i686-w64-mingw32-libgfortran4, i686-w64-mingw32-libgfortran5, x86_64-w64-mingw32-libgfortran3, x86_64-w64-mingw32-libgfortran4, x86_64-w64-mingw32-libgfortran5
[ Info: Running privileged container via `sudo`, may ask for your password:
Downloading artifact: PlatformSupport-i686-linux-gnu.v2020.2.7.x86_64-linux-musl.squashfs
######################################################################## 100.0%##O=#  #              ######################################################################## 100.0%
[ Info: No hash cache found
[ Info: Calculated hash f316b9ec1fb34e8bd5a32d46fc0020551901400686bf88a9cc34d9a3dd884079 for file /tmp/jl_4rKTFv-download.gz
Downloading artifact: GCCBootstrap-i686-linux-gnu.v4.8.5.x86_64-linux-musl.squashfs
######################################################################## 100.0%##O=#  #              ######################################################################## 100.0%
[ Info: No hash cache found
[ Info: Calculated hash 64081fa917573849b52f68401197d3eed6f5b5593c93f79e2d8b27890e9d5f8f for file /tmp/jl_GwLkuu-download.gz
You tried to run 'f77' which requires the 'c' shard; add 'compilers=[:c]' to your invocation!
Previous command exited with 1
ERROR: LoadError: Build for HelloWorldFortran on i686-linux-gnu-libgfortran3 did not complete successfully

Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] autobuild(::AbstractString, ::AbstractString, ::VersionNumber, ::Array{#s1079,1} where #s1079<:BinaryBuilder.AbstractSource, ::AbstractString, ::Array{T,1} where T, ::Array{#s1078,1} where #s1078<:Product, ::Array{#s1077,1} where #s1077<:BinaryBuilder.AbstractDependency; verbose::Bool, debug::Bool, skip_audit::Bool, ignore_audit_errors::Bool, autofix::Bool, code_dir::Union{Nothing, String}, require_license::Bool, lazy_artifacts::Bool, meta_json_stream::Any, kwargs::Any) at /home/aplavin/.julia/packages/BinaryBuilder/o9Hrl/src/AutoBuild.jl:671
 [3] build_tarballs(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any; kwargs::Any) at /home/aplavin/.julia/packages/BinaryBuilder/o9Hrl/src/AutoBuild.jl:183
 [4] build_tarballs(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any) at /home/aplavin/.julia/packages/BinaryBuilder/o9Hrl/src/AutoBuild.jl:84
 [5] top-level scope at /home/aplavin/work/julia/build_tarballs.jl:31
 [6] include(::Module, ::String) at ./Base.jl:377
 [7] exec_options(::Base.JLOptions) at ./client.jl:288
 [8] _start() at ./client.jl:484
in expression starting at /home/aplavin/work/julia/build_tarballs.jl:31

Turns out this issue is machine-specific somehow. I tried running the very same script with the same julia version at another computer, and the build was successful.
Still have no idea why it doesn’t work on one machine…