# Finding BLAS/LAPACK in BinaryBuilder

**URL:** <https://discourse.julialang.org/t/finding-blas-lapack-in-binarybuilder/68321>\
**Category:** Tooling\
**Tags:** binarybuilder, yggdrasil\
**Created:** [September 17, 2021, 10:21am UTC](https://discourse.julialang.org/t/finding-blas-lapack-in-binarybuilder/68321 "2021-09-17T10:21:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![circonflexe](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@circonflexe](https://discourse.julialang.org/u/circonflexe)\
**Post date:** [September 17, 2021, 10:21am UTC](https://discourse.julialang.org/t/finding-blas-lapack-in-binarybuilder/68321/1 "2021-09-17T10:21:10Z")

</div>

So I try to compile with `BinaryBuilder.jl` some binary artifacts which depend on BLAS (via `cmake`), which is included in Julia and thus should not cause an extra download. What is the right way to indicate this dependency to `BinaryBuilder`?

[Here is an old question on the same topic](https://discourse.julialang.org/t/lapack-and-blas-inside-binarybuilders-sandboxed-environment/15700) which was unhelpful: using `BuildDependency("OpenBLASBuilder")` caused `ERROR: LoadError: Invalid dependency specifications!` (which is quite unsurprising given that the last commit on that package is 3 years old).

---

<div class="post-metadata">

**Author:** ![tshort](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tshort/32/43_2.png) [@tshort](https://discourse.julialang.org/u/tshort)\
**Post date:** [September 17, 2021, 12:56pm UTC](https://discourse.julialang.org/t/finding-blas-lapack-in-binarybuilder/68321/2 "2021-09-17T12:56:43Z")

</div>

Try the one in Yggdrasil:

[https://github.com/JuliaPackaging/Yggdrasil/tree/master/O/OpenBLAS](https://github.com/JuliaPackaging/Yggdrasil/tree/master/O/OpenBLAS)

---

<div class="post-metadata">

**Author:** ![circonflexe](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@circonflexe](https://discourse.julialang.org/u/circonflexe)\
**Post date:** [September 17, 2021, 1:47pm UTC](https://discourse.julialang.org/t/finding-blas-lapack-in-binarybuilder/68321/3 "2021-09-17T13:47:08Z")

</div>

How would I use this? Adding a simple `BuildDependency("OpenBLAS")` produces an error (invalid dependency specification). The same happens when using the full URL `https://github.com/JuliaPackaging/Yggdrasil/tree/master/O/OpenBLAS`, and even adding a `.git` at the end changes nothing. (And neither `BinaryBuilder` nor Yggdrasil’s documentation is too clear about this…).

_Edit:_ Oh. `BuildDependency("OpenBLAS_jll")`.

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [September 18, 2021, 12:19am UTC](https://discourse.julialang.org/t/finding-blas-lapack-in-binarybuilder/68321/4 "2021-09-18T00:19:43Z")

</div>

It should be `OpenBLAS_jll`, not `OpenBLAS`

You probably want `Dependency`, not `BuildDependency`: [Building Packages · BinaryBuilder.jl](https://docs.binarybuilder.org/stable/building/#Binary-dependencies)

The easiest way to write build scripts is to follow a similar package, e.g., if you need 32-bit BLAS:  
[https://github.com/JuliaPackaging/Yggdrasil/blob/0520e94a6894420214e0273f568cd423e1546c11/C/Coin-OR/Ipopt/build\_tarballs.jl#L61](https://github.com/JuliaPackaging/Yggdrasil/blob/0520e94a6894420214e0273f568cd423e1546c11/C/Coin-OR/Ipopt/build_tarballs.jl#L61)
