Gtk.jl icon indicating copy to clipboard operation
Gtk.jl copied to clipboard

Precompilation fails on Julia master

Open Cody-G opened this issue 8 years ago • 9 comments

Error message:

julia> using Gtk
INFO: Precompiling module Gtk.
ERROR: LoadError: LoadError: LoadError: syntax: malformed expression
Stacktrace:
 [1] include_relative(::Module, ::String) at ./loading.jl:464
 [2] include at ./sysimg.jl:14 [inlined]
 [3] include(::String) at /home/cody/.julia/v0.7/Gtk/src/GLib/GLib.jl:1
 [4] include_relative(::Module, ::String) at ./loading.jl:464
 [5] include at ./sysimg.jl:14 [inlined]
 [6] include(::String) at /home/cody/.julia/v0.7/Gtk/src/Gtk.jl:3
 [7] include_relative(::Module, ::String) at ./loading.jl:464
 [8] include(::Module, ::String) at ./sysimg.jl:14
 [9] anonymous at ./<missing>:2
while loading /home/cody/.julia/v0.7/Gtk/src/GLib/../../deps/ext_glib.jl, in expression starting on line 9
while loading /home/cody/.julia/v0.7/Gtk/src/GLib/GLib.jl, in expression starting on line 66
while loading /home/cody/.julia/v0.7/Gtk/src/Gtk.jl, in expression starting on line 8
ERROR: Failed to precompile Gtk to /home/cody/.julia/lib/v0.7/Gtk.ji.
Stacktrace:
 [1] compilecache(::String) at ./loading.jl:598
 [2] _require(::Symbol) at ./loading.jl:407
 [3] require(::Symbol) at ./loading.jl:318

Cody-G avatar Aug 25 '17 16:08 Cody-G

yes Gtk.jl is not ready working on Julia master

tknopp avatar Aug 25 '17 19:08 tknopp

it seems an issue with

    macro assign_if_unassigned(expr)
        # BinDeps often fails and generates corrupt deps.jl files
        # (https://github.com/JuliaLang/BinDeps.jl/issues/146),
        # but most of the time, we don't care
        @assert expr.head === :(=)
        left = expr.args[1]
        right = expr.args[2]
        quote
            if !isdefined(current_module(), $(QuoteNode(left)))
                global const $(esc(left)) = $(esc(right))
            end
        end
    end

@vtjnash: Do you have an idea?

tknopp avatar Oct 19 '17 12:10 tknopp

Looks like a julia bug. Minimal example:

macro m()
  :(global $(esc(:x)) = 1)
end
julia> @m
ERROR: syntax: malformed expression

Not sure if related, but this also happens:

julia> @macroexpand @m

signal (11): Segmentation fault
in expression starting at no file:0
htable_new at /home/fabio/Source/Git/Languages/julia/src/support/htable.c:34
builtin_arg_counts at /home/fabio/Source/Git/Languages/julia/usr/bin/../lib/libjulia.so.0.7 (unknown line)
Allocations: 1409765 (Pool: 1409463; Big: 302); GC: 2
[1]    3265 segmentation fault  julia

fcard avatar Oct 20 '17 22:10 fcard

@fcard: Great, could you please report this issue in at the Julia repo?

tknopp avatar Oct 24 '17 11:10 tknopp

(with a crosslink to this Gtk issue)

tknopp avatar Oct 24 '17 11:10 tknopp

I made an issue already, and there is a fix on the way.

~I didn't mention this there but I was already planning to report back as soon as the PR was merged.~ I made the crossref.

fcard avatar Oct 24 '17 12:10 fcard

thanks!

tknopp avatar Oct 24 '17 14:10 tknopp

This bug in particular is now fixed on master, but precompilation still doesn't work.

fcard avatar Oct 25 '17 21:10 fcard

#331 has more stuff in it.

timholy avatar Oct 26 '17 00:10 timholy