Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Precompile error, missing symbol in libpango.so #531

Closed
phykos opened this issue Nov 18, 2020 · 15 comments
Closed

Precompile error, missing symbol in libpango.so #531

phykos opened this issue Nov 18, 2020 · 15 comments

Comments

@phykos
Copy link

phykos commented Nov 18, 2020

Traceback:

julia> using Gtk
[ Info: Precompiling Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44]
ERROR: LoadError: LoadError: InitError: could not load library "/home/g/.julia/artifacts/5468acf0ab7d63c9fd87622c5355256ab61f082b/lib/libpangocairo-1.0.so"
/lib/libpangoft2-1.0.so.0: undefined symbol: pango_coverage_get_type
Stacktrace:
 [1] dlopen(::String, ::UInt32; throw_error::Bool) at /buildworker/worker/package_linuxaarch64/build/usr/share/julia/stdlib/v1.5/Libdl/src/Libdl.jl:109
 [2] dlopen(::String, ::UInt32) at /buildworker/worker/package_linuxaarch64/build/usr/share/julia/stdlib/v1.5/Libdl/src/Libdl.jl:109
 [3] macro expansion at /home/g/.julia/packages/JLLWrappers/KuIwt/src/products/library_generators.jl:61 [inlined]
 [4] __init__() at /home/g/.julia/packages/Pango_jll/XQBSg/src/wrappers/aarch64-linux-gnu.jl:22
 [5] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:697
 [6] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:782
 [7] _require(::Base.PkgId) at ./loading.jl:1007
 [8] require(::Base.PkgId) at ./loading.jl:928
 [9] require(::Module, ::Symbol) at ./loading.jl:923
 [10] include(::Function, ::Module, ::String) at ./Base.jl:380
 [11] include(::Module, ::String) at ./Base.jl:368
 [12] top-level scope at /home/g/.julia/packages/JLLWrappers/KuIwt/src/toplevel_generators.jl:170
 [13] include(::Function, ::Module, ::String) at ./Base.jl:380
 [14] include(::Module, ::String) at ./Base.jl:368
 [15] top-level scope at none:2
 [16] eval at ./boot.jl:331 [inlined]
 [17] eval(::Expr) at ./client.jl:467
 [18] top-level scope at ./none:3
during initialization of module Pango_jll
in expression starting at /home/g/.julia/packages/GTK3_jll/8K2nw/src/wrappers/aarch64-linux-gnu.jl:6
in expression starting at /home/g/.julia/packages/GTK3_jll/8K2nw/src/GTK3_jll.jl:8
ERROR: LoadError: Failed to precompile GTK3_jll [77ec8976-b24b-556a-a1bf-49a033a670a6] to /home/g/.julia/compiled/v1.5/GTK3_jll/D35Um_CnE5m.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] include(::Function, ::Module, ::String) at ./Base.jl:380
 [7] include(::Module, ::String) at ./Base.jl:368
 [8] top-level scope at none:2
 [9] eval at ./boot.jl:331 [inlined]
 [10] eval(::Expr) at ./client.jl:467
 [11] top-level scope at ./none:3
in expression starting at /home/g/.julia/packages/Gtk/C22jV/src/Gtk.jl:9
ERROR: Failed to precompile Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44] to /home/g/.julia/compiled/v1.5/Gtk/Vjnq0_CnE5m.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923

To be honest, I don't have the minimum idea of what I have to do

@phykos phykos changed the title Precompiler error, missing symbol in libpango.so Precompile error, missing symbol in libpango.so Nov 18, 2020
@giordano
Copy link
Contributor

Can you please show the output of

using Libdl
filter(lib ->occursin("libpangoft2", lib), dllist())

after you get this error, in the same Julia session. I suspect another library is being picked up.

@phykos
Copy link
Author

phykos commented Nov 18, 2020

Can you please show the output of

using Libdl
filter(lib ->occursin("libpangoft2", lib), dllist())

after you get this error, in the same Julia session. I suspect another library is being picked up.

Same Julia session, String[]

@giordano
Copy link
Contributor

That's... weird. Ok, let's try to show something more. Always same session:

using Libdl
filter(lib ->occursin("pango", lib), dllist())

@phykos
Copy link
Author

phykos commented Nov 18, 2020

That's... weird. Ok, let's try to show something more. Always same session:

using Libdl
filter(lib ->occursin("pango", lib), dllist())

Same as before

@giordano
Copy link
Contributor

I must say I have a hard time believing that, since libpango.so is loaded before the other libraries: https://github.com/JuliaBinaryWrappers/Pango_jll.jl/blob/7daac12ec5e72d6928bb7e1efbbd3b979866d0a9/src/wrappers/aarch64-linux-gnu.jl#L16-L20 and you get an error only when loading libpangocairo-1.0.so (line 22 of the same file, as shown in your stacktrace)

@giordano
Copy link
Contributor

Do you set environment variables like LD_LIBRARY_PATH that could affect order of loading of libraries? Check for example ENV["LD_LIBRARY_PATH"] in Julia. Does the file /lib/libpangoft2-1.0.so.0 exist in your system?

@phykos
Copy link
Author

phykos commented Nov 18, 2020

Do you set environment variables like LD_LIBRARY_PATH that could affect order of loading of libraries? Check for example ENV["LD_LIBRARY_PATH"] in Julia. Does the file /lib/libpangoft2-1.0.so.0 exist in your system?

I have set LD_LIBRARY_PATH in my zshrc to "/lib:/usr/lib:/usr/local/lib", and yes, the file does exist

@giordano
Copy link
Contributor

giordano commented Nov 18, 2020

I have set LD_LIBRARY_PATH in my zshrc to "/lib:/usr/lib:/usr/local/lib"

Does it work if you don't set LD_LIBRARY_PATH?

and yes, the file does exist

That confirms that the system library is being picked up. Maybe because of setting LD_LIBRARY_PATH

@phykos
Copy link
Author

phykos commented Nov 18, 2020

Does it work if you don't set LD_LIBRARY_PATH?
No, it's the same thing

@giordano
Copy link
Contributor

Does that happen in a fresh Julia session? I really have a hard time figuring out under which conditions you can get this error, and the fact that libpango.so isn't loaded after you get the error doesn't make much sense to me

@phykos
Copy link
Author

phykos commented Nov 19, 2020

even in a fresh Julia session it returns String[]

@giordano
Copy link
Contributor

even in a fresh Julia session it returns String[]

No doubt there is no libpango.so in a fresh Julia session, if you're saying that. I was asking whether the error occurs also in a fresh Julia session, without loading any other package before that.

How did you install Julia? After you get the error, can you simply print all loaded libraries?

using Libdl
println.(dllist());

It's easier than looking one by one for the faulty one.

@phykos
Copy link
Author

phykos commented Nov 19, 2020

even in a fresh Julia session it returns String[]

No doubt there is no libpango.so in a fresh Julia session, if you're saying that. I was asking whether the error occurs also in a fresh Julia session, without loading any other package before that.

How did you install Julia? After you get the error, can you simply print all loaded libraries?

using Libdl
println.(dllist());

It's easier than looking one by one for the faulty one.

I installed Julia from the official website, and in origin I didn't install any package before Gtk (in that session)

Ok, I don't know how, but now it compiles, I didn't update anything...
Still nm /lib/libpango* says that there are no symbols.
Now it gives a warning, Gtk-Message: 20:56:43.200: Failed to load module "canberra-gtk-module", but It doesn't look that problematic

@phykos phykos closed this as completed Nov 19, 2020
@kunzaatko
Copy link

I had the same issue but it resolved itself with unseting LD_LIBRARY_PATH. It is kind of weird though, because:

ENV["LD_LIBRARY_PATH"] == "/usr/lib/:/usr/lib64/"

and pango is at /usr/lib/libpangoft2-1.0.so. Why does it not find it? @giordano

@giordano
Copy link
Contributor

I don't know what error you're getting, but the point is that you shouldn't be using the system library

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

No branches or pull requests

3 participants