JuliaIO / FFMPEG.jl

Julia Package for the FFMPEG builder binaries
MIT License
34 stars 13 forks source link

Initialization error with artifacts on mac #25

Open JackDunnNZ opened 4 years ago

JackDunnNZ commented 4 years ago

If I load PyPlot (via Conda) before FFMPEG, I am seeing the following issue on mac on Julia 1.3/1.4:

julia> using PyPlot

julia> using FFMPEG
ERROR: InitError: could not load library "/tmp/1.4b/artifacts/c2e7a063ae3397a1972d5878e4b838b1b1da822c/lib/libass.9.dylib"
dlopen(/tmp/1.4b/artifacts/c2e7a063ae3397a1972d5878e4b838b1b1da822c/lib/libass.9.dylib, 1): Library not loaded: @rpath/libfreetype.6.dylib
  Referenced from: /private/tmp/1.4b/artifacts/c2e7a063ae3397a1972d5878e4b838b1b1da822c/lib/libass.9.dylib
  Reason: Incompatible library version: libass.9.dylib requires version 24.0.0 or later, but libfreetype.6.dylib provides version 23.0.0
Stacktrace:
 [1] dlopen(::String, ::UInt32; throw_error::Bool) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/Libdl/src/Libdl.jl:109
 [2] dlopen at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/Libdl/src/Libdl.jl:109 [inlined] (repeats 2 times)
 [3] __init__() at /tmp/1.4b/packages/libass_jll/LMbUb/src/wrappers/x86_64-apple-darwin14.jl:42
 [4] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:697
 [5] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:781
 [6] _tryrequire_from_serialized(::Base.PkgId, ::UInt64, ::String) at ./loading.jl:712
 [7] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:770
 [8] _require(::Base.PkgId) at ./loading.jl:1006
 [9] require(::Base.PkgId) at ./loading.jl:927
 [10] require(::Module, ::Symbol) at ./loading.jl:922
during initialization of module libass_jll

If I switch the order of the imports then it works fine. It seems like PyPlot is loading its own version of libfreetype that is getting in the way of the one used by libass?

As expected, I don't get this by downgrading to FFMPEG 0.2.4. For now I can workaround by rearranging the load order of the packages

(I realise this is not strictly about this repo but figured it might get eyes here from someone that might understand how to fix it)