-
-
Notifications
You must be signed in to change notification settings - Fork 358
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] Plots fails to precompile on OSX (Ventura). #4478
Comments
How did you start julia. Is there a difference if you start from the terminal or launch it via spotlight? |
I used iTerm and VSCode Terminal. Does spotlight mean I have the same problem when I run it via Test source code : using Pkg
Pkg.add("Plots")
using Plots
plot(rand(10)) VSCode Teminal (Julia REPL (v1.8.2)) Result [ Info: Precompiling VSCodeServer [9f5989ce-84fe-42d4-91ec-6a7a8d53ed0f]
┌ Warning: could not download https://pkg.julialang.org/registries
│ exception = HTTP/2 301 (Failed to connect to kr.pkg.julialang.org port 443 after 15477 ms: Operation timed out) while requesting https://pkg.julialang.org/registries
└ @ Pkg.Registry /private/tmp/julia-20220930-9489-ug3z2b/julia-1.8.2/usr/share/julia/stdlib/v1.8/Pkg/src/Registry/Registry.jl:68
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
No Changes to `~/.julia/environments/v1.8/Project.toml`
No Changes to `~/.julia/environments/v1.8/Manifest.toml`
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
GKS: dlopen(/workspace/destdir/lib/cairoplugin.so, 0x0001): tried: '/workspace/destdir/lib/cairoplugin.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/workspace/destdir/lib/cairoplugin.so' (no such file), '/workspace/destdir/lib/cairoplugin.so' (no such file)
ERROR: LoadError: SystemError: opening file "/var/folders/qp/h1pj2ff17pj9_c1vzzygktk00000gn/T/jl_HSDiTW1wjK.png": No such file or directory
Stacktrace:
[1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
@ Base ./error.jl:176
[2] #systemerror#80
@ ./error.jl:175 [inlined]
[3] systemerror
@ ./error.jl:175 [inlined]
[4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing)
@ Base ./iostream.jl:293
[5] open
@ ./iostream.jl:275 [inlined]
[6] open(f::Base.var"#387#388"{String}, args::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base ./io.jl:382
[7] open
@ ./io.jl:381 [inlined]
[8] read
@ ./io.jl:462 [inlined]
[9] _show(io::IOStream, #unused#::MIME{Symbol("image/png")}, plt::Plots.Plot{Plots.GRBackend})
@ Plots ~/.julia/packages/Plots/4UTBj/src/backends/gr.jl:2180
[10] #invokelatest#2
@ ./essentials.jl:729 [inlined]
[11] invokelatest
@ ./essentials.jl:726 [inlined]
[12] show
@ ~/.julia/packages/Plots/4UTBj/src/output.jl:237 [inlined]
[13] #319
@ ~/.julia/packages/Plots/4UTBj/src/output.jl:6 [inlined]
[14] open(::Plots.var"#319#320"{Plots.Plot{Plots.GRBackend}}, ::String, ::Vararg{String}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base ./io.jl:384
[15] open
@ ./io.jl:381 [inlined]
[16] png(plt::Plots.Plot{Plots.GRBackend}, fn::String)
@ Plots ~/.julia/packages/Plots/4UTBj/src/output.jl:6
[17] savefig(plt::Plots.Plot{Plots.GRBackend}, fn::String)
@ Plots ~/.julia/packages/Plots/4UTBj/src/output.jl:149
[18] var"##1#313"()
@ Plots ~/.julia/packages/Plots/4UTBj/src/precompile.jl:21
[19] top-level scope
@ ~/.julia/packages/Plots/4UTBj/src/precompile.jl:26
[20] eval
@ ./boot.jl:368 [inlined]
[21] eval
@ ~/.julia/packages/Plots/4UTBj/src/Plots.jl:1 [inlined]
[22] _broadcast_getindex_evalf
@ ./broadcast.jl:670 [inlined]
[23] _broadcast_getindex
@ ./broadcast.jl:643 [inlined]
[24] getindex
@ ./broadcast.jl:597 [inlined]
[25] copy(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, typeof(Plots.eval), Tuple{Vector{Expr}}})
@ Base.Broadcast ./broadcast.jl:899
[26] materialize
@ ./broadcast.jl:860 [inlined]
[27] macro expansion
@ ~/.julia/packages/Plots/4UTBj/src/precompile.jl:33 [inlined]
[28] macro expansion
@ ~/.julia/packages/SnoopPrecompile/UWvXF/src/SnoopPrecompile.jl:51 [inlined]
[29] (::Plots.var"#634#635")()
@ Plots ~/.julia/packages/Plots/4UTBj/src/precompile.jl:30
[30] withenv(f::Plots.var"#634#635", keyvals::Pair{String, String})
@ Base ./env.jl:172
[31] macro expansion
@ ~/.julia/packages/Plots/4UTBj/src/precompile.jl:29 [inlined]
[32] macro expansion
@ ~/.julia/packages/SnoopPrecompile/UWvXF/src/SnoopPrecompile.jl:107 [inlined]
[33] top-level scope
@ ~/.julia/packages/Plots/4UTBj/src/precompile.jl:5
[34] include(mod::Module, _path::String)
@ Base ./Base.jl:419
[35] include(x::String)
@ Plots ~/.julia/packages/Plots/4UTBj/src/Plots.jl:1
[36] top-level scope
@ ~/.julia/packages/Plots/4UTBj/src/Plots.jl:204
[37] include
@ ./Base.jl:419 [inlined]
[38] 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:1554
[39] top-level scope
@ stdin:1
in expression starting at /Users/mogyak/.julia/packages/Plots/4UTBj/src/precompile.jl:4
in expression starting at /Users/mogyak/.julia/packages/Plots/4UTBj/src/Plots.jl:1
in expression starting at stdin:1
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /Users/mogyak/.julia/compiled/v1.8/Plots/jl_lUUaQX.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base ./loading.jl:1707
[3] compilecache
@ ./loading.jl:1651 [inlined]
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1337
[5] _require_prelocked(uuidkey::Base.PkgId)
@ Base ./loading.jl:1200
[6] macro expansion
@ ./loading.jl:1180 [inlined]
[7] macro expansion
@ ./lock.jl:223 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1144
[9] eval
@ ./boot.jl:368 [inlined]
[10] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1428
[11] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base ./essentials.jl:729
[12] invokelatest(::Any, ::Any, ::Vararg{Any})
@ Base ./essentials.jl:726
[13] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/eval.jl:233
[14] (::VSCodeServer.var"#66#70"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/eval.jl:157
[15] withpath(f::VSCodeServer.var"#66#70"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/repl.jl:249
[16] (::VSCodeServer.var"#65#69"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/eval.jl:155
[17] hideprompt(f::VSCodeServer.var"#65#69"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/repl.jl:38
[18] (::VSCodeServer.var"#64#68"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/eval.jl:126
[19] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:511
[20] with_logger
@ ./logging.jl:623 [inlined]
[21] (::VSCodeServer.var"#63#67"{VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/eval.jl:225
[22] #invokelatest#2
@ ./essentials.jl:729 [inlined]
[23] invokelatest(::Any)
@ Base ./essentials.jl:726
[24] macro expansion
@ ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
[25] (::VSCodeServer.var"#61#62")()
@ VSCodeServer ./task.jl:484 When run in terminal : mogyak ~/.julia/packages julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.8.2 (2022-09-29)
_/ |\__'_|_|_|\__'_| | Built by Homebrew (v1.8.2)
|__/ |
julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
GKS: dlopen(/workspace/destdir/lib/cairoplugin.so, 0x0001): tried: '/workspace/destdir/lib/cairoplugin.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/workspace/destdir/lib/cairoplugin.so' (no such file), '/workspace/destdir/lib/cairoplugin.so' (no such file)
ERROR: LoadError: SystemError: opening file "/var/folders/qp/h1pj2ff17pj9_c1vzzygktk00000gn/T/jl_JGtiVAbyXs.png": No such file or directory
Stacktrace:
[1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
@ Base ./error.jl:176
[2] #systemerror#80
[...] |
This is a low level I'm pretty sure you can reproduce the same bug with plain |
mogyak ~ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.8.2 (2022-09-29)
_/ |\__'_|_|_|\__'_| | Built by Homebrew (v1.8.2)
|__/ |
julia> using GR
julia> histogram(randn(100))
julia> savefig("test.png")
GKS: dlopen(/workspace/destdir/lib/cairoplugin.so, 0x0001): tried: '/workspace/destdir/lib/cairoplugin.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/workspace/destdir/lib/cairoplugin.so' (no such file), '/workspace/destdir/lib/cairoplugin.so' (no such file) It seems right. I will write an issue in Thank you. |
I can't reproduce this with rosetta on an m1 running ventura. Is this reproducible with the official build instead of the homebrew one? |
This issue was also discussed on discourse. https://discourse.julialang.org/t/plots-broken-on-macos-ventura/89386/14 Installing Julia directly from julialang.org (rather than homebrew) does not produce this error. |
I always install Julia from Julialang and I can't get GR or Plots to run on the latest version of MacOS Monterey. I also deleted by artifacts directory and did Pkg.instantiate(), which seemed to download and install all of the needed binary artifacts. Still no love. julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
ERROR: LoadError: InitError: UndefVarError: GR_jll not defined
Stacktrace:
[1] __init__()
@ GR.GRPreferences ~/.julia/packages/GR/uzy0J/src/preferences.jl:36
[2] _include_from_serialized(pkg::Base.PkgId, path::String, depmods::Vector{Any})
@ Base ./loading.jl:831
[3] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt64)
@ Base ./loading.jl:1039
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1315
[5] _require_prelocked(uuidkey::Base.PkgId)
@ Base ./loading.jl:1200
[6] macro expansion
@ ./loading.jl:1180 [inlined]
[7] macro expansion
@ ./lock.jl:223 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1144
[9] include(mod::Module, _path::String)
@ Base ./Base.jl:419
[10] include(x::String)
@ Plots ~/.julia/packages/Plots/jqILG/src/Plots.jl:1
[11] top-level scope
@ ~/.julia/packages/Plots/jqILG/src/Plots.jl:202
[12] include
@ ./Base.jl:419 [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::Nothing)
@ Base ./loading.jl:1554
[14] top-level scope
@ stdin:1
during initialization of module GRPreferences
in expression starting at /Users/lewislevin/.julia/packages/Plots/jqILG/src/backends/gr.jl:3
in expression starting at /Users/lewislevin/.julia/packages/Plots/jqILG/src/Plots.jl:1
in expression starting at stdin:1
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /Users/lewislevin/.julia/compiled/v1.8/Plots/jl_A4YMzW.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base ./loading.jl:1707
[3] compilecache
@ ./loading.jl:1651 [inlined]
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1337
[5] _require_prelocked(uuidkey::Base.PkgId)
@ Base ./loading.jl:1200
[6] macro expansion
@ ./loading.jl:1180 [inlined]
[7] macro expansion
@ ./lock.jl:223 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1144 |
This error is in no way related to OP's issue. |
Well, as I've reported on GR and Plots it was a downgrade caused by unrelated packages requiring obsolete versions of several packages in their manifests. It's at least a little bit related--it references a failure to pre-compile Plots. Chill. |
Details
I think it's a similar issue to #3800.
After updating the OS version(macOS Ventura 13.0(22A380)), it doesn't work.
I have confirmed that it works fine in Windows 10.
I'm getting an error with
using Plots
, so I'm posting an issue here.I got the following error:
I tried like the referenced issue:
brew uninstall julia
rm -rf ~/.julia
brew install julia
] add Plots
using Plots
Backends
This bug occurs on ( insert
x
below )Versions
Plots.jl version:
Backend version (
]st -m <backend(s)>
):Output of
versioninfo()
:The text was updated successfully, but these errors were encountered: