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] Julia 1.10.2 fails when trying to add or use Plots issuing Pkg.add("Plots") or using Plots #4921

Open
JuanVargas opened this issue Apr 19, 2024 · 11 comments
Labels

Comments

@JuanVargas
Copy link

ERROR: LoadError: Init
Error: could not load library "... /.julia/artifacts/648a32a349aac06f19b6bfed47f0b822b4ef28c3/lib/libgobject-2.0.so"
│ ..../.julia/artifacts/648a32a349aac06f19b6bfed47f0b822b4ef28c3/lib/libgobject-2.0.so: undefined symbol: g_dir_unref

Looking deeper into the cascade of errors, I can see that the following crash when precompiling

../src/Cairo_jll.jl
../src/GR_jll.jl

resulting in failures in the following packages:

✗ Cairo_jll
✗ Qt6Base_jll
✗ HarfBuzz_jll
✗ libass_jll
✗ FFMPEG_jll
✗ FFMPEG
✗ GR_jll
✗ Plots
✗ Plots → UnitfulExt

@JuanVargas JuanVargas added the bug label Apr 19, 2024
@JuanVargas JuanVargas changed the title [BUG] Julia 1.10.3 fails when trying to add or use Plots issuing Pkg.add("Plots") or using Plots [BUG] Julia 1.10.2 fails when trying to add or use Plots issuing Pkg.add("Plots") or using Plots Apr 19, 2024
@BeastyBlacksmith
Copy link
Member

I found that deleting .julia/artifacts and reinstantiating the environment helped on a similar error

@radudiaconu0
Copy link

i have the same issue on julia 1.10.3 on Ubuntu 24.04

@varnerlab
Copy link

varnerlab commented May 1, 2024

I have the same issue on Julia 1.10.3+0.aarch64.apple.darwin14 on macOS 14.4.1.

I deleted the .julia/artifacts dir and added Plots in the REPL. Then, many errors occurred during precompile, seemingly involving GR;

  • The first involves ERROR: LoadError: InitError: could not load library libtiff.5.dylib, and then there appears to be a similar issue with libLerc.dylib.
  • In the next block of the stack trace, I get ERROR: LoadError: InitError: UndefVarError: GR_jll not defined.

@JuanVargas
Copy link
Author

JuanVargas commented May 1, 2024 via email

@SamuelBrand1
Copy link

I'm getting this issue causing a CI failure... so deleting everything and trying again is not a great solution.

@varnerlab
Copy link

Hmmm. I just tried the "remove everything" workaround, but I'm still getting the following error message: ERROR: LoadError: InitError: UndefVarError: GR_jll not defined.

In particular:

  1. Deleted the .julia dir, reinstalled Julia 1.10.3+0.aarch64.apple.darwin14
  2. Opened the REPL, added the Plots package. However, when I try to use Plots and trigger a precompile ...
  3. Boom.

It always seems to fail on the precomple step.

@JuanVargas
Copy link
Author

JuanVargas commented May 1, 2024 via email

@varnerlab
Copy link

varnerlab commented May 1, 2024

Yeah, could be. Frustrating.

@bauglir
Copy link

bauglir commented May 1, 2024

The recent issues may not be related to the original issue, but given that LERC-4.0.0+0 was released three hours ago, that seems like the most likely culprit given my experiments and the resulting log files for the recent reports.

The current issue is very easy to replicate, even on Julia v1.10.3, starting from a completely empty depot.

JULIA_DEPOT_PATH="$(mktemp -d)" julia --eval 'using Pkg' --eval 'Pkg.add("Plots")'

Results down the line in

Precompiling project...                                                                                                                  
  ✗ GR_jll                                           
  ✗ Plots                                                                                                                                
  ✗ Plots → UnitfulExt                                    
  145 dependencies successfully precompiled in 189 seconds                                                                               
  1 dependency had output during precompilation:     
┌ GR                                                  
│  ERROR: LoadError: InitError: could not load library "/tmp/tmp.mlvhqn2QeE/artifacts/e18a60e84fd8aefa967cb9f1d11dc6cbd9cac88b/lib/libtiff.so"
│  libLerc.so: cannot open shared object file: No such file or directory

PinningLERC_jll to v3.0.0 appears to resolve the issue, i.e. the following works

JULIA_DEPOT_PATH="$(mktemp -d)" julia --eval 'using Pkg' --eval 'Pkg.add([PackageSpec(; name="Plots"), PackageSpec(; name="LERC_jll", version="3.0.0")])'

This is all on Ubuntu (23.10) and some other Linux distros.

@SamuelBrand1
Copy link

SamuelBrand1 commented May 1, 2024

I think incompatibility with LERC-4 is the problem, this temporary fix works for me

@varnerlab
Copy link

Man, that was a nice catch, @bauglir and @SamuelBrand1. Confirm that downgrading LERC_jll v4.0.0+0 ⇒ v3.0.0+1 resolves the Plots.jl GR issue for me, and a similar set of precompile issues with ImageMagick that “magically" surfaced this morning.

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

No branches or pull requests

6 participants