Is Pkg's dependency resolution order-dependent?

Here is an example where Pkg.adding first Cairo, then ImageView fails, whereas adding ImageView first works flawlessly.

  • Is it expected that the dependency resolution depends on the order in which packages are added?
  • In this specific case, is Pkg unable to detect that downgrading Cairo to an earlier version allows satisfying all dependency requirements, or is there some rule preventing Pkg from downgrading Cairo once it’s installed?


Steps to reproduce:

# Start with a fresh depot
shell> rm -rf /tmp/julia_depot
shell> mkdir /tmp/julia_depot
shell> export JULIA_DEPOT_PATH=/tmp/julia_depot

# Start with a new project
shell> rm -rf /tmp/project
shell> mkdir /tmp/project
shell> cd /tmp/project

shell> julia -q
(v1.2) pkg> activate .
Activating new environment at `/tmp/project/Project.toml`

(project) pkg> add Cairo
   Cloning default registries into `/tmp/julia_depot`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
     Added registry `General` to `/tmp/julia_depot/registries/General`
 Resolving package versions...
 Installed Cairo ───────────── v0.8.0
 [...]

(project) pkg> add ImageView
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Gtk [4c0ca9eb]:
 Gtk [4c0ca9eb] log:
 ├─possible versions are: [0.16.0-0.16.5, 0.17.0, 0.18.0] or uninstalled
 ├─restricted by compatibility requirements with Cairo [159f3aea] to versions: uninstalled
 │ └─Cairo [159f3aea] log:
 │   ├─possible versions are: [0.5.3-0.5.6, 0.6.0, 0.7.0, 0.8.0] or uninstalled
 │   └─restricted to versions 0.8.0 by an explicit requirement, leaving only versions 0.8.0
 └─restricted by compatibility requirements with ImageView [86fae568] to versions: [0.16.0-0.16.5, 0.17.0, 0.18.0] — no versions left
   └─ImageView [86fae568] log:
     ├─possible versions are: [0.8.0-0.8.2, 0.9.0] or uninstalled
     ├─restricted to versions * by an explicit requirement, leaving only versions [0.8.0-0.8.2, 0.9.0]
     └─restricted by compatibility requirements with Cairo [159f3aea] to versions: 0.9.0 or uninstalled, leaving only versions: 0.9.0
       └─Cairo [159f3aea] log: see above

whereas:

# Start with a fresh depot
shell> rm -rf /tmp/julia_depot
shell> mkdir /tmp/julia_depot
shell> export JULIA_DEPOT_PATH=/tmp/julia_depot

# Start with a fresh project
shell> rm -rf /tmp/project
shell> mkdir /tmp/project
shell> cd /tmp/project

shell> julia -q
(v1.2) pkg> activate .
Activating new environment at `/tmp/project/Project.toml`

(project) pkg> add ImageView
   Cloning default registries into `/tmp/julia_depot`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
     Added registry `General` to `/tmp/julia_depot/registries/General`
 Resolving package versions...
 Installed ImageView ───────────────── v0.9.0
 Installed Cairo ───────────────────── v0.6.0
 [...]

(project) pkg> add Cairo
 Resolving package versions...
  Updating `/tmp/project/Project.toml`
  [159f3aea] + Cairo v0.6.0
  Updating `/tmp/project/Manifest.toml`
 [no changes]
1 Like

The answer to the question of order dependency is yes, it matters. The reason is that Pkg doesn’t want to change the version of installed packages on add.

However, this was determined to be quite confusing so in 1.4 there is a different strategy in place which should reduce the number of resolver errors by allowing current installed versions to change on add if they need to.

6 Likes

Thanks!

Just ran into this with Julia 1.10-beta1.

Installing CairoMakie from scratch

Note how I literally rm -rf .julia/ and install Julia 1.10.0-beta1+0.x64.apple.darwin14 from scratch!

~ $ rm -rf .julia/
~ $ juliaup add beta && julia +beta
Installing Julia 1.10.0-beta1+0.x64.apple.darwin14
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.0-beta1 (2023-07-25)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.10) pkg> add CairoMakie
  Installing known registries into `~/.julia`
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
   Installed ImageIO ───────────────────── v0.6.7
   Installed JpegTurbo_jll ─────────────── v2.1.91+0
   Installed libfdk_aac_jll ────────────── v2.0.2+0
   Installed Calculus ──────────────────── v0.5.1
   Installed AxisArrays ────────────────── v0.4.7
   Installed x265_jll ──────────────────── v3.5.0+0
   Installed OffsetArrays ──────────────── v1.12.10
   Installed TiffImages ────────────────── v0.6.4
   Installed JpegTurbo ─────────────────── v0.1.3
   Installed Libmount_jll ──────────────── v2.35.0+0
   Installed HypergeometricFunctions ───── v0.3.23
   Installed FFTW ──────────────────────── v1.7.1
   Installed Permutations ──────────────── v0.4.16
   Installed Preferences ───────────────── v1.4.0
   Installed StatsFuns ─────────────────── v1.3.0
   Installed PNGFiles ──────────────────── v0.4.0
   Installed Multisets ─────────────────── v0.4.4
   Installed Opus_jll ──────────────────── v1.3.2+0
   Installed StableHashTraits ──────────── v0.3.1
   Installed Sixel ─────────────────────── v0.1.3
   Installed RelocatableFolders ────────── v1.0.0
   Installed PDMats ────────────────────── v0.11.17
   Installed EarCut_jll ────────────────── v2.2.4+0
   Installed Contour ───────────────────── v0.6.2
   Installed Grisu ─────────────────────── v1.0.2
   Installed StaticArrays ──────────────── v1.6.2
   Installed ProgressMeter ─────────────── v1.7.2
   Installed SetRounding ───────────────── v0.2.1
   Installed OpenEXR ───────────────────── v0.3.2
   Installed Formatting ────────────────── v0.4.2
   Installed Xorg_libpthread_stubs_jll ─── v0.1.1+0
   Installed PlotUtils ─────────────────── v1.3.5
   Installed Fontconfig_jll ────────────── v2.13.93+0
   Installed Cairo_jll ─────────────────── v1.16.1+1
   Installed CEnum ─────────────────────── v0.4.2
   Installed EnumX ─────────────────────── v1.0.4
   Installed FileIO ────────────────────── v1.16.1
   Installed Libgpg_error_jll ──────────── v1.42.0+0
   Installed Mods ──────────────────────── v1.3.3
   Installed SignedDistanceFields ──────── v0.4.0
   Installed IntelOpenMP_jll ───────────── v2023.1.0+0
   Installed Polynomials ───────────────── v3.2.13
   Installed Netpbm ────────────────────── v1.1.1
   Installed FastRounding ──────────────── v0.3.1
   Installed Xorg_libXau_jll ───────────── v1.0.11+0
   Installed ColorSchemes ──────────────── v3.22.0
   Installed RoundingEmulator ──────────── v0.2.1
   Installed FFMPEG ────────────────────── v0.4.1
   Installed SIMD ──────────────────────── v3.4.5
...
   Installed Colors ────────────────────── v0.12.10
   Installed FreeType ──────────────────── v4.0.0
   Installed MappedArrays ──────────────── v0.4.2
   Installed DataStructures ────────────── v0.18.14
   Installed FreeType2_jll ─────────────── v2.10.4+0
   Installed CommonSubexpressions ──────── v0.3.0
...
   Installed Match ─────────────────────── v1.2.0
   Installed Xorg_libXext_jll ──────────── v1.3.4+4
   Installed DiffRules ─────────────────── v1.15.1
   Installed TensorCore ────────────────── v0.1.1
   Installed FreeTypeAbstraction ───────── v0.10.0
   Installed TableTraits ───────────────── v1.0.1
...
   Installed IterTools ─────────────────── v1.8.0
   Installed Cairo ─────────────────────── v1.0.5
   Installed FFMPEG_jll ────────────────── v4.4.4+0
   Installed GeometryBasics ────────────── v0.4.9
   Installed Libgcrypt_jll ─────────────── v1.8.7+0
   Installed Tables ────────────────────── v1.10.1
   Installed MakieCore ─────────────────── v0.6.4
   Installed LLVMOpenMP_jll ────────────── v15.0.4+0
   Installed CairoMakie ────────────────── v0.10.7
   Installed DataAPI ───────────────────── v1.15.0
   Installed ShaderAbstractions ────────── v0.3.0
   Installed FixedPointNumbers ─────────── v0.8.4
   Installed Optim ─────────────────────── v1.7.6
...
   Installed WoodburyMatrices ──────────── v0.5.5
   Installed Makie ─────────────────────── v0.19.7
  Downloaded artifact: JpegTurbo
  Downloaded artifact: x265
  Downloaded artifact: libfdk_aac
  Downloaded artifact: Opus
  Downloaded artifact: EarCut
  Downloaded artifact: Cairo
  Downloaded artifact: Fontconfig
...
  Downloaded artifact: x264
  Downloaded artifact: FreeType2
  Downloaded artifact: libpng
  Downloaded artifact: libaom
...
  Downloaded artifact: Graphite2
  Downloaded artifact: libass
...
  Downloaded artifact: FFMPEG
  Downloaded artifact: Libgcrypt
...
  Downloaded artifact: libsixel
  Downloaded artifact: CRlibm
    Updating `~/.julia/environments/v1.10/Project.toml`
  [13f3f980] + CairoMakie v0.10.7
    Updating `~/.julia/environments/v1.10/Manifest.toml`
  [621f4979] + AbstractFFTs v1.5.0
  [398f06c4] + AbstractLattices v0.2.1
  [1520ce14] + AbstractTrees v0.4.4
  [79e6a3ab] + Adapt v3.6.2
  [27a7e980] + Animations v0.4.1
  [4fba245c] + ArrayInterface v7.4.11
⌅ [67c07d97] + Automa v0.8.3
  [13072b0f] + AxisAlgorithms v1.0.1
  [39de3d68] + AxisArrays v0.4.7
  [fa961155] + CEnum v0.4.2
  [96374032] + CRlibm v1.0.1
  [159f3aea] + Cairo v1.0.5
  [13f3f980] + CairoMakie v0.10.7
  [49dc2e85] + Calculus v0.5.1
  [d360d2e6] + ChainRulesCore v1.16.0
  [a2cac450] + ColorBrewer v0.4.0
  [35d6a980] + ColorSchemes v3.22.0
  [3da002f7] + ColorTypes v0.11.4
⌅ [c3611d14] + ColorVectorSpace v0.9.10
  [5ae59095] + Colors v0.12.10
  [861a8166] + Combinatorics v1.0.2
  [bbf7d656] + CommonSubexpressions v0.3.0
  [34da2185] + Compat v4.9.0
  [187b0558] + ConstructionBase v1.5.3
  [d38c429a] + Contour v0.6.2
  [9a962f9c] + DataAPI v1.15.0
  [864edb3b] + DataStructures v0.18.14
  [e2d170a0] + DataValueInterfaces v1.0.0
⌅ [927a84f5] + DelaunayTriangulation v0.7.2
  [163ba53b] + DiffResults v1.1.0
...
  [411431e0] + Extents v0.1.1
  [c87230d0] + FFMPEG v0.4.1
  [7a1cc6ca] + FFTW v1.7.1
  [fa42c844] + FastRounding v0.3.1
...
  [f6369f11] + ForwardDiff v0.10.35
  [b38be410] + FreeType v4.0.0
  [663a7486] + FreeTypeAbstraction v0.10.0
  [46192b85] + GPUArraysCore v0.1.5
...
  [42e2da0e] + Grisu v1.0.2
  [34004b35] + HypergeometricFunctions v0.3.23
  [2803e5a7] + ImageAxes v0.6.11
⌃ [c817782e] + ImageBase v0.1.5
⌅ [a09fc81d] + ImageCore v0.9.4
  [82e4d734] + ImageIO v0.6.7
...
  [9c8b4983] + LightXML v0.9.0
  [d3d80556] + LineSearches v7.2.0
  [9b3f67b0] + LinearAlgebraX v0.1.12
  [2ab3a3ac] + LogExpFunctions v0.3.24
  [1914dd2f] + MacroTools v0.5.10
  [ee78f7c6] + Makie v0.19.7
  [20f20a25] + MakieCore v0.6.4
...
  [6e34b625] + Bzip2_jll v1.0.8+0
  [4e9b3aee] + CRlibm_jll v1.0.1+0
  [83423d85] + Cairo_jll v1.16.1+1
  [5ae413db] + EarCut_jll v2.2.4+0
  [2e619515] + Expat_jll v2.5.0+0
  [b22a6f82] + FFMPEG_jll v4.4.4+0
  [f5851436] + FFTW_jll v3.3.10+0
  [a3f928ae] + Fontconfig_jll v2.13.93+0
⌅ [d7e528f0] + FreeType2_jll v2.10.4+0
  [559328eb] + FriBidi_jll v1.0.10+0
  [78b55507] + Gettext_jll v0.21.0+0
  [7746bdde] + Glib_jll v2.74.0+2
  [3b182d85] + Graphite2_jll v1.3.14+0
  [2e76f6c2] + HarfBuzz_jll v2.8.1+1
  [905a6f67] + Imath_jll v3.1.7+0
  [1d5cc7b8] + IntelOpenMP_jll v2023.1.0+0
  [aacddb02] + JpegTurbo_jll v2.1.91+0
  [c1c5ebd0] + LAME_jll v3.100.1+0
  [1d63c593] + LLVMOpenMP_jll v15.0.4+0
  [dd4b983a] + LZO_jll v2.10.1+0
⌅ [e9f186c6] + Libffi_jll v3.2.2+1
  [d4300ac3] + Libgcrypt_jll v1.8.7+0
  [7add5ba3] + Libgpg_error_jll v1.42.0+0
  [94ce4f54] + Libiconv_jll v1.16.1+2
  [4b2f31a3] + Libmount_jll v2.35.0+0
  [38a345b3] + Libuuid_jll v2.36.0+0
  [856f044c] + MKL_jll v2023.1.0+0
  [e7412a2a] + Ogg_jll v1.3.5+1
  [18a262bb] + OpenEXR_jll v3.1.4+0
  [458c3c95] + OpenSSL_jll v3.0.9+0
  [efe28fd5] + OpenSpecFun_jll v0.5.5+0
  [91d4177d] + Opus_jll v1.3.2+0
  [36c8627f] + Pango_jll v1.50.9+0
  [30392449] + Pixman_jll v0.42.2+0
  [f50d1b31] + Rmath_jll v0.4.0+0
  [02c8fc9c] + XML2_jll v2.10.3+0
  [aed1982a] + XSLT_jll v1.1.34+0
  [4f6342f7] + Xorg_libX11_jll v1.8.6+0
  [0c0b7dd1] + Xorg_libXau_jll v1.0.11+0
  [a3789734] + Xorg_libXdmcp_jll v1.1.4+0
  [1082639a] + Xorg_libXext_jll v1.3.4+4
  [ea2f1a96] + Xorg_libXrender_jll v0.9.10+4
  [14d82f49] + Xorg_libpthread_stubs_jll v0.1.1+0
  [c7cfdc94] + Xorg_libxcb_jll v1.15.0+0
  [c5fb5394] + Xorg_xtrans_jll v1.5.0+0
  [9a68df92] + isoband_jll v0.2.3+0
  [a4ae2306] + libaom_jll v3.4.0+0
  [0ac62f75] + libass_jll v0.15.1+0
  [f638f0a6] + libfdk_aac_jll v2.0.2+0
  [b53b4c65] + libpng_jll v1.6.38+0
  [075b6546] + libsixel_jll v1.10.3+0
  [f27f6e37] + libvorbis_jll v1.3.7+1
  [1270edf5] + x264_jll v2021.5.5+0
  [dfaa095f] + x265_jll v3.5.0+0
...
  [8e850ede] + nghttp2_jll v1.52.0+0
  [3f19e933] + p7zip_jll v17.4.0+0
        Info Packages marked with ⌃ and ⌅ have new versions available, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated -m`
Precompiling project...
  ✗ FFMPEG
  ✗ Makie
  ✗ CairoMakie
  234 dependencies successfully precompiled in 189 seconds. 11 already precompiled.
  3 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

(@v1.10) pkg> precompile
Precompiling project...
  ✗ FFMPEG
  ✗ Makie
  ✗ CairoMakie
  0 dependencies successfully precompiled in 19 seconds. 245 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

CairoMakie [13f3f980-e62b-5c42-98c6-ff1f3baf88f0]

Failed to precompile CairoMakie [13f3f980-e62b-5c42-98c6-ff1f3baf88f0] to "/Users/forcebru/.julia/compiled/v1.10/CairoMakie/jl_iiD5TY".
ERROR: LoadError: InitError: could not load library "/Users/forcebru/.julia/artifacts/ff3aadfd4ca3ccb50156bf905841eb68157b2086/lib/libavdevice.58.13.100.dylib"
dlopen(/Users/forcebru/.julia/artifacts/ff3aadfd4ca3ccb50156bf905841eb68157b2086/lib/libavdevice.58.13.100.dylib, 1): Library not loaded: @rpath/libfreetype.6.dylib
  Referenced from: /Users/forcebru/.julia/artifacts/ff3aadfd4ca3ccb50156bf905841eb68157b2086/lib/libavdevice.58.13.100.dylib
  Reason: Incompatible library version: libavdevice.58.13.100.dylib requires version 27.0.0 or later, but libfreetype.6.dylib provides version 24.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
    @ FFMPEG_jll ~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl:54 [inlined]
  [4] __init__()
    @ FFMPEG_jll ~/.julia/packages/FFMPEG_jll/ZR3df/src/wrappers/x86_64-apple-darwin.jl:39
  [5] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1128
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1116
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base ./loading.jl:1061
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base ./loading.jl:1575
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1932
 [10] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1806
 [11] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [12] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1797
 [14] macro expansion
    @ Base ./loading.jl:1784 [inlined]
 [15] macro expansion
    @ Base ./lock.jl:267 [inlined]
 [16] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1747
 [17] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [18] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [19] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1740
 [20] include
    @ Base ./Base.jl:489 [inlined]
 [21] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{…}, dl_load_path::Vector{…}, load_path::Vector{…}, concrete_deps::Vector{…}, source::String)
    @ Base ./loading.jl:2216
 [22] top-level scope
    @ stdin:3
Some type information was truncated. Use `show(err)` to see complete types.
during initialization of module FFMPEG_jll
in expression starting at /Users/forcebru/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to "/Users/forcebru/.julia/compiled/v1.10/FFMPEG/jl_hrzdFW".
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:2468
  [3] compilecache
    @ Base ./loading.jl:2334 [inlined]
  [4] (::Base.var"#967#968"{Base.PkgId})()
    @ Base ./loading.jl:1968
  [5] mkpidlock(f::Base.var"#967#968"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-beta1+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:92
  [6] #mkpidlock#6
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-beta1+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:87 [inlined]
  [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-beta1+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:110
  [8] #invokelatest#2
    @ Base ./essentials.jl:889 [inlined]
  [9] invokelatest
    @ Base ./essentials.jl:884 [inlined]
 [10] maybe_cachefile_lock(f::Base.var"#967#968"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:2898
 [11] maybe_cachefile_lock
    @ Base ./loading.jl:2895 [inlined]
 [12] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1964
 [13] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1806
 [14] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [15] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [16] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1797
 [17] macro expansion
    @ Base ./loading.jl:1784 [inlined]
 [18] macro expansion
    @ Base ./lock.jl:267 [inlined]
 [19] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1747
 [20] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [21] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [22] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1740
 [23] include
    @ Base ./Base.jl:489 [inlined]
 [24] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{…}, dl_load_path::Vector{…}, load_path::Vector{…}, concrete_deps::Vector{…}, source::String)
    @ Base ./loading.jl:2216
 [25] top-level scope
    @ stdin:3
Some type information was truncated. Use `show(err)` to see complete types.
in expression starting at /Users/forcebru/.julia/packages/Makie/uAmck/src/Makie.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a] to "/Users/forcebru/.julia/compiled/v1.10/Makie/jl_xANhKJ".
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:2468
  [3] compilecache
    @ Base ./loading.jl:2334 [inlined]
  [4] (::Base.var"#967#968"{Base.PkgId})()
    @ Base ./loading.jl:1968
  [5] mkpidlock(f::Base.var"#967#968"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-beta1+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:92
  [6] #mkpidlock#6
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-beta1+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:87 [inlined]
  [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-beta1+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:110
  [8] #invokelatest#2
    @ Base ./essentials.jl:889 [inlined]
  [9] invokelatest
    @ Base ./essentials.jl:884 [inlined]
 [10] maybe_cachefile_lock(f::Base.var"#967#968"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:2898
 [11] maybe_cachefile_lock
    @ Base ./loading.jl:2895 [inlined]
 [12] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1964
 [13] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1806
 [14] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [15] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [16] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1797
 [17] macro expansion
    @ Base ./loading.jl:1784 [inlined]
 [18] macro expansion
    @ Base ./lock.jl:267 [inlined]
 [19] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1747
 [20] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [21] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [22] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1740
 [23] include
    @ Base ./Base.jl:489 [inlined]
 [24] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{…}, dl_load_path::Vector{…}, load_path::Vector{…}, concrete_deps::Vector{…}, source::Nothing)
    @ Base ./loading.jl:2216
 [25] top-level scope
    @ stdin:3
Some type information was truncated. Use `show(err)` to see complete types.
in expression starting at /Users/forcebru/.julia/packages/CairoMakie/Ry75I/src/CairoMakie.jl:1
in expression starting at stdin:3


(@v1.10) pkg>

Among other things, it installs FreeType2_jll v2.10.4+0. It seems like this causes precompilation of FFMPEG and Makie to fail:

(@v1.10) pkg> precompile
Precompiling project...
  ✗ FFMPEG
  ✗ Makie
  ✗ CairoMakie
  0 dependencies successfully precompiled in 19 seconds. 245 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

CairoMakie [13f3f980-e62b-5c42-98c6-ff1f3baf88f0]

Failed to precompile CairoMakie [13f3f980-e62b-5c42-98c6-ff1f3baf88f0] to "/Users/forcebru/.julia/compiled/v1.10/CairoMakie/jl_iiD5TY".
ERROR: LoadError: InitError: could not load library "/Users/forcebru/.julia/artifacts/ff3aadfd4ca3ccb50156bf905841eb68157b2086/lib/libavdevice.58.13.100.dylib"
dlopen(/Users/forcebru/.julia/artifacts/ff3aadfd4ca3ccb50156bf905841eb68157b2086/lib/libavdevice.58.13.100.dylib, 1): Library not loaded: @rpath/libfreetype.6.dylib
  Referenced from: /Users/forcebru/.julia/artifacts/ff3aadfd4ca3ccb50156bf905841eb68157b2086/lib/libavdevice.58.13.100.dylib
  Reason: Incompatible library version: libavdevice.58.13.100.dylib requires version 27.0.0 or later, but libfreetype.6.dylib provides version 24.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
    @ FFMPEG_jll ~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl:54 [inlined]
  [4] __init__()
    @ FFMPEG_jll ~/.julia/packages/FFMPEG_jll/ZR3df/src/wrappers/x86_64-apple-darwin.jl:39
  [5] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1128
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1116
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base ./loading.jl:1061
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base ./loading.jl:1575
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1932
 [10] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1806
 [11] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [12] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1797
 [14] macro expansion
    @ Base ./loading.jl:1784 [inlined]
 [15] macro expansion
    @ Base ./lock.jl:267 [inlined]
 [16] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1747
 [17] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [18] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [19] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1740
 [20] include
    @ Base ./Base.jl:489 [inlined]
 [21] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{…}, dl_load_path::Vector{…}, load_path::Vector{…}, concrete_deps::Vector{…}, source::String)
    @ Base ./loading.jl:2216
 [22] top-level scope
    @ stdin:3
Some type information was truncated. Use `show(err)` to see complete types.
during initialization of module FFMPEG_jll
in expression starting at /Users/forcebru/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to "/Users/forcebru/.julia/compiled/v1.10/FFMPEG/jl_hrzdFW".
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:2468
  [3] compilecache
    @ Base ./loading.jl:2334 [inlined]
  [4] (::Base.var"#967#968"{Base.PkgId})()
    @ Base ./loading.jl:1968
  [5] mkpidlock(f::Base.var"#967#968"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-beta1+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:92
  [6] #mkpidlock#6
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-beta1+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:87 [inlined]
  [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-beta1+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:110
  [8] #invokelatest#2
    @ Base ./essentials.jl:889 [inlined]
  [9] invokelatest
    @ Base ./essentials.jl:884 [inlined]
 [10] maybe_cachefile_lock(f::Base.var"#967#968"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:2898
 [11] maybe_cachefile_lock
    @ Base ./loading.jl:2895 [inlined]
 [12] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1964
 [13] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1806
 [14] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [15] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [16] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1797
 [17] macro expansion
    @ Base ./loading.jl:1784 [inlined]
 [18] macro expansion
    @ Base ./lock.jl:267 [inlined]
 [19] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1747
 [20] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [21] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [22] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1740
 [23] include
    @ Base ./Base.jl:489 [inlined]
 [24] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{…}, dl_load_path::Vector{…}, load_path::Vector{…}, concrete_deps::Vector{…}, source::String)
    @ Base ./loading.jl:2216
 [25] top-level scope
    @ stdin:3
Some type information was truncated. Use `show(err)` to see complete types.
in expression starting at /Users/forcebru/.julia/packages/Makie/uAmck/src/Makie.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a] to "/Users/forcebru/.julia/compiled/v1.10/Makie/jl_xANhKJ".
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:2468
  [3] compilecache
    @ Base ./loading.jl:2334 [inlined]
  [4] (::Base.var"#967#968"{Base.PkgId})()
    @ Base ./loading.jl:1968
  [5] mkpidlock(f::Base.var"#967#968"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-beta1+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:92
  [6] #mkpidlock#6
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-beta1+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:87 [inlined]
  [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-beta1+0.x64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:110
  [8] #invokelatest#2
    @ Base ./essentials.jl:889 [inlined]
  [9] invokelatest
    @ Base ./essentials.jl:884 [inlined]
 [10] maybe_cachefile_lock(f::Base.var"#967#968"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:2898
 [11] maybe_cachefile_lock
    @ Base ./loading.jl:2895 [inlined]
 [12] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1964
 [13] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1806
 [14] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [15] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [16] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1797
 [17] macro expansion
    @ Base ./loading.jl:1784 [inlined]
 [18] macro expansion
    @ Base ./lock.jl:267 [inlined]
 [19] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1747
 [20] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [21] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [22] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1740
 [23] include
    @ Base ./Base.jl:489 [inlined]
 [24] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{…}, dl_load_path::Vector{…}, load_path::Vector{…}, concrete_deps::Vector{…}, source::Nothing)
    @ Base ./loading.jl:2216
 [25] top-level scope
    @ stdin:3
Some type information was truncated. Use `show(err)` to see complete types.
in expression starting at /Users/forcebru/.julia/packages/CairoMakie/Ry75I/src/CairoMakie.jl:1
in expression starting at stdin:3

In particular, this says:

Incompatible library version: libavdevice.58.13.100.dylib requires version 27.0.0 or later, but libfreetype.6.dylib provides version 24.0.0

Installing FFMPEG, then CairoMakie, again from scratch:

~ $ rm -rf .julia/
~ $ juliaup add beta && julia +beta
Installing Julia 1.10.0-beta1+0.x64.apple.darwin14
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.0-beta1 (2023-07-25)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.10) pkg> add FFMPEG
  Installing known registries into `~/.julia`
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
   Installed x265_jll ────────────────── v3.5.0+0
   Installed FFMPEG ──────────────────── v0.4.1
   Installed libfdk_aac_jll ──────────── v2.0.2+0
   Installed XML2_jll ────────────────── v2.10.3+0
   Installed Pixman_jll ──────────────── v0.42.2+0
   Installed libass_jll ──────────────── v0.15.1+0
   Installed Graphite2_jll ───────────── v1.3.14+0
   Installed Libmount_jll ────────────── v2.35.0+0
   Installed Xorg_libXext_jll ────────── v1.3.4+4
   Installed Gettext_jll ─────────────── v0.21.0+0
   Installed Xorg_xtrans_jll ─────────── v1.5.0+0
   Installed OpenSSL_jll ─────────────── v3.0.9+0
   Installed FFMPEG_jll ──────────────── v4.4.4+0
   Installed Expat_jll ───────────────── v2.5.0+0
   Installed Opus_jll ────────────────── v1.3.2+0
   Installed Preferences ─────────────── v1.4.0
   Installed Bzip2_jll ───────────────── v1.0.8+0
   Installed Libgcrypt_jll ───────────── v1.8.7+0
   Installed LZO_jll ─────────────────── v2.10.1+0
   Installed LAME_jll ────────────────── v3.100.1+0
   Installed HarfBuzz_jll ────────────── v2.8.1+1
   Installed LLVMOpenMP_jll ──────────── v15.0.4+0
   Installed Libiconv_jll ────────────── v1.16.1+2
   Installed Xorg_libXrender_jll ─────── v0.9.10+4
   Installed Libffi_jll ──────────────── v3.2.2+1
   Installed JLLWrappers ─────────────── v1.4.1
   Installed libvorbis_jll ───────────── v1.3.7+1
   Installed FriBidi_jll ─────────────── v1.0.10+0
   Installed Glib_jll ────────────────── v2.74.0+2
   Installed Ogg_jll ─────────────────── v1.3.5+1
   Installed Xorg_libpthread_stubs_jll ─ v0.1.1+0
   Installed Cairo_jll ───────────────── v1.16.1+1
   Installed Fontconfig_jll ──────────── v2.13.93+0
   Installed XSLT_jll ────────────────── v1.1.34+0
   Installed x264_jll ────────────────── v2021.5.5+0
   Installed Libgpg_error_jll ────────── v1.42.0+0
   Installed FreeType2_jll ───────────── v2.13.1+0
   Installed Xorg_libXdmcp_jll ───────── v1.1.4+0
... installs fine
(@v1.10) pkg> add CairoMakie
... succeeds

Results

  • add CairoMakie
    • Installs FreeType2_jll v2.10.4+0
    • Precompilation of FFMPEG, Makie and CairoMakie fails because libfreetype.6.dylib provides version 24.0.0
  • add FFMPEG and then add CairoMakie
    • Installs FreeType2_jll v2.13.1+0
    • Precompilation succeeds, everything works
julia> versioninfo()
Julia Version 1.10.0-beta1
Commit 6616549950e (2023-07-25 17:43 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin22.4.0)
  CPU: 4 × Intel(R) Core(TM) i5-3330S CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, ivybridge)
  Threads: 1 on 4 virtual cores