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

[BUG] Can't precompile Plots #4192

Closed
jkhamphousone opened this issue May 2, 2022 · 10 comments
Closed

[BUG] Can't precompile Plots #4192

jkhamphousone opened this issue May 2, 2022 · 10 comments

Comments

@jkhamphousone
Copy link

jkhamphousone commented May 2, 2022

Details

Note that I asked for this bug on Julia StackOverflow

I installed a new version of Julia, version 1.7. And while trying to precompile Plots I have the following errors:

(@v1.7) pkg> add Plots
   Resolving package versions...
    Updating `~/.julia/environments/v1.7/Project.toml`
  [91a5bcdd] + Plots v1.28.0
    Updating `~/.julia/environments/v1.7/Manifest.toml`
  [79e6a3ab] + Adapt v3.3.3
  [35d6a980] + ColorSchemes v3.17.1
  [d38c429a] + Contour v0.5.7
  [e2d170a0] + DataValueInterfaces v1.0.0
  [5c1252a2] + GeometryBasics v0.4.2
  [42e2da0e] + Grisu v1.0.2
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [b964fa9f] + LaTeXStrings v1.3.0
  [23fbe1c1] + Latexify v0.15.15
  [ccf2f8ad] + PlotThemes v3.0.0
  [995b91a9] + PlotUtils v1.2.0
  [91a5bcdd] + Plots v1.28.0
  [3cdcf5f2] + RecipesBase v1.2.1
  [01d81517] + RecipesPipeline v0.5.2
  [992d4aef] + Showoff v1.0.3
  [09ab397b] + StructArrays v0.6.6
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.7.0
  [1cfade01] + UnicodeFun v0.4.1
  [41fe7b60] + Unzip v0.1.2
  [5ae413db] + EarCut_jll v2.2.3+0

(@v1.7) pkg> build Plots
    Building GR  `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/af237c08bda486b74318c8070adb96efa6952530/build.log`
Precompiling project...
  ✗ Plots
  1 dependency successfully precompiled in 17 seconds (144 already precompiled, 29 skipped during auto due to previous errors)
  1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package

julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
ERROR: LoadError: InitError: could not load library "/home/mylaboratory/myname/.julia/artifacts/4487a7356408c3a92924e56f9d3891724855282c/lib/libXau.so"
/home/mylaboratory/myname/.julia/artifacts/4487a7356408c3a92924e56f9d3891724855282c/lib/libXau.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type
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:117
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl:54 [inlined]
  [4] __init__()
    @ Xorg_libXau_jll ~/.julia/packages/Xorg_libXau_jll/z2hT9/src/wrappers/x86_64-linux-gnu.jl:8
  [5] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:768
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:854
  [7] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1097
  [8] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
  [9] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
 [10] include(mod::Module, _path::String)
    @ Base ./Base.jl:418
 [11] top-level scope
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
 [12] include
    @ ./Base.jl:418 [inlined]
 [13] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source
::String)
    @ Base ./loading.jl:1318
 [14] top-level scope
    @ none:1
 [15] eval
    @ ./boot.jl:373 [inlined]
 [16] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [17] top-level scope
    @ none:1
during initialization of module Xorg_libXau_jll
in expression starting at /home/mylaboratory/myname/.julia/packages/Xorg_libxcb_jll/nMYKH/src/wrappers/x86_64-linux-gnu.jl:5
in expression starting at /home/mylaboratory/myname/.julia/packages/Xorg_libxcb_jll/nMYKH/src/Xorg_libxcb_jll.jl:2
    ERROR: LoadError: Failed to precompile Xorg_libxcb_jll [c7cfdc94-dc32-55de-ac96-5a1b8d977c5b] to /home/mylaboratory/myname/.julia/compiled/v1.7/Xorg_libxcb_jll/jl_IJgtUS.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:418
  [8] top-level scope
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
  [9] include
    @ ./Base.jl:418 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1318
 [11] top-level scope
    @ none:1
 [12] eval
    @ ./boot.jl:373 [inlined]
 [13] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [14] top-level scope
    @ none:1
in expression starting at /home/mylaboratory/myname/.julia/packages/Xorg_libX11_jll/ICRWq/src/wrappers/x86_64-linux-gnu.jl:4
in expression starting at /home/mylaboratory/myname/.julia/packages/Xorg_libX11_jll/ICRWq/src/Xorg_libX11_jll.jl:2
ERROR: LoadError: Failed to precompile Xorg_libX11_jll [4f6342f7-b3d2-589e-9d20-edeb45f2b2bc] to /home/mylaboratory/myname/.julia/compiled/v1.7/Xorg_libX11_jll/jl_ntTOt0.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:418
  [8] top-level scope
[9] include
    @ ./Base.jl:418 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source
::String)
    @ Base ./loading.jl:1318
 [11] top-level scope
    @ none:1
 [12] eval
    @ ./boot.jl:373 [inlined]
 [13] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [14] top-level scope
    @ none:1
in expression starting at /home/mylaboratory/myname/.julia/packages/Cairo_jll/HW4xi/src/wrappers/x86_64-linux-gnu.jl:10
in expression starting at /home/mylaboratory/myname/.julia/packages/Cairo_jll/HW4xi/src/Cairo_jll.jl:2
ERROR: LoadError: Failed to precompile Cairo_jll [83423d85-b0ee-5818-9007-b63ccbeb887a] to /home/mylaboratory/myname/.julia/compiled/v1.7/Cairo_jll/jl_YPjkuT.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:418
  [8] top-level scope
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
  [9] include
    @ ./Base.jl:418 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1318
 [11] top-level scope
    @ none:1
 [12] eval
    @ ./boot.jl:373 [inlined]
 [13] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [14] top-level scope
    @ none:1
in expression starting at /home/mylaboratory/myname/.julia/packages/HarfBuzz_jll/zavaV/src/wrappers/x86_64-linux-gnu.jl:4
in expression starting at /home/mylaboratory/myname/.julia/packages/HarfBuzz_jll/zavaV/src/HarfBuzz_jll.jl:2
ERROR: LoadError: Failed to precompile HarfBuzz_jll [2e76f6c2-a576-52d4-95c1-20adfe4de566] to /home/mylaboratory/myname/.julia/compiled/v1.7/HarfBuzz_jll/jl_qkmYhc.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:418
  [8] top-level scope
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
  [9] include
    @ ./Base.jl:418 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1318
 [11] top-level scope
    @ none:1
 [12] eval
    @ ./boot.jl:373 [inlined]
 [13] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [14] top-level scope
    @ none:1
in expression starting at /home/mylaboratory/myname/.julia/packages/libass_jll/SaaQW/src/wrappers/x86_64-linux-gnu.jl:6
in expression starting at /home/mylaboratory/myname/.julia/packages/libass_jll/SaaQW/src/libass_jll.jl:2
ERROR: LoadError: Failed to precompile libass_jll [0ac62f75-1d6f-5e53-bd7c-93b484bb37c0] to /home/mylaboratory/myname/.julia/compiled/v1.7/libass_jll/jl_Na90wC.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:418
  [8] top-level scope
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
  [9] include
    @ ./Base.jl:418 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1318
 [11] top-level scope
    @ none:1
 [12] eval
    @ ./boot.jl:373 [inlined]
 [13] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [14] top-level scope
    @ none:1
in expression starting at /home/mylaboratory/myname/.julia/packages/FFMPEG_jll/ECokx/src/wrappers/x86_64-linux-gnu.jl:4
in expression starting at /home/mylaboratory/myname/.julia/packages/FFMPEG_jll/ECokx/src/FFMPEG_jll.jl:2
ERROR: LoadError: Failed to precompile FFMPEG_jll [b22a6f82-2f65-5046-a5b2-351ab43fb4e5] to /home/mylaboratory/myname/.julia/compiled/v1.7/FFMPEG_jll/jl_WqXB6W.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
  [7] include
    @ ./Base.jl:418 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1318
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:373 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [12] top-level scope
    @ none:1
in expression starting at /home/mylaboratory/myname/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:1
ERROR: LoadError: Failed to precompile FFMPEG_jll [b22a6f82-2f65-5046-a5b2-351ab43fb4e5] to /home/mylaboratory/myname/.julia/compiled/v1.7/FFMPEG_jll/jl_WqXB6W.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
  [7] include
    @ ./Base.jl:418 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1318
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:373 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [12] top-level scope
    @ none:1
in expression starting at /home/mylaboratory/myname/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:1
ERROR: LoadError: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to /home/mylaboratory/myname/.julia/compiled/v1.7/FFMPEG/jl_OjH0xW.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
  [7] include
    @ ./Base.jl:418 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1318
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:373 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [12] top-level scope
    @ none:1
in expression starting at /home/mylaboratory/myname/.julia/packages/Plots/nzdhU/src/Plots.jl:1
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /home/mylaboratory/myname/.julia/compiled/v1.7/Plots/jl_mvedww.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1466
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1410
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1120
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997

I tried to downgrade GR at v0.64.1 as suggested in the StackOverflow question but that did not change the issue.
I also tried to ] rm Plots ; ] update ; ] resolve ; add Plots ] ; build Plots ; using Plots which did not work neither.

Backends

This bug occurs on ( insert x below )

Backend yes no untested
gr (default) x
pyplot x
plotlyjs x
pgfplotsx x
unicodeplots x
inspectdr x
gaston x

Versions

Plots.jl version: 1.28.0
Backend version (]st -m <backend(s)>):
Output of versioninfo():

Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD EPYC-Rome Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, znver2)
@jkhamphousone jkhamphousone changed the title [BUG] [BUG] Can't precompile Plots May 2, 2022
@t-bltg
Copy link
Member

t-bltg commented May 4, 2022

Your error states that /home/mylaboratory/myname/.julia/artifacts/4487a7356408c3a92924e56f9d3891724855282c/lib/libXau.so is missing.

Can you give the output of $ ls /home/mylaboratory/myname/.julia/artifacts/4487a7356408c3a92924e56f9d3891724855282c/lib/libXau.so ?

If missing, please delete the offending artifact $ rm -r /home/mylaboratory/myname/.julia/artifacts/4487a7356408c3a92924e56f9d3891724855282c and run:

(@v1.7) pkg> instantiate
(@v1.7) pkg> update
(@v1.7) pkg> precompile

I see you are on Linux, so I suspect this is a loader thing. On which OS name and version are you ?

Please run the following snippet, and show the output here:

$ echo 'int main() {}' | gcc -xc -
$ readelf -l a.out | grep 'Requesting program interpreter'
$ /lib64/ld-linux-x86-64.so.2 --version   # ^^^^^ use the loader path given from previous command, if different
ld.so (Ubuntu GLIBC 2.35-0ubuntu3) stable release version 2.35.
$ rm a.out

@jkhamphousone
Copy link
Author

jkhamphousone commented May 5, 2022

Indeed /home/mylaboratory/myname/.julia/artifacts/4487a7356408c3a92924e56f9d3891724855282c/lib/ was empty.

I did rm -r /home/mylaboratory/myname/.julia/artifacts/4487a7356408c3a92924e56f9d3891724855282c/lib/ with success.

Here are the outputs of instantiate, update and precompile.

(@v1.7) pkg> instantiate                           
  Downloaded artifact: Xorg_libXau

(@v1.7) pkg> update                                
    Updating registry at `~/.julia/registries/General.toml`
    Updating git-repo `https://github.com/giordano/PkgCleanup.jl`
   Installed StatsFuns ─────────────── v1.0.0
   Installed HypergeometricFunctions ─ v0.3.8
   Installed DualNumbers ───────────── v0.6.8
   Installed LogExpFunctions ───────── v0.3.14
   Installed Plots ─────────────────── v1.28.2
   Installed Distributions ─────────── v0.25.57
    Updating `~/.julia/environments/v1.7/Project.toml`
  [31c24e10] ↑ Distributions v0.25.56 ⇒ v0.25.57
  [91a5bcdd] ↑ Plots v1.28.0 ⇒ v1.28.2
    Updating `~/.julia/environments/v1.7/Manifest.toml`
  [31c24e10] ↑ Distributions v0.25.56 ⇒ v0.25.57
  [fa6b7ba4] + DualNumbers v0.6.8
  [34004b35] + HypergeometricFunctions v0.3.8
  [2ab3a3ac] ↑ LogExpFunctions v0.3.13 ⇒ v0.3.14
  [91a5bcdd] ↑ Plots v1.28.0 ⇒ v1.28.2
  [4c63d2b9] ↑ StatsFuns v0.9.18 ⇒ v1.0.0
Precompiling project...                            
  ✗ Plots                                          
  10 dependencies successfully precompiled in 21 seconds (134 already precompiled, 29 skipped during auto due to previous errors)
  1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package

(@v1.7) pkg> precompile                            
Precompiling project...                            
  ✗ Xorg_libxcb_jll
  ✗ Xorg_xcb_util_jll
  ✗ Xorg_libX11_jll
  ✗ Xorg_libXrender_jll
  ✗ Xorg_libXext_jll
  ✗ Xorg_libXfixes_jll
  ✗ Xorg_libxkbfile_jll
  ✗ Xorg_xcb_util_image_jll
  ✗ Xorg_xcb_util_keysyms_jll
  ✗ Xorg_xcb_util_renderutil_jll
  ✗ Xorg_xcb_util_wm_jll
  ✗ Libglvnd_jll
  ✗ Xorg_libXinerama_jll
  ✗ Cairo_jll
  ✗ Xorg_libXrandr_jll
  ✗ Xorg_libXcursor_jll
  ✗ Xorg_libXi_jll
  ✗ Xorg_xkbcomp_jll
  ✗ HarfBuzz_jll
  ✗ GLFW_jll
  ✗ Xorg_xkeyboard_config_jll
  ✗ libass_jll
  ✗ Pango_jll
  ✗ xkbcommon_jll
  ✗ Cairo
  ✗ Qt5Base_jll
  ✗ FFMPEG_jll
  ✗ FFMPEG
  ✗ GR_jll
  ✗ Plots
  0 dependencies successfully precompiled in 77 seconds (144 already precompiled)

ERROR: The following 3 direct dependencies failed to precompile:

Cairo [159f3aea-2a34-519c-b102-8c37f9878175]

Failed to precompile Cairo [159f3aea-2a34-519c-b102-8c37f9878175] to /home/mylab/myname/.julia/compiled/v1.7/Cairo/jl_K50qhy.
ERROR: LoadError: InitError: could not load library "/home/mylab/myname/.julia/artifacts/51c48c945ae76d6c0102649044d9976d93b78125/lib/libXdmcp.so"
/home/mylab/myname/.julia/artifacts/51c48c945ae76d6c0102649044d9976d93b78125/lib/libXdmcp.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type

I am on a SSH server of my lab. Here are the info about the OS:

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

I am not sure to understand how to run the bash code you asked. What I did is:

myname@mylabserver:~$ echo 'int main() {}' | gcc -xc -
myname@mylabserver:~$ readelf -l a.out | grep 'Requesting program interpreter'
myname@mylabserver:~$ /home/lamsade/myname/.julia/artifacts/4487a7356408c3a92924e56f9d3891724855282c/lib/libXau.so --version
Erreur de segmentation

Erreur de segmentation is segmentation fault in French.

@t-bltg
Copy link
Member

t-bltg commented May 5, 2022

I work all the time flawlessly with ssh & julia.

It seems there is a network or extraction issue, the line Downloaded artifact: Xorg_libXau indicates that a download is being initiated, but you should see multiple of those lines showing downloaded artifacts (external binaries, and libraries for julia).

On a fresh install:

(@v1.7) pkg> add Plots
[...]                     
  Downloaded artifact: Xorg_libXinerama
  Downloaded artifact: FreeType2
  Downloaded artifact: Xorg_libX11
  Downloaded artifact: Xorg_libXdmcp
  Downloaded artifact: Xorg_libXau  # <== the one provoking the precompile error.
  Downloaded artifact: Xorg_libXcursor
  Downloaded artifact: Libuuid
[...]

You should see these files:

$ ls ~/.julia/artifacts/4487a7356408c3a92924e56f9d3891724855282c/lib
libXau.a  libXau.la  libXau.so  libXau.so.6  libXau.so.6.0.0  pkgconfig

You can get the artifacts url by inspecting:

$ cat ~/.julia/packages/Xorg_libXau_jll/z2hT9/Artifacts.toml
[...]
[[Xorg_libXau]]
arch = "x86_64"
git-tree-sha1 = "4487a7356408c3a92924e56f9d3891724855282c"
libc = "glibc"
os = "linux"

    [[Xorg_libXau.download]]
    sha256 = "763b24fb4a12e0a7d22b3a8f2f90f72e35b37c90771d1dcdad0d2d1e69f36e71"
    url = "https://github.com/JuliaBinaryWrappers/Xorg_libXau_jll.jl/releases/download/Xorg_libXau-v1.0.9+3/Xorg_libXau.v1.0.9.x86_64-linux-gnu.tar.gz"
[...]
# 4487a7356408c3a92924e56f9d3891724855282c maps to the following URL
# try to see if you can download & extract the binaries without errors on your remote machine
$ curl -L -o Xorg_libXau.v1.0.9.x86_64-linux-gnu.tar.gz https://github.com/JuliaBinaryWrappers/Xorg_libXau_jll.jl/releases/download/Xorg_libXau-v1.0.9+3/Xorg_libXau.v1.0.9.x86_64-linux-gnu.tar.gz
$ tar -xf Xorg_libXau.v1.0.9.x86_64-linux-gnu.tar.gz

Maybe a proxy is set ? (see and try the forum, e.g. https://discourse.julialang.org/t/new-julia-install-downloading-artifacts-fails-behind-proxy/43816).

Maybe a ca-certificates / SSL issue ? Try setting the JULIA_SSL_NO_VERIFY_HOSTS before launching julia:

$ export JULIA_SSL_NO_VERIFY_HOSTS='github.com'
$ rm -r [...]/.julia/artifacts/4487a7356408c3a92924e56f9d3891724855282c
$ julia
julia> ]
(@v1.7) pkg> instantiate

I am not sure to understand how to run the bash code you asked. What I did is:

Never mind the code snippet, I see that you use Debian GNU/Linux 11 so that's an older (2.31 ?) version of glibc (and thus the loader which launches any executable), so this was the wrong track.

Erreur de segmentation is segmentation fault in French.

Langue maternelle, donc ça va ;)

@jkhamphousone
Copy link
Author

jkhamphousone commented May 5, 2022

I do have those files, see below:

myname@mylabserver:~$ ls ~/.julia/artifacts/4487a7356408c3a92924e56f9d3891724855282c/lib/                                                                                                               
libXau.a  libXau.la  libXau.so  libXau.so.6  libXau.so.6.0.0  pkgconfig                                                                                                                                      
myname@mylabserver:~$ cat ~/.julia/packages/Xorg_libXau_jll/z2hT9/Artifacts.toml                                                                                                                        
[[Xorg_libXau]]                                                                                                                                                                                              
arch = "aarch64"                                                                                                                                                                                             
git-tree-sha1 = "a8e2801f7c45fe1b6b1d3e588982e52ec6c9e36f"                                                                                                                                                   
libc = "glibc"                                                                                                                                                                                               
os = "linux"                                                                                                                                                                                                 
                                                                                                                                                                                                             
    [[Xorg_libXau.download]]                                                                                                                                                                                 
    sha256 = "65a70012f7c28b161ca303b9e73868e35478ca2de4941039ebb604dc3eb7bda1"                                                                                                                              
    url = "https://github.com/JuliaBinaryWrappers/Xorg_libXau_jll.jl/releases/download/Xorg_libXau-v1.0.9+3/Xorg_libXau.v1.0.9.aarch64-linux-gnu.tar.gz"                                                     
[[Xorg_libXau]]                                                                                                                                                                                              
arch = "aarch64"                                                                                                                                                                                             
git-tree-sha1 = "92a698e7756aa6ef358cb8134b97606ac8935750"                                                                                                                                                   
libc = "musl"                                                                                                                                                                                                
os = "linux"                                                                                                                                                                                                 
                                                                                                                                                                                                             
    [[Xorg_libXau.download]]                                                                                                                                                                                 
    sha256 = "caad1a2eb7e21f8d7690e8e5e45b802bc970224f5f3a91dd5ce756e73759e3ae"                                                                                                                              
    url = "https://github.com/JuliaBinaryWrappers/Xorg_libXau_jll.jl/releases/download/Xorg_libXau-v1.0.9+3/Xorg_libXau.v1.0.9.aarch64-linux-musl.tar.gz"                                                    
[[Xorg_libXau]]                                                                                                                                                                                              
arch = "armv7l"                                                                                                                                                                                              
git-tree-sha1 = "c7bd614ff12a1f1614e350f92f4e4d48cde9b54a"                                                                                                                                                   
libc = "glibc"                                                                                                                                                                                               
os = "linux"                                                                                                                                                                                                 
                                                                                                                                                                                                             
    [[Xorg_libXau.download]]                                                                                                                                                                                 
    sha256 = "7b3b354c9dd0e5fbbaa40a819b305a3473df4f9cf6e4912799df1ffcc07daf59"                                                                                                                              
    url = "https://github.com/JuliaBinaryWrappers/Xorg_libXau_jll.jl/releases/download/Xorg_libXau-v1.0.9+3/Xorg_libXau.v1.0.9.armv7l-linux-gnueabihf.tar.gz"                                                
[[Xorg_libXau]]                                                                                                                                                                                              
arch = "armv7l"                                                                                                                                                                                              
git-tree-sha1 = "024b667522a4a0b38c7f61146a5c2743946f04d8"                                                                                                                                                   
libc = "musl"                                                                                                                                                                                                
os = "linux"           
[PLENTY of other lines]   

I am able to download and extract the corresponding tar.gz.

$  curl -L -o Xorg_libXau.v1.0.9.x86_64-linux-gnu.tar.gz https://github.com/JuliaBinaryWrappers/Xorg_libXau_jll.jl/releases/download/Xorg_libXau-v1.0.9+3/Xorg_libXau.v1.0.9.x86_64-linux-gnu.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 44165  100 44165    0     0  99024      0 --:--:-- --:--:-- --:--:-- 99024
$ tar -xf Xorg_libXau.v1.0.9.x86_64-linux-gnu.tar.gz
$ 

I do not know if it is going to help but I installed julia 1.7 alongside the julia 1.5.2 that was already installed in the server. I did not update from julia 1.5.2 because I was missing sudo rights. I have an alias to enter julia 1.7, j7 and I know using Plots did work for julia 1.5.2 but does not work since I updated to new julia.

About the proxy, I do not know if I have one (I do not know very well what it is, I admit haha)

I did:

$ echo $HTTP_PROXY

$ echo "$https_proxy"

Which do not return anything and:

