Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using PyPlot before using FFMPEG: Could not load library libobject-2.0.so.0 #50

Open
RememberSammyJenkins opened this issue Sep 10, 2021 · 1 comment

Comments

@RememberSammyJenkins
Copy link

RememberSammyJenkins commented Sep 10, 2021

Meta

This is similar to #25, but about another library and persists for julia v1.6.2, FFMPEG v0.4.1, PyPlot v2.10.0. That issue is also over a year old and has not got any replies.
Feel free to point me to an issue where this is closed in case I missed it.

The issue

In short, the issue is that using FFMPEG has to be executed before using PyPlot, otherwise there is an LoadError: InitError: could not load library.

The stacktrace:

ERROR: LoadError: InitError: could not load library "/home/[USER]/.julia/artifacts/e086922a5a3c20ca3e6866a33e42d8ec4689553e/lib/libgio-2.0.so"
/home/[USER]/.julia/artifacts/e086922a5a3c20ca3e6866a33e42d8ec4689553e/lib/libgobject-2.0.so.0: undefined symbol: g_uri_ref
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:114
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:114
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/bkwIo/src/products/library_generators.jl:54 [inlined]
  [4] __init__()
    @ Glib_jll ~/.julia/packages/Glib_jll/nSLTF/src/wrappers/x86_64-linux-gnu.jl:18
  [5] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:696
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:782
  [7] _tryrequire_from_serialized(modkey::Base.PkgId, build_id::UInt64, modpath::String)
    @ Base ./loading.jl:711
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:771
  [9] _tryrequire_from_serialized(modkey::Base.PkgId, build_id::UInt64, modpath::String)
    @ Base ./loading.jl:711
 [10] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:771
 [11] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1020
 [12] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
 [13] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
during initialization of module Glib_jll

with my username [USER].

This also has the consequence that packages using PyPlot and FFMPEG can precompile successfully with the correct order, but cannot be used themselves. At least that is my experience right now with my own package/module.

I have tried

  • LD_LIBRARY_PATH="" julia issue_MWE.jl with issue_MWE.jl supplied below.
  • LD_LIBRARY_PATH="/home/[USER]/.julia/artifacts/e086922a5a3c20ca3e6866a33e42d8ec4689553e/lib" julia issue_MWE.jl
  • re-ordering the using's in my package

Minimal (not) working example

cd(mktempdir())

import Pkg
Pkg.activate(".")
Pkg.add("FFMPEG")
Pkg.add("PyPlot")

using PyPlot
using FFMPEG

# I never get to see this :(
println("Congrats, you got here!")
@baumgold
Copy link

I'm also running into what appears to be a similar issue. Was a root cause or resolution ever found?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants