Gtk.jl
fails to precompile with julia v1.7.0-beta2
. This is under Windows (Win10) and Linux (OpenSUSE Leap 15.2).
In both systems, I have a clean install, with the addition of Gtk
:
(@v1.7) pkg> st
Status `C:\Users\xxx\.julia\environments\v1.7\Project.toml`
[4c0ca9eb] Gtk v1.1.7
I’ve been using the same version of Gtk
with Julia v1.6.1
, and can still do so. While the errors are almost certainly a result of changes in Julia, I don’t know whether that means there’s and error with Julia, or whether Gtk
will need to be modified to adapt.
I’m happy to report to Julia directly, or to Gtk.jl
, but don’t understand the problem well enough to know which is more appropriate.
Details of the output from precompilation follow:
All dependent packages of Gtk precompile successfully. If I then run
using Pkg(); Pkg.precompile()
the output is
Precompiling project...
✗ Gtk
0 dependencies successfully precompiled in 21 seconds (74 already precompiled)
ERROR: The following 1 direct dependency failed to precompile:
Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44]
Failed to precompile Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44] to C:\Users\xxx\.julia\compiled\v1.7\Gtk\jl_7ACB.tmp.
ERROR: LoadError: TypeError: in ccall method definition, expected Type, got a value of type TypeVar
Stacktrace:
[1] top-level scope
@ C:\Users\xxx\.julia\packages\Gtk\3TfRG\src\GLib\signals.jl:331
[2] include(mod::Module, _path::String)
@ Base .\Base.jl:417
[3] include(x::String)
@ Gtk.GLib C:\Users\xxx\.julia\packages\Gtk\3TfRG\src\GLib\GLib.jl:1
[4] top-level scope
@ C:\Users\xxx\.julia\packages\Gtk\3TfRG\src\GLib\GLib.jl:62
[5] include(mod::Module, _path::String)
@ Base .\Base.jl:417
[6] include(x::String)
@ Gtk C:\Users\xxx\.julia\packages\Gtk\3TfRG\src\Gtk.jl:2
[7] top-level scope
@ C:\Users\xxx\.julia\packages\Gtk\3TfRG\src\Gtk.jl:17
[8] include
@ .\Base.jl:417 [inlined]
[9] 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
[10] top-level scope
@ none:1
[11] eval
@ .\boot.jl:373 [inlined]
[12] eval(x::Expr)
@ Base.MainInclude .\client.jl:453
[13] top-level scope
@ none:1
in expression starting at C:\Users\xxx\.julia\packages\Gtk\3TfRG\src\GLib\signals.jl:331
in expression starting at C:\Users\xxx\.julia\packages\Gtk\3TfRG\src\GLib\GLib.jl:1
in expression starting at C:\Users\xxx\.julia\packages\Gtk\3TfRG\src\Gtk.jl:2
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\Pkg\src\Types.jl:68
[2] precompile(ctx::Pkg.Types.Context; internal_call::Bool, strict::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\Pkg\src\API.jl:1352
[3] precompile
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\Pkg\src\API.jl:1006 [inlined]
[4] #precompile#220
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\Pkg\src\API.jl:1004 [inlined]
[5] precompile()
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\Pkg\src\API.jl:1004
[6] top-level scope
@ REPL[4]:1
The function at line 331 of signals.jl is
function uv_dispatch(src::Ptr{Nothing}, callback::Ptr{Nothing}, data::T) where T
return ccall(callback, Cint, (T,), data)
end
I don’t know whether it’s relevant, but the only reference to the function name in the package is later in the same file:
@cfunction(uv_dispatch, Cint, (Ptr{Nothing}, Ptr{Nothing}, Int))