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

Glib: change product order #8460

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

t-bltg
Copy link
Contributor

@t-bltg t-bltg commented Apr 6, 2024

If I'm not mistaken, the product declaration order in build_tarballs.jl seems to determine the load order in __init__ (as in https://github.com/JuliaBinaryWrappers/Glib_jll.jl/blob/main/src/wrappers/x86_64-linux-gnu.jl#L18-L46).

This PR changes the product order so that libglib and others are loaded before libgobject (see the symbol dependency using ldd -r libXXX.so).

Fix https://discourse.julialang.org/t/julia-error-initerror-when-trying-to-use-plots-in-python-via-juliacall/112425, or https://discourse.julialang.org/t/libgobject-2-0-so-0-undefined-symbol-g-dir-unref/112301.

Needed for JuliaPlots/Plots.jl#4914:

Test Summary:            | Pass  Total  Time
Preferences UnicodePlots |    2      2  0.6s
Test Summary:         | Pass  Total  Time
Persistent backend GR |    1      1  0.0s
Test Summary:                   | Pass  Total  Time
Persistent backend UnicodePlots |    1      1  0.0s
ERROR: LoadError: InitError: could not load library "[...]/lib/libgobject-2.0.so"
[...]/648a32a349aac06f19b6bfed47f0b822b4ef28c3/lib/libgobject-2.0.so: undefined symbol: g_dir_unref

@t-bltg t-bltg marked this pull request as draft April 6, 2024 20:59
@giordano
Copy link
Member

giordano commented Apr 6, 2024

I'm moderately sure we sort them alphabetically, because the order is otherwise undefined (the original order is lost serialising/deserialising the data through json into a Dict)

@t-bltg
Copy link
Contributor Author

t-bltg commented Apr 6, 2024

Thanks, the missing symbol error is odd, g_dir_unref is provided by libglib: nm -D libglib-2.0.so | grep g_dir_unref.

So I'm failing to understand why dlopening libgobject fails in a precompilation / test context (I can reproduce locally).

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

Successfully merging this pull request may close these issues.

2 participants