Why doesn’t Repl.it’s Julia REPL recognize the GTK.jl package?
using Pkg
Pkg.add("Gtk")
using Gtk
gives an error
Why doesn’t Repl.it’s Julia REPL recognize the GTK.jl package?
using Pkg
Pkg.add("Gtk")
using Gtk
gives an error
I havent tried this, but I would imagine GTK needs a GUI, while repl.it is primarily a command line utility.
Would this stack track confirm your theory?
error during bootstrap:
LoadError("main.jl", 3, UndefVarError(:Pgk))
rec_backtrace at /buildworker/worker/package_linux64/build/src/stackwalk.c:94
record_backtrace at /buildworker/worker/package_linux64/build/src/task.c:217 [inlined]
jl_throw at /buildworker/worker/package_linux64/build/src/task.c:417
jl_undefined_var_error at /buildworker/worker/package_linux64/build/src/rtutils.c:130
jl_eval_global_var at /buildworker/worker/package_linux64/build/src/interpreter.c:346 [inlined]
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:392
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:322
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:411
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:362 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:773
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:885
Interpreter frame (ip: 0)
Core.CodeInfo(code=Array{Any, (3,)}[
Expr(:call, Base.getproperty, :Pgk, :(:add)),
Expr(:call, SSAValue(1), "Gtk"),
Expr(:return, SSAValue(2))], codelocs=Array{Int32, (3,)}[1, 1, 1], method_for_inference_limit_heuristics=nothing, ssavaluetypes=3, linetable=Array{Any, (1,)}[Core.LineInfoNode(mod=Main, method=Symbol("top-level scope"), file=:none, line=0, inlined_at=0)], ssaflags=Array{UInt8, (0,)}[], slotflags=Array{UInt8, (0,)}[], slotnames=Array{Any, (0,)}[], inferred=false, inlineable=false, propagate_inbounds=false, pure=false)jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:894
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:764
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:883
jl_load at /buildworker/worker/package_linux64/build/src/toplevel.c:826
exec_program at /gocode/src/github.com/replit/prybar/languages/julia/pry.h:48
runtime.asmcgocall at /usr/lib/go-1.10/src/runtime/asm_amd64.s:688
The error looks like Pkg
was misspelled as Pgk
in main.jl.
Haha my mistake. This is what I meant (stack trace after loading the GTK package and trying to precompile with ‘using Gtk’: @avik
ERROR: LoadError: Failed to precompile Graphics [a2bd30eb-e257-
5431-a919-1863eab51364] to /home/runner/.julia/compiled/v1.1/Gr
aphics/DwlUf.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1197
[3] _require(::Base.PkgId) at ./loading.jl:960
[4] require(::Base.PkgId) at ./loading.jl:858
[5] require(::Module, ::Symbol) at ./loading.jl:853
[6] include at ./boot.jl:326 [inlined] [7] include_relative(::Module, ::String) at ./loading.jl:1038
[8] include(::Module, ::String) at ./sysimg.jl:29 [9] top-level scope at none:2
[10] eval at ./boot.jl:328 [inlined] [11] eval(::Expr) at ./client.jl:404
[12] top-level scope at ./none:3in expression starting at /home/runner/.julia/packages/Gtk/mVhm
L/src/Gtk.jl:27
error during bootstrap:LoadError("main.jl", 1, ErrorException("Failed to precompile Gt
k [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44] to /home/runner/.julia/compiled/v1.1/Gtk/Vjnq0.ji."))
rec_backtrace at /buildworker/worker/package_linux64/build/src/
stackwalk.c:94record_backtrace at /buildworker/worker/package_linux64/build/s
rc/task.c:217 [inlined]
jl_throw at /buildworker/worker/package_linux64/build/src/task.
c:417
error at ./error.jl:33
compilecache at ./loading.jl:1197
_require at ./loading.jl:960
require at ./loading.jl:858
require at ./loading.jl:853
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2219
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1571 [inlined]
call_require at /buildworker/worker/package_linux64/build/src/toplevel.c:397 [inlined]
eval_import_path at /buildworker/worker/package_linux64/build/src/toplevel.c:432
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:630
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:883
jl_load at /buildworker/worker/package_linux64/build/src/toplevel.c:826
exec_program at /gocode/src/github.com/replit/prybar/languages/julia/pry.h:48
runtime.asmcgocall at /usr/lib/go-1.10/src/runtime/asm_amd64.s:688
I’m not familiar with repl.it, but when I use the Julia 1.1 interpreter there, the first thing that fails while adding Gtk
is precompiling its dependency Cairo
, iirc it tries to install version 0.6 (which is quite old). This may cause the subsequent errors in the Graphics
or Gtk
precompilation.
Is there a way to install Julia1.3 there and try again?