Yggdrasil: LoadError: Dependency HDF5_jll specifies a version, use build_version and/or compat instead

I am trying to update the NetCDF library in Yggdrasil. First I would like to build the tar files locally, however I get the following error (before making any changes to build_tarballs.jl):

cd Yggdrasil/N/NetCDF/NetCDF@julia-1.6
julia --color=yes build_tarballs.jl --verbose
ERROR: LoadError: Dependency HDF5_jll specifies a version, use build_version and/or compat instead
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] build_tarballs(ARGS::Any, src_name::Any, src_version::Any, sources::Any, script::Any, platforms::Any, products::Any, dependencies::Any; julia_compat::String, kwargs::Any)
   @ BinaryBuilder ~/.julia/packages/BinaryBuilder/vQJzE/src/AutoBuild.jl:145
 [3] top-level scope
   @ /mnt/data1/abarth/src/Yggdrasil/N/NetCDF/NetCDF@julia-1.6/build_tarballs.jl:10
in expression starting at /mnt/data1/abarth/src/Yggdrasil/N/NetCDF/NetCDF@julia-1.6/build_tarballs.jl:10

I tried with the current version of BinaryBuilder v0.4.1 + BinaryBuilderBase v1.0.0 aswell as the master version.

I am not sure where I need to specify the build_version and/or compat.

For anyone hitting this issue, I scavenged the script that Alexander was referring to over two years ago, it’s

What the error is saying that Dependecy has a PackageSpec argument which specifies the version number, but instead the syntax should be something like

Dependency("HDF5_jll"; compat="1.12.0") # this adds a compat bound in the generated JLL package _and_ uses the minimum compatible version as build version
Dependency("HDF5_jll", v"1.12.0") # this only specifies the version to use for the build, without saving a compat bound in the generated JLL package

The former is preferred to the latter because it’s always better to specific compat bounds when possible.

1 Like