Error in precompiling HarfBuzz_jll and gmsh_jll

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, but my version of Freetype2 is already updated :

>  [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)

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

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

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 ?

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), 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.

1 Like

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

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

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

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

      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

In the repository I mentioned in multiple places, GitHub - giordano/macos-compatibility-version, I explain this is visible only on macOS < 12, so that’s not very surprising :slightly_smiling_face: