# Error in precompiling HarfBuzz\_jll and gmsh\_jll

**URL:** <https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288>\
**Category:** New to Julia\
**Created:** [May 15, 2024, 8:17am UTC](https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288 "2024-05-15T08:17:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![VinceRob](https://avatars.discourse-cdn.com/v4/letter/v/3be4f8/32.png) [@VinceRob](https://discourse.julialang.org/u/VinceRob)\
**Post date:** [May 15, 2024, 8:17am UTC](https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288/1 "2024-05-15T08:17:06Z")

</div>

Hi  
first post here,  
I’m having trouble trying to precompile the following packages :  
HarfBuzz\_jll  
gmsh\_jll

My system is Mac OS 10.15.7 (unfortunately I can’t upgrade).  
I found [this related topic](https://discourse.julialang.org/t/error-in-precompiling-ffmpeg-and-cairo-and-cairomakie/102461), but my version of Freetype2 is already updated :

```julia
> [159f3aea] Cairo v1.0.5
> [7db386b5] DependencyWalker v0.1.2
> [442a2c76] FastGaussQuadrature v1.0.2
> [705231aa] Gmsh v0.3.1
> [36aa67b7] GrundmannMoeller v0.1.2
> [dc215faf] ReadVTK v0.2.0
> [f5de1e94] SimplexQuad v1.0.1
> [90137ffa] StaticArrays v1.9.3
> [64499a7a] WriteVTK v1.19.1
> [83423d85] Cairo_jll v1.18.0+1
> [d7e528f0] FreeType2_jll v2.13.1+0
> [d2c73de3] GR_jll v0.73.5+0
> [37e2e46d] LinearAlgebra
> [2f01184e] SparseArrays v1.10.0

```

I tried to uninstall / reinstall Cairo then uninstall / reinstall Julia with no success.

Here is the stack trace for HarfBuzz\_jll (I get the same reason for gmsh\_jll)

```julia
> ERROR: LoadError: InitError: could not load library "/Users/vincentrobert/.julia/artifacts/7fab8ce1ef26551ce7ce2bf915603f2df5aa0419/lib/libcairo.2.dylib"
> dlopen(/Users/vincentrobert/.julia/artifacts/7fab8ce1ef26551ce7ce2bf915603f2df5aa0419/lib/libcairo.2.dylib, 1): Library not loaded: @rpath/libpixman-1.0.dylib
> Referenced from: /Users/vincentrobert/.julia/artifacts/7fab8ce1ef26551ce7ce2bf915603f2df5aa0419/lib/libcairo.2.dylib
> Reason: Incompatible library version: libcairo.2.dylib requires version 43.0.0 or later, but libpixman-1.0.dylib provides version 0.0.0
> Stacktrace:
> [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
> @ Base.Libc.Libdl ./libdl.jl:117
> [2] dlopen(s::String, flags::UInt32)
> @ Base.Libc.Libdl ./libdl.jl:116
> [3] macro expansion
> @ ~/.julia/packages/JLLWrappers/pG9bm/src/products/library_generators.jl:63 [inlined]
> [4] __init__ ()
> @ Cairo_jll ~/.julia/packages/Cairo_jll/fCwop/src/wrappers/x86_64-apple-darwin.jl:17
> [5] run_module_init(mod::Module, i::Int64)
> @ Base ./loading.jl:1134
> [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
> @ Base ./loading.jl:1122
> [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
> @ Base ./loading.jl:1067
> [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
> @ Base ./loading.jl:1581
> [9] _require(pkg::Base.PkgId, env::String)
> @ Base ./loading.jl:1938
> [10] __require_prelocked(uuidkey::Base.PkgId, env::String)
> @ Base ./loading.jl:1812
> [11] #invoke_in_world#3
> @ ./essentials.jl:926 [inlined]
> [12] invoke_in_world
> @ ./essentials.jl:923 [inlined]
> [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
> @ Base ./loading.jl:1803
> [14] macro expansion
> @ ./loading.jl:1790 [inlined]
> [15] macro expansion
> @ ./lock.jl:267 [inlined]
> [16] __require(into::Module, mod::Symbol)
> @ Base ./loading.jl:1753
> [17] #invoke_in_world#3
> @ ./essentials.jl:926 [inlined]
> [18] invoke_in_world
> @ ./essentials.jl:923 [inlined]
> [19] require(into::Module, mod::Symbol)
> @ Base ./loading.jl:1746
> [20] include(mod::Module, _path::String)
> @ Base ./Base.jl:495
> [21] top-level scope
> @ ~/.julia/packages/JLLWrappers/pG9bm/src/toplevel_generators.jl:192
> [22] include
> @ ./Base.jl:495 [inlined]
> [23] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
> @ Base ./loading.jl:2222
> [24] top-level scope
> @ stdin:3
> during initialization of module Cairo_jll
> in expression starting at /Users/vincentrobert/.julia/packages/HarfBuzz_jll/zavaV/src/wrappers/x86_64-apple-darwin.jl:4
> in expression starting at /Users/vincentrobert/.julia/packages/HarfBuzz_jll/zavaV/src/HarfBuzz_jll.jl:2
> in expression starting at stdin:3
> ✗ HarfBuzz_jll
> 0 dependencies successfully precompiled in 3 seconds. 33 already precompiled.

```

Any help would be greatly appreciated, thanks in advance.

---

<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:** [May 15, 2024, 10:56am UTC](https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288/2 "2024-05-15T10:56:58Z")

</div>

> <https://github.com/JuliaFEM/Gmsh.jl/issues/33>
>
> Hi, 
> on MacOS11/Intel we have some problem to get Gmsh running. There seems to …be some compatibility problem with libcairo. 
> 
> Things worked a while ago but now we get this:
> 
> https://github.com/j-fu/ExtendableGrids.jl/actions/runs/8983170213/job/24672339546?pr=45#step:6:465
> 
> Github actions with MacOS13 are ok.
> 
> This seems to be a problem similar to 
> 
> https://github.com/JuliaGraphics/Cairo.jl/issues/362

I haven’t had the time to go through the other related packages

> My system is Mac OS 10.15.7 (unfortunately I can’t upgrade).

Unfortunately this problem arises _only_ with macOS \< 12: [GitHub - giordano/macos-compatibility-version](https://github.com/giordano/macos-compatibility-version)

---

<div class="post-metadata">

**Author:** ![VinceRob](https://avatars.discourse-cdn.com/v4/letter/v/3be4f8/32.png) [@VinceRob](https://discourse.julialang.org/u/VinceRob)\
**Post date:** [May 15, 2024, 12:27pm UTC](https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288/3 "2024-05-15T12:27:00Z")

</div>

Thank you very much for your reply @giordano !  
Thanks to the link you provided I understand this is related to my OS, but I’m not sure to understand wether there is anything I can do to fix this ? Should I try to rebuild Cairo with a compatbility flag ?

---

<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:** [May 15, 2024, 1:03pm UTC](https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288/4 "2024-05-15T13:03:35Z")

</div>

Try to update your packages, you should see `Cairo_jll` being upgraded to `v1.18.0+2` (from [[Cairo] Rebuild fixing compat with Pixman by giordano · Pull Request #8677 · JuliaPackaging/Yggdrasil · GitHub](https://github.com/JuliaPackaging/Yggdrasil/pull/8677)), which should fix the compatibility issue with `libpixman`. I can’t test myself to see if there are more problems, as I don’t have ready access to an old macOS system.

---

<div class="post-metadata">

**Author:** ![VinceRob](https://avatars.discourse-cdn.com/v4/letter/v/3be4f8/32.png) [@VinceRob](https://discourse.julialang.org/u/VinceRob)\
**Post date:** [May 15, 2024, 1:41pm UTC](https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288/5 "2024-05-15T13:41:39Z")

</div>

I updated and then could precompile the problematic packages,  
so everything is working perfectly now 🙂

Thank you very much for your help and reactivity @giordano,  
all apologizes for this legacy related issue.

---

<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:** [May 15, 2024, 1:43pm UTC](https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288/6 "2024-05-15T13:43:33Z")

</div>

No worries, it’s good to support as many systems as possible 🙂

---

<div class="post-metadata">

**Author:** ![j-fu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j-fu/32/11373_2.png) [@j-fu](https://discourse.julialang.org/u/j-fu)\
**Post date:** [May 15, 2024, 6:38pm UTC](https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288/7 "2024-05-15T18:38:03Z")

</div>

FYI, I figured out that it is possible to test on MacOS11 on github CI:

```julia
      matrix:
        version:
          - '1.6' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
          - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
          - 'nightly'
        os:
          - ubuntu-latest
          - windows-latest
          - macOS-11 # intel
          - macOS-13 # intel
          - macOS-14 # arm
        arch:
          - x64
          - aarch64
        exclude:
          - os: ubuntu-latest
            arch: aarch64
          - os: windows-latest
            arch: aarch64
          - os: macOS-11
            arch: aarch64
          - os: macOS-13
            arch: aarch64
          - os: macOS-14
            version: 1.6
          - os: macOS-14
            arch: x64

```

---

<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:** [May 15, 2024, 6:46pm UTC](https://discourse.julialang.org/t/error-in-precompiling-harfbuzz-jll-and-gmsh-jll/114288/8 "2024-05-15T18:46:31Z")

</div>

> [@j-fu](#):
>
> FYI, I figured out that it is possible to test on MacOS11 on github CI:

In the repository I mentioned in multiple places, [GitHub - giordano/macos-compatibility-version](https://github.com/giordano/macos-compatibility-version), I explain this is visible only on macOS \< 12, so that’s not very surprising 🙂