$ curl -L https://pkg.julialang.org/meta --verbose                                                                                                                                  
*   Trying 151.101.122.217:443...                                                                                                                                                                            
* Connected to pkg.julialang.org (151.101.122.217) port 443 (#0)                                                                                                                                             
* ALPN, offering h2                                                                                                                                                                                          
* ALPN, offering http/1.1                                                                                                                                                                                    
* successfully set certificate verify locations:                                                                                                                                                             
*  CAfile: /etc/ssl/certs/ca-certificates.crt                                                                                                                                                                
*  CApath: /etc/ssl/certs                                                                                                                                                                                    
* TLSv1.3 (OUT), TLS handshake, Client hello (1):                                                                                                                                                            
* TLSv1.3 (IN), TLS handshake, Server hello (2):                                                                                                                                                             
* TLSv1.2 (IN), TLS handshake, Certificate (11):                                                                                                                                                             
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):                                                                                                                                                     
* TLSv1.2 (IN), TLS handshake, Server finished (14):                                                                                                                                                         
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):                                                                                                                                                    
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):                                                                                                                                                  
* TLSv1.2 (OUT), TLS handshake, Finished (20):                                                                                                                                                               
* TLSv1.2 (IN), TLS handshake, Finished (20):                                                                                                                                                                
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256                                                                                                                                                 
* ALPN, server accepted to use h2                                                                                                                                                                            
* Server certificate:                                                                                                                                                                                        
*  subject: CN=pkg.julialang.org                                                                                                                                                                             
*  start date: Oct  5 15:46:53 2021 GMT                                                                                                                                                                      
*  expire date: Nov  6 15:46:52 2022 GMT                                                                                                                                                                     
*  subjectAltName: host "pkg.julialang.org" matched cert's "pkg.julialang.org"                                                                                                                               
*  issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Atlas R3 DV TLS CA H2 2021                                                                                                                                
*  SSL certificate verify ok.                                                                                                                                                                                
* Using HTTP2, server supports multi-use                                                                                                                                                                     
* Connection state changed (HTTP/2 confirmed)                                                                                                                                                                
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0                                                                                                                             
* Using Stream ID: 1 (easy handle 0x556235acc5c0)                                                                                                                                                            
> GET /meta HTTP/2                                                                                                                                                                                           
> Host: pkg.julialang.org                                                                                                                                                                                    
> user-agent: curl/7.74.0                                                                                                                                                                                    
> accept: */*                                                                                                                                                                                                
>                                                                                                                                                                                                            
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!       

[PLENTY of other lines]

Merci beaucoup pour ton aide :D

@t-bltg
Copy link
Member

t-bltg commented May 5, 2022

I do not know if it is going to help but I installed julia 1.7 alongside the julia 1.5.2 that was already installed in the server.

That should work, I often switch between 1.6.6 LTS version and 1.7.2 latest release.

I did not update from julia 1.5.2 because I was missing sudo rights.

Odd, sudo rights shouldn't be needed to update julia.

Oh then If the files are present, and it still segfaults, or errors with no such file or directory error, this usually indicate a glibc mismatch.

Please show the output of the following:

$ ldd -r [...]/.julia/artifacts/4487a7356408c3a92924e56f9d3891724855282c/lib/libXau.so
	linux-vdso.so.1 (0x00007ffd52d5a000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4ab1dd8000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f4ab2280000)
$ ldd -r [...]/.julia/artifacts/51c48c945ae76d6c0102649044d9976d93b78125/lib/libXdmcp.so
	linux-vdso.so.1 (0x00007fff1dde4000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff0591bd000)
	/lib64/ld-linux-x86-64.so.2 (0x00007ff059616000)
$ /lib64/ld-linux-x86-64.so.2 --version  # <== adapt the path of the loader, with the output of the previous commands
ld.so (Ubuntu GLIBC 2.35-0ubuntu3) stable release version 2.35.

@jkhamphousone
Copy link
Author

jkhamphousone commented May 5, 2022

Here are the requested outputs. Works for the first, does not for the second

$ ldd -r [...]/.julia/artifacts/4487a7356408c3a92924e56f9d3891724855282c/lib/libXau.so
        linux-vdso.so.1 (0x00007ffda506d000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd32aa0b000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd32adf8000)


$ ldd -r [...]/.julia/artifacts/51c48c945ae76d6c0102649044d9976d93b78125/lib/libXdmcp.so
ldd: [...]/.julia/artifacts/51c48c945ae76d6c0102649044d9976d93b78125/lib/libXdmcp.so: Aucun fichier ou dossier de ce type
$ /lib64/ld-linux-x86-64.so.2 --version
--version: error while loading shared libraries: --version: cannot open shared object file

@t-bltg
Copy link
Member

t-bltg commented May 5, 2022

rm -r .julia/artifacts/51c48c945ae76d6c0102649044d9976d93b78125/, and ] instantiate again.

--version: cannot open shared object file

Ok, this is an old loader not supporting the --version flag, forget it.

@t-bltg
Copy link
Member

t-bltg commented May 5, 2022

You can also temporarily set the JULIA_DEPOT_PATH environment variable - if you suspect something fishy - to start downloading packages from scratch:

$ export JULIA_DEPOT_PATH="$HOME/foo"  # packages & artifacts will be installed in this location
$ julia
julia> using Pkg
julia> Pkg.add("Plots")
[...]
  Downloaded artifact: Xorg_libXrender
  Downloaded artifact: Xorg_libpthread_stubs
  Downloaded artifact: Xorg_libXi
[...]

@jkhamphousone
Copy link
Author

jkhamphousone commented May 5, 2022

Okaaayyy!!! It does work now!!
Somehow my JULIA_DEPOT_PATH variable was empty, echo $JULIA_DEPOT_PATH output nothing.
I changed it into [...]/juliapkg

And now everything is working including add, using and build plots

We can now close this issue. Thank you a lot t-bltg for your time, you helped me and saved me plenty of working time, thanks!!!

@t-bltg
Copy link
Member

t-bltg commented May 5, 2022

I'm glad this helped, but bear in mind that this solution might only be a workaround. When the default env var is not set, julia populates its internal DEPOT_PATH variable with platform dependent defaults:

$ echo $JULIA_DEPOT_PATH

$ julia
julia> DEPOT_PATH
3-element Vector{String}:
 "~/.julia"
 "[...]/local/share/julia"
 "[...]/share/julia"
# ^^^^^^ those are default values

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

No branches or pull requests

2 participants