# Yggdrasil: LoadError: Dependency HDF5\_jll specifies a version, use build\_version and/or compat instead

**URL:** <https://discourse.julialang.org/t/yggdrasil-loaderror-dependency-hdf5-jll-specifies-a-version-use-build-version-and-or-compat-instead/68134>\
**Category:** Package Management\
**Tags:** binarybuilder, yggdrasil\
**Created:** [September 14, 2021, 9:10am UTC](https://discourse.julialang.org/t/yggdrasil-loaderror-dependency-hdf5-jll-specifies-a-version-use-build-version-and-or-compat-instead/68134 "2021-09-14T09:10:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander-Barth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alexander-barth/32/3692_2.png) [@Alexander-Barth](https://discourse.julialang.org/u/Alexander-Barth)\
**Post date:** [September 14, 2021, 9:10am UTC](https://discourse.julialang.org/t/yggdrasil-loaderror-dependency-hdf5-jll-specifies-a-version-use-build-version-and-or-compat-instead/68134/1 "2021-09-14T09:10:39Z")

</div>

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`):

```julia
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.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [November 29, 2023, 10:19pm UTC](https://discourse.julialang.org/t/yggdrasil-loaderror-dependency-hdf5-jll-specifies-a-version-use-build-version-and-or-compat-instead/68134/2 "2023-11-29T22:19:30Z")

</div>

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

> <https://github.com/JuliaPackaging/Yggdrasil/blob/5b9aa3d48766ab2681f6b92e0b7e6116ddfc5e27/N/NetCDF/common.jl#L76>

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

```julia
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.
