JuliaDebug / Gallium.jl

The Julia debugger
Other
174 stars 23 forks source link

On Windows, Gallium fails to precompile #113

Closed josefsachsconning closed 8 years ago

josefsachsconning commented 8 years ago

Using master branch of Julia and Gallium and its dependencies.

C:\Users\s2sajs>C:\cygwin64\home\s2sajs\julia-master\usr\bin\julia.exe
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+4370 (2016-05-27 21:34 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 758aebc (0 days old master)
|__/                   |  x86_64-w64-mingw32

julia> using Gallium
INFO: Precompiling module Gallium...
WARNING: isless(x::Char,y::Integer) is deprecated, use UInt32(x) < y instead.
 in depwarn(::String, ::Symbol) at .\deprecated.jl:64
 in isless(::Char, ::UInt8) at .\deprecated.jl:50
 in is_identifier_start_char(::Char) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\lexer.jl:262
 in next_token(::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::Bool) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\lexer.jl:846
 in peek_token(::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::Bool) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\lexer.jl:882
 in parse_Nary(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.##4#5, ::Set{Char}, ::Symbol, ::Set{Symbol}, ::Bool, ::Void) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:333
 in parse_resword(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Tokens.Token, ::Void) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:1113
 in parse_call(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:691
 in parse_decl(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:561
 in parse_factorh(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.#parse_decl, ::Set{Symbol}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:584
 in parse_unary(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:621
 in parse_with_chains(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.#parse_rational, ::Set{Symbol}, ::Symbol) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:206 (repeats 2 times)
 in parse_range(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:503
 in parse_comparison(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::Set{Symbol}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:457
 in parse_and at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:426 [inlined]
 in parse_RtoL(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.#parse_and, ::Set{Symbol}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:239
 in parse_or(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:417
 in parse_RtoL(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.#parse_or, ::Set{Symbol}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:239
 in parse_arrow(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:431
 in parse_cond(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:270
 in parse_Nary(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.#parse_cond, ::Set{Char}, ::Symbol, ::Set{Any}, ::Bool, ::Void) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:310
 in parse_eq at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:399 [inlined]
 in parse_docstring(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.#parse_eq) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:2106
 in parse_Nary(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.##1#2, ::Set{Char}, ::Symbol, ::Set{Char}, ::Bool, :Void) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:310
 in parse_stmts(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:367
 in #parse#24(::JuliaParser.Parser.#parse_stmts, ::Function, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:2141
 in _precompile_() at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\precompile.jl:7
 in include_from_node1(::String) at .\loading.jl:426
 in macro expansion; at .\none:2 [inlined]
 in anonymous at .\<missing>:?
 in eval(::Module, ::Any) at .\boot.jl:225
 in process_options(::Base.JLOptions) at .\client.jl:243
 in _start() at .\client.jl:322
while loading C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\JuliaParser.jl, in expression starting on line 12
ERROR: LoadError: JuliaParser.Diagnostics.Diagnostic(JuliaParser.Diagnostics.Message[JuliaParser.Diagnostics.Message(:error,JuliaParser.Tokens.SourceRange(0xffffffff,0x0000ffff,0xff),"invalid character \"\r\"")])
 in next_token(::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::Bool) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\lexer.jl:853
 in peek_token(::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::Bool) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\lexer.jl:882
 in parse_Nary(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.##4#5, ::Set{Char}, ::Symbol, ::Set{Symbol}, ::Bool, ::Void) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:333
 in parse_resword(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Tokens.Token, ::Void) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:1113
 in parse_call(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:691
 in parse_decl(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:561
 in parse_factorh(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.#parse_decl, :Set{Symbol}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:584
 in parse_unary(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:621
 in parse_with_chains(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.#parse_rational, ::Set{Symbol}, ::Symbol) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:206 (repeats 2 times)
 in parse_range(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:503
 in parse_comparison(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::Set{Symbol}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:457
 in parse_and at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:426 [inlined]
 in parse_RtoL(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.#parse_and, ::Set{Symbol}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:239
 in parse_or(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:417
 in parse_RtoL(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.#parse_or, ::Set{Symbol}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:239
 in parse_arrow(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:431
 in parse_cond(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:270
 in parse_Nary(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.#parse_cond, ::Set{Char}, ::Symbol, ::Set{Any}, ::Bool, ::Void) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:310
 in parse_eq at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:399 [inlined]
 in parse_docstring(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.#parse_eq) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:2106
 in parse_Nary(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}, ::JuliaParser.Parser.##1#2, ::Set{Char}, ::Symbol, ::Set{Char}, ::Bool, ::Void) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:310
 in parse_stmts(::JuliaParser.Parser.ParseState, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:367
 in #parse#24(::JuliaParser.Parser.#parse_stmts, ::Function, ::JuliaParser.Lexer.TokenStream{JuliaParser.Tokens.Token}) at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\parser.jl:2141
 in _precompile_() at C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\precompile.jl:7
 in include_from_node1(::String) at .\loading.jl:426
 in macro expansion; at .\none:2 [inlined]
 in anonymous at .\<missing>:?
 in eval(::Module, ::Any) at .\boot.jl:225
 in process_options(::Base.JLOptions) at .\client.jl:243
 in _start() at .\client.jl:322
while loading C:\Users\s2sajs\.julia\v0.5\JuliaParser\src\JuliaParser.jl, in expression starting on line 12
ERROR: LoadError: Failed to precompile JuliaParser to C:\Users\s2sajs\.julia\lib\v0.5\JuliaParser.ji
 in compilecache(::String) at .\loading.jl:505
 in require(::Symbol) at .\loading.jl:337
 in include_from_node1(::String) at .\loading.jl:426
 in macro expansion; at .\none:2 [inlined]
 in anonymous at .\<missing>:?
 in eval(::Module, ::Any) at .\boot.jl:225
 in process_options(::Base.JLOptions) at .\client.jl:243
 in _start() at .\client.jl:322
while loading C:\Users\s2sajs\.julia\v0.5\ASTInterpreter\src\ASTInterpreter.jl, in expression starting on line 8
ERROR: LoadError: Failed to precompile ASTInterpreter to C:\Users\s2sajs\.julia\lib\v0.5\ASTInterpreter.ji
 in compilecache(::String) at .\loading.jl:505
 in require(::Symbol) at .\loading.jl:337
 in include_from_node1(::String) at .\loading.jl:426
 in macro expansion; at .\none:2 [inlined]
 in anonymous at .\<missing>:?
 in eval(::Module, ::Any) at .\boot.jl:225
 in process_options(::Base.JLOptions) at .\client.jl:243
 in _start() at .\client.jl:322
while loading C:\Users\s2sajs\.julia\v0.5\Gallium\src\Gallium.jl, in expression starting on line 3
ERROR: Failed to precompile Gallium to C:\Users\s2sajs\.julia\lib\v0.5\Gallium.ji
 in compilecache(::String) at .\loading.jl:505
 in require(::Symbol) at .\loading.jl:364
 in eval(::Module, ::Any) at .\boot.jl:225
 in macro expansion at .\REPL.jl:92 [inlined]
 in (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at .\event.jl:46
Keno commented 8 years ago

Did you check out things with Windows file extensions accidentally.

josefsachsconning commented 8 years ago

Not sure what you mean. With no .julia/v0.5 directory, I did:

Pkg.add("Gallium")
Pkg.checkout("Reactive")
Pkg.checkout("ObjFileBase")
Pkg.checkout("StructIO")
Pkg.checkout("AbstractTrees")
Pkg.checkout("DWARF")
Pkg.checkout("ELF")
Pkg.checkout("MachO")
Pkg.clone("https://github.com/Keno/COFF.jl")
Pkg.checkout("TerminalUI")
Pkg.checkout("ASTInterpreter")
Pkg.checkout("VT100")
Pkg.checkout("JuliaParser")
Pkg.checkout("Gallium")
using Gallium

and got the previously posted output.

Keno commented 8 years ago

It looks like the package got checked out with \r\n file endings rather than \n file endings.

josefsachsconning commented 8 years ago

Isn't \r\n the expected line ending on Windows?

Keno commented 8 years ago

JuliaParser should probably be fixed to handle this case, but it is convention to leave file endings as is for cross-os files.

josefsachsconning commented 8 years ago

Is there something I can do to configure the Julia package manager or git to use \n line ending?

Keno commented 8 years ago

Not sure. It has the proper line endings on my windows machine. I can take a look at JuliaParser tomorrow though and make it robust against this case.

josefsachsconning commented 8 years ago

After I do

git config --global core.eol lf
git config --global core.autocrlf input

and reinstall packages, Gallium precompiles successfully.

josefsachsconning commented 8 years ago

After changing back my git configuration and reinstalling packages, I get

C:\Users\s2sajs>C:\cygwin64\home\s2sajs\julia-master\usr\bin\julia.exe
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+4374 (2016-05-28 19:50 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 6591216 (0 days old master)
|__/                   |  x86_64-w64-mingw32

julia> using Gallium
INFO: Precompiling module Gallium...

WARNING: deprecated syntax "call(::Type{ObjFileBase.StrTab}, ...)".
Use "(::Type{ObjFileBase.StrTab})(...)" instead.
ERROR: LoadError: too many parameters for type Sections
 in include_from_node1(::String) at .\loading.jl:426
 in macro expansion; at .\none:2 [inlined]
 in anonymous at .\<missing>:?
 in eval(::Module, ::Any) at .\boot.jl:225
 in process_options(::Base.JLOptions) at .\client.jl:243
 in _start() at .\client.jl:322
while loading C:\Users\s2sajs\.julia\v0.5\ELF\src\ELF.jl, in expression starting on line 458
ERROR: LoadError: Failed to precompile ELF to C:\Users\s2sajs\.julia\lib\v0.5\ELF.ji
 in compilecache(::String) at .\loading.jl:505
 in require(::Symbol) at .\loading.jl:337
 in include_from_node1(::String) at .\loading.jl:426
 in macro expansion; at .\none:2 [inlined]
 in anonymous at .\<missing>:?
 in eval(::Module, ::Any) at .\boot.jl:225
 in process_options(::Base.JLOptions) at .\client.jl:243
 in _start() at .\client.jl:322
while loading C:\Users\s2sajs\.julia\v0.5\Gallium\src\Gallium.jl, in expression starting on line 7
ERROR: Failed to precompile Gallium to C:\Users\s2sajs\.julia\lib\v0.5\Gallium.ji
 in compilecache(::String) at .\loading.jl:505
 in require(::Symbol) at .\loading.jl:364
 in eval(::Module, ::Any) at .\boot.jl:225
 in macro expansion at .\REPL.jl:92 [inlined]
 in (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at .\event.jl:46
Keno commented 8 years ago

Outdated ELF package?

josefsachsconning commented 8 years ago

Pkg.update() did not report updating ELF.

julia> Pkg.status("ELF")
 - ELF                           0.0.2+             master
Keno commented 8 years ago

ObjFileBase then maybe? Looks like you may not have https://github.com/Keno/ObjFileBase.jl/commit/27354db5b72bd0103f9f4cde4e67d109fa990d89

josefsachsconning commented 8 years ago

Yes, I neglected to Pkg.checkout("ObjFileBase"). Sorry for the confusion.