# Failing to precompile Plots due to LoadError (Mac edition)

**URL:** <https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911>\
**Category:** New to Julia\
**Created:** [September 28, 2022, 9:44am UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911 "2022-09-28T09:44:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffzwe](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@jeffzwe](https://discourse.julialang.org/u/jeffzwe)\
**Post date:** [September 28, 2022, 9:44am UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/1 "2022-09-28T09:44:45Z")

</div>

Hi! I’m trying to set up julia on my older Intel Macbook running macOS High Sierra (10.13.6).

My julia version is:

```julia
Julia Version 1.8.1
Commit afb6c60d69a (2022-09-06 15:09 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin21.4.0)
  CPU: 4 × Intel(R) Core(TM) i5-2435M CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, sandybridge)
  Threads: 1 on 4 virtual cores

```

I downloaded it using the standard .dmg package on the julia website.

The error I’m getting when trying to precomplie Plots is the following:

```julia
Precompiling project...
  ✗ FFMPEG
  ✗ GR_jll
  ✗ Plots
  0 dependencies successfully precompiled in 14 seconds. 128 already precompiled.

ERROR: The following 2 direct dependencies failed to precompile:

FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a]

Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to /Users/jeffreyzweidler/.julia/compiled/v1.8/FFMPEG/jl_ulJBr6.
ERROR: LoadError: InitError: could not load library "/Users/jeffreyzweidler/.julia/artifacts/c759795325eba6523fb1157b582551d4250575e1/lib/libavdevice.58.13.100.dylib"
dlopen(/Users/jeffreyzweidler/.julia/artifacts/c759795325eba6523fb1157b582551d4250575e1/lib/libavdevice.58.13.100.dylib, 1): image not found
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/QpMQW/src/products/library_generators.jl:54 [inlined]
  [4] __init__ ()
    @ FFMPEG_jll ~/.julia/packages/FFMPEG_jll/9kTcb/src/wrappers/x86_64-apple-darwin.jl:38
  [5] _include_from_serialized(pkg::Base.PkgId, path::String, depmods::Vector{Any})
    @ Base ./loading.jl:831
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt64)
    @ Base ./loading.jl:1039
  [7] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1315
  [8] _require_prelocked(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1200
  [9] macro expansion
    @ ./loading.jl:1180 [inlined]
 [10] macro expansion
    @ ./lock.jl:223 [inlined]
 [11] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1144
 [12] include
    @ ./Base.jl:419 [inlined]
 [13] 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, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1554
 [14] top-level scope
    @ stdin:1
during initialization of module FFMPEG_jll
in expression starting at /Users/jeffreyzweidler/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:1
in expression starting at stdin:1

Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]

Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /Users/jeffreyzweidler/.julia/compiled/v1.8/Plots/jl_bcbfO1.
ERROR: LoadError: InitError: could not load library "/Users/jeffreyzweidler/.julia/artifacts/c759795325eba6523fb1157b582551d4250575e1/lib/libavdevice.58.13.100.dylib"
dlopen(/Users/jeffreyzweidler/.julia/artifacts/c759795325eba6523fb1157b582551d4250575e1/lib/libavdevice.58.13.100.dylib, 1): image not found
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/QpMQW/src/products/library_generators.jl:54 [inlined]
  [4] __init__ ()
    @ FFMPEG_jll ~/.julia/packages/FFMPEG_jll/9kTcb/src/wrappers/x86_64-apple-darwin.jl:38
  [5] _include_from_serialized(pkg::Base.PkgId, path::String, depmods::Vector{Any})
    @ Base ./loading.jl:831
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt64)
    @ Base ./loading.jl:1039
  [7] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1315
  [8] _require_prelocked(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1200
  [9] macro expansion
    @ ./loading.jl:1180 [inlined]
 [10] macro expansion
    @ ./lock.jl:223 [inlined]
 [11] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1144
 [12] include
    @ ./Base.jl:419 [inlined]
 [13] 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, UInt64}}, source::String)
    @ Base ./loading.jl:1554
 [14] top-level scope
    @ stdin:1
during initialization of module FFMPEG_jll
in expression starting at /Users/jeffreyzweidler/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to /Users/jeffreyzweidler/.julia/compiled/v1.8/FFMPEG/jl_EWet86.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:1705
  [3] compilecache
    @ ./loading.jl:1649 [inlined]
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1337
  [5] _require_prelocked(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1200
  [6] macro expansion
    @ ./loading.jl:1180 [inlined]
  [7] macro expansion
    @ ./lock.jl:223 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1144
  [9] include(mod::Module, _path::String)
    @ Base ./Base.jl:419
 [10] include(x::String)
    @ Plots ~/.julia/packages/Plots/nbICw/src/Plots.jl:1
 [11] top-level scope
    @ ~/.julia/packages/Plots/nbICw/src/Plots.jl:181
 [12] include
    @ ./Base.jl:419 [inlined]
 [13] 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, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1554
 [14] top-level scope
    @ stdin:1
in expression starting at /Users/jeffreyzweidler/.julia/packages/Plots/nbICw/src/animation.jl:1
in expression starting at /Users/jeffreyzweidler/.julia/packages/Plots/nbICw/src/Plots.jl:1
in expression starting at stdin:1

Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Types.jl:67
 [2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{String}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1427
 [3] precompile
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1058 [inlined]
 [4] #precompile#224
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1056 [inlined]
 [5] precompile
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1056 [inlined]
 [6] #precompile#223
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1055 [inlined]
 [7] precompile(pkg::String)
   @ Pkg.API /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1055
 [8] top-level scope
   @ REPL[2]:1

```

Any ideas?

Thank you for the help!

---

<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:** [September 28, 2022, 10:13am UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/2 "2022-09-28T10:13:15Z")

</div>

Unfortunately that’s a very unhelpful error message coming from your operating system (julia has no control whatsoever over that). I’d note that macOS 12 provides more descriptive error messages when you aren’t able to load a shared library, but older versions are very economic with details.

> [@jeffzwe](#):
>
> Any ideas?

I’d have suggested to do something like

> [@Failing to precompile Plots due to LoadError](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror/77232/6):
>
> Try this: ]add https://github.com/giordano/DependencyWalker.jl using Plots # this will result in an error, it's ok using DependencyWalker Library(raw"C:\Users\frpa8185\.julia\artifacts\ecb81e6429c089c1da802644fae337754832d534\bin\avcodec-58.dll") The last command should show which library can’t be found.

using

```julia
Library("/Users/jeffreyzweidler/.julia/artifacts/c759795325eba6523fb1157b582551d4250575e1/lib/libavdevice.58.13.100.dylib")

```

as last line, but honestly I never used `DependencyWalker` on macOS and I don’t know if it’ll work (especially with frameworks involved). You can give it a try, but don’t expect too much. _ **NOTE** _: to be absolutely crystal clear, since this is a somewhat common misconception, `DependencyWalker` is a _ **debugging tool** _, it _may_ be able to tell you what’s the missing library, it will _ **not** _ solve any issue.

If `DependencyWalker` doesn’t help, you’ll have to start julia with `dtrace`, try to run `using Plots` and have a look at `dtrace` output to see what library can’t be found.

Again, there is is relatively little we can do about this, it’s your operating system that is withholding information from you.

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [September 28, 2022, 11:03am UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/3 "2022-09-28T11:03:35Z")

</div>

We have a similar message appearing in `Plots` `CI` related to `FFmpeg` on `macOS` (although a different lib is involved):

```julia
dyld: Library not loaded: @rpath/libpcre.1.dylib
  Referenced from: /Users/runner/.julia/artifacts/c759795325eba6523fb1157b582551d4250575e1/bin/ffmpeg
  Reason: image not found
Circle plot: Error During Test at /Users/runner/work/Plots.jl/Plots.jl/test/test_animations.jl:28
  Test threw exception
  Expression: filesize((gif(anim, show_msg = false)).filename) > 10000
  failed process: Process(`/Users/runner/.julia/artifacts/c759795325eba6523fb1157b582551d4250575e1/bin/ffmpeg -v 16 -i /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/jl_UcyqyC/%06d.png -vf palettegen=stats_mode=full -y /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/jl_UcyqyC/palette.bmp`, ProcessSignaled(6)) [0]
  
  Stacktrace:
    [1] pipeline_error
      @ ./process.jl:538 [inlined]
    [2] run(::Cmd; wait::Bool)
      @ Base ./process.jl:453
    [3] run
      @ ./process.jl:451 [inlined]
    [4] (::FFMPEG.var"#4#6"{Cmd})(command_path::String)
      @ FFMPEG ~/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:112
    [5] (::JLLWrappers.var"#2#3"{FFMPEG.var"#4#6"{Cmd}, String})()
      @ JLLWrappers ~/.julia/packages/JLLWrappers/QpMQW/src/runtime.jl:49
    [6] withenv(::JLLWrappers.var"#2#3"{FFMPEG.var"#4#6"{Cmd}, String}, ::Pair{String, String}, ::Vararg{Pair{String, String}, N} where N)
      @ Base ./env.jl:161
    [7] withenv_executable_wrapper(f::Function, executable_path::String, PATH::String, LIBPATH::String, adjust_PATH::Bool, adjust_LIBPATH::Bool)
      @ JLLWrappers ~/.julia/packages/JLLWrappers/QpMQW/src/runtime.jl:48
    [8] #invokelatest#2
      @ ./essentials.jl:708 [inlined]
    [9] invokelatest
      @ ./essentials.jl:706 [inlined]
   [10] #ffmpeg#3
      @ ~/.julia/packages/JLLWrappers/QpMQW/src/products/executable_generators.jl:21 [inlined]
   [11] ffmpeg
      @ ~/.julia/packages/JLLWrappers/QpMQW/src/products/executable_generators.jl:21 [inlined]
   [12] #exe#2
      @ ~/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:111 [inlined]
   [13] ffmpeg_exe
      @ ~/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:123 [inlined]
   [14] buildanimation(anim::Animation, fn::String, is_animated_gif::Bool; fps::Int64, loop::Int64, variable_palette::Bool, verbose::Bool, show_msg::Bool)
      @ Plots ~/work/Plots.jl/Plots.jl/src/animation.jl:120
   [15] #gif#240
      @ ~/work/Plots.jl/Plots.jl/src/animation.jl:67 [inlined]
   [16] macro expansion
      @ ~/work/Plots.jl/Plots.jl/test/test_animations.jl:28 [inlined]
   [17] macro expansion
      @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1151 [inlined]
   [18] top-level scope
      @ ~/work/Plots.jl/Plots.jl/test/test_animations.jl:20
dyld: Library not loaded: @rpath/libpcre.1.dylib
  Referenced from: /Users/runner/.julia/artifacts/c759795325eba6523fb1157b582551d4250575e1/bin/ffmpeg
  Reason: image not found
Circle plot: Error During Test at /Users/runner/work/Plots.jl/Plots.jl/test/test_animations.jl:29
  Test threw exception
  Expression: filesize((mov(anim, show_msg = false)).filename) > 10000
  failed process: Process(`/Users/runner/.julia/artifacts/c759795325eba6523fb1157b582551d4250575e1/bin/ffmpeg -v 16 -framerate 20 -i /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/jl_UcyqyC/%06d.png -vf format=yuv420p -loop 0 -y /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/jl_eZBUn4.mov`, ProcessSignaled(6)) [0]

```

The failing job logs (4h ago) are [here](https://github.com/JuliaPlots/Plots.jl/actions/runs/3141440502/jobs/5105742651).

`CI` was running fine 20h ago [see here](https://github.com/JuliaPlots/Plots.jl/actions/runs/3136837202/jobs/5094245833).

Weird, manifests are identical.

---

<div class="post-metadata">

**Author:** ![jeffzwe](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@jeffzwe](https://discourse.julialang.org/u/jeffzwe)\
**Post date:** [September 28, 2022, 11:09am UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/4 "2022-09-28T11:09:40Z")

</div>

Apparently I don’t have the file

```julia
libavdevice.58.13.100.dylib

```

And therefore it also cannot be found… I’ve tried reinstalling the packages and also julia itself but this one keeps missing…

---

<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:** [September 28, 2022, 11:16am UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/5 "2022-09-28T11:16:25Z")

</div>

> [@jeffzwe](#):
>
> Apparently I don’t have the file
> 
> `libavdevice.58.13.100.dylib`

Oh, well, that’s a different error. Delete the directory `/Users/runner/.julia/artifacts/c759795325eba6523fb1157b582551d4250575e1` and try to reuse `Plots`. Uninstalling the package won’t actually remove it from disk until it’s garbage collected.

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [September 28, 2022, 11:54am UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/6 "2022-09-28T11:54:03Z")

</div>

Xref [[BUG] ERROR: LoadError: InitError: could not load library "libavdevice.58.13.100.dylib" when precompiling `Plots.jl` on macOS · Issue #4390 · JuliaPlots/Plots.jl · GitHub](https://github.com/JuliaPlots/Plots.jl/issues/4390).

~~@jeffzwe, what is the `Plots` version ?~~

---

<div class="post-metadata">

**Author:** ![jeffzwe](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@jeffzwe](https://discourse.julialang.org/u/jeffzwe)\
**Post date:** [September 28, 2022, 2:09pm UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/7 "2022-09-28T14:09:43Z")

</div>

Okay so I’ve resolved the issue with FFMPEG and got it to precompile.  
But now I’m running into issues with GR\_jll and I’m getting identical error messages as this [thread](https://github.com/jheinen/GR.jl/issues/384). Sadly this issue hasnt been resolved in the thread.

Below the new error message:

```julia
Precompiling project...
  ✗ GR_jll
  ✗ Plots
  0 dependencies successfully precompiled in 15 seconds. 129 already precompiled.

ERROR: The following 2 direct dependencies failed to precompile:

GR_jll [d2c73de3-f751-5644-a686-071e5b155ba9]

Failed to precompile GR_jll [d2c73de3-f751-5644-a686-071e5b155ba9] to /Users/jeffreyzweidler/.julia/compiled/v1.8/GR_jll/jl_DEV4VQ.
ERROR: LoadError: InitError: could not load library "/Users/jeffreyzweidler/.julia/artifacts/a0db4e704fd0da4298744f012883535d351fa170/lib/QtConcurrent.framework/Versions/5/QtConcurrent"
dlopen(/Users/jeffreyzweidler/.julia/artifacts/a0db4e704fd0da4298744f012883535d351fa170/lib/QtConcurrent.framework/Versions/5/QtConcurrent.dylib, 1): image not found
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/QpMQW/src/products/library_generators.jl:54 [inlined]
  [4] __init__ ()
    @ Qt5Base_jll ~/.julia/packages/Qt5Base_jll/lpIK6/src/wrappers/x86_64-apple-darwin.jl:31
  [5] _include_from_serialized(pkg::Base.PkgId, path::String, depmods::Vector{Any})
    @ Base ./loading.jl:831
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt64)
    @ Base ./loading.jl:1039
  [7] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1315
  [8] _require_prelocked(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1200
  [9] macro expansion
    @ ./loading.jl:1180 [inlined]
 [10] macro expansion
    @ ./lock.jl:223 [inlined]
 [11] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1144
 [12] include(mod::Module, _path::String)
    @ Base ./Base.jl:419
 [13] top-level scope
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
 [14] include
    @ ./Base.jl:419 [inlined]
 [15] 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, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1554
 [16] top-level scope
    @ stdin:1
during initialization of module Qt5Base_jll
in expression starting at /Users/jeffreyzweidler/.julia/packages/GR_jll/48Bah/src/wrappers/x86_64-apple-darwin.jl:13
in expression starting at /Users/jeffreyzweidler/.julia/packages/GR_jll/48Bah/src/GR_jll.jl:2
in expression starting at stdin:1

Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]

Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /Users/jeffreyzweidler/.julia/compiled/v1.8/Plots/jl_OscVxV.
ERROR: LoadError: InitError: UndefVarError: GR_jll not defined
Stacktrace:
  [1] __init__ ()
    @ GR.GRPreferences ~/.julia/packages/GR/7hwqD/src/preferences.jl:40
  [2] _include_from_serialized(pkg::Base.PkgId, path::String, depmods::Vector{Any})
    @ Base ./loading.jl:831
  [3] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt64)
    @ Base ./loading.jl:1039
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1315
  [5] _require_prelocked(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1200
  [6] macro expansion
    @ ./loading.jl:1180 [inlined]
  [7] macro expansion
    @ ./lock.jl:223 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1144
  [9] include(mod::Module, _path::String)
    @ Base ./Base.jl:419
 [10] include(x::String)
    @ Plots ~/.julia/packages/Plots/nbICw/src/Plots.jl:1
 [11] top-level scope
    @ ~/.julia/packages/Plots/nbICw/src/Plots.jl:200
 [12] include
    @ ./Base.jl:419 [inlined]
 [13] 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, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1554
 [14] top-level scope
    @ stdin:1
during initialization of module GRPreferences
in expression starting at /Users/jeffreyzweidler/.julia/packages/Plots/nbICw/src/backends/gr.jl:3
in expression starting at /Users/jeffreyzweidler/.julia/packages/Plots/nbICw/src/Plots.jl:1
in expression starting at stdin:1

Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Types.jl:67
 [2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{String}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1427
 [3] precompile
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1058 [inlined]
 [4] #precompile#224
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1056 [inlined]
 [5] precompile
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1056 [inlined]
 [6] #precompile#223
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1055 [inlined]
 [7] precompile(pkg::String)
   @ Pkg.API /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1055
 [8] top-level scope
   @ REPL[8]:1

```

---

<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:** [September 28, 2022, 2:20pm UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/8 "2022-09-28T14:20:45Z")

</div>

I presume you made sure you have the file `/Users/jeffreyzweidler/.julia/artifacts/a0db4e704fd0da4298744f012883535d351fa170/lib/QtConcurrent.framework/Versions/5/QtConcurrent.dylib` in place?

---

<div class="post-metadata">

**Author:** ![jeffzwe](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@jeffzwe](https://discourse.julialang.org/u/jeffzwe)\
**Post date:** [September 28, 2022, 2:25pm UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/9 "2022-09-28T14:25:54Z")

</div>

Well I have an executable in place called QtConcurrent but no file called QtConcurrent.dylib … But no matter if I delete the folder `a0db4e704fd0da4298744f012883535d351fa170` and reinstall it the file does not appear…

---

<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:** [September 28, 2022, 2:29pm UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/10 "2022-09-28T14:29:41Z")

</div>

@barche any idea how this is supposed to work?

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [September 28, 2022, 2:35pm UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/11 "2022-09-28T14:35:17Z")

</div>

@jeffzwe , can you please provide `Plots`, `GR`, and `GR_jll` versions (`pkg> status -m`).

Also, if you could try downgrading to `Plots@1.34.2`, and try again.

---

<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:** [September 28, 2022, 2:46pm UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/12 "2022-09-28T14:46:55Z")

</div>

Wait, I think I have the answer to that: judging by

> <https://github.com/JuliaPackaging/Yggdrasil/blob/9a52b5c4b8b111e0a842820067eecc4830d12174/Q/Qt5Base/build_tarballs.jl#L12-L13>

> <https://github.com/JuliaPackaging/Yggdrasil/blob/9a52b5c4b8b111e0a842820067eecc4830d12174/Q/Qt5Base/build_tarballs.jl#L99>

it appears Qt5 requires macOS 10.14, and you have 10.13. @barche is that correct?

---

<div class="post-metadata">

**Author:** ![jeffzwe](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@jeffzwe](https://discourse.julialang.org/u/jeffzwe)\
**Post date:** [September 28, 2022, 2:49pm UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/13 "2022-09-28T14:49:25Z")

</div>

Okay so I’ve installed Plots version 1.34.2 and I’m still getting the same errors…  
Plots v1.34.2  
GR v0.68.0  
GR\_jll v0.69.1+0

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [September 28, 2022, 3:13pm UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/14 "2022-09-28T15:13:12Z")

</div>

Thanks, so we can exclude the GR `0.68 -> 0.69` transition, for which we have issues on `windows`.

---

<div class="post-metadata">

**Author:** ![jerlich](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jerlich/32/5205_2.png) [@jerlich](https://discourse.julialang.org/u/jerlich)\
**Post date:** [September 28, 2022, 4:27pm UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/15 "2022-09-28T16:27:50Z")

</div>

```julia
Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /Users/jerlich/.julia/compiled/v1.7/Plots/jl_g6x4AL.
ERROR: LoadError: InitError: could not load library "/Users/jerlich/.julia/artifacts/bbf5a1c0cc76192bd47b16e617f82a215f885d84/lib/libgio-2.0.0.dylib"
dlopen(/Users/jerlich/.julia/artifacts/bbf5a1c0cc76192bd47b16e617f82a215f885d84/lib/libgio-2.0.0.dylib, 1): Library not loaded: @rpath/libpcre2-8.0.dylib
  Referenced from: /Users/jerlich/.julia/artifacts/bbf5a1c0cc76192bd47b16e617f82a215f885d84/lib/libglib-2.0.0.dylib
  Reason: Incompatible library version: libglib-2.0.0.dylib requires version 12.0.0 or later, but libpcre2-8.dylib provides version 11.0.0
Stacktrace:

```

---

<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:** [September 28, 2022, 10:57pm UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/16 "2022-09-28T22:57:09Z")

</div>

As mentioned in Slack (and in the pub) that’s a _different_ error than what is being reported here, which [I believe](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/12) is due to @jeffzwe using an old version of macOS. Your problem should have been fixed by [[FFMPEG] Set compat of PCRE2 by giordano · Pull Request #5594 · JuliaPackaging/Yggdrasil · GitHub](https://github.com/JuliaPackaging/Yggdrasil/pull/5594) and [[Glib] Fix compat of PCRE2 by giordano · Pull Request #5595 · JuliaPackaging/Yggdrasil · GitHub](https://github.com/JuliaPackaging/Yggdrasil/pull/5595).

---

<div class="post-metadata">

**Author:** ![jeffzwe](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@jeffzwe](https://discourse.julialang.org/u/jeffzwe)\
**Post date:** [September 29, 2022, 7:04am UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/17 "2022-09-29T07:04:23Z")

</div>

Okay so I take we concluded on my version of macOS being too old. Is that correct?

In that case just wanted to say thank you for your time and effort! 😃

---

<div class="post-metadata">

**Author:** ![barche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barche/32/79_2.png) [@barche](https://discourse.julialang.org/u/barche)\
**Post date:** [September 29, 2022, 7:07am UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/18 "2022-09-29T07:07:29Z")

</div>

> [@giordano](#):
>
> it appears Qt5 requires macOS 10.14, and you have 10.13. @barche is that correct?

Yes, this is correct and more strict than needed because of cross-compilation (see [PR comment here](https://github.com/JuliaPackaging/Yggdrasil/pull/5598#issuecomment-1261824598)). I can’t test because I don’t have an older macOS, but one workaround at the end-user level could be to install the official Qt and then point to it using an Overrides.toml. This is my `~/.julia/artifacts/Overrides.toml` for Qt5 installed through homebrew:

```toml
[ea2cea3b-5b76-57ae-a6ef-0a8af62496e1]
Qt5Base = "/usr/local/opt/qt5"

[c6373c32-5b88-5913-90f5-31d7686b42da]
Qt5Declarative = "/usr/local/opt/qt5"

[3af4ccab-a251-578e-a514-ea85a0ba79ee]
Qt5Svg = "/usr/local/opt/qt5"

[e4aecf45-a397-53cc-864f-87db395e0248]
Qt5QuickControls = "/usr/local/opt/qt5"

[bf3ac11c-603e-589e-b4b7-e696ac65aa4a]
Qt5QuickControls2 = "/usr/local/opt/qt5"

```

---

<div class="post-metadata">

**Author:** ![yoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yoshi/32/38259_2.png) [@yoshi](https://discourse.julialang.org/u/yoshi)\
**Post date:** [February 1, 2023, 7:29pm UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/19 "2023-02-01T19:29:23Z")

</div>

I’m receiving this error as well. I’m new to Julia and am having a little trouble understanding what to do to creating a work around.

---

<div class="post-metadata">

**Author:** ![barche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barche/32/79_2.png) [@barche](https://discourse.julialang.org/u/barche)\
**Post date:** [February 1, 2023, 10:01pm UTC](https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/20 "2023-02-01T22:01:17Z")

</div>

On what version of macOS is this? Normally the latest Qt5 JLLs have been recompiled with the least strict requirement for Qt5.
