Skip to content
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

Precompilation fails on 32-bit Julia 1.9 #524

Closed
ThatcherC opened this issue Dec 27, 2023 · 0 comments · Fixed by #525
Closed

Precompilation fails on 32-bit Julia 1.9 #524

ThatcherC opened this issue Dec 27, 2023 · 0 comments · Fixed by #525

Comments

@ThatcherC
Copy link

I'm having an issue where I can't add Cthulhu to an environment in the Julia 1.9 32-bit version (1.9~x86 channel on juliaup). It seems like it's the precompilation step that's failing. I've copied the results from trying to add and precompile Cthulhu down below.

For context, I'm hoping to use Cthulhu to resolve a type issue I encountered while trying to use GPUCompiler to compile a function down to WASM based on the approached taken by @Alexander-Barth's FluidSimDemo-WebAssembly -- that's the only reason I'm using the 32-bit x86 release. I think Cthulhu is exactly the tool I need to track down this other type issue so I hope there's a way to get it to work on the x86 release!

Here's the error I'm seeing:

$ julia +1.9~x86
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.4 (2023-11-14)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.9) pkg> add Cthulhu
   Resolving package versions...
    Updating `~/.julia/environments/v1.9/Project.toml`
  [f68482b8] + Cthulhu v2.10.0
    Updating `~/.julia/environments/v1.9/Manifest.toml`
  [da1fd8a2] + CodeTracking v1.3.5
  [f68482b8] + Cthulhu v2.10.0
  [1eca21be] + FoldingTrees v1.2.1
  [70703baa] + JuliaSyntax v0.4.8
  [d265eb64] + TypedSyntax v1.2.3
  [b8c1c048] + WidthLimitedIO v1.0.1
Precompiling project...
  ✗ Groebner
  ✗ Symbolics
  0 dependencies successfully precompiled in 53 seconds. 370 already precompiled. 1 skipped during auto due to previous errors.
  2 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

(@v1.9) pkg> precompile Cthulhu
Precompiling Cthulhu
  ✗ Cthulhu
  0 dependencies successfully precompiled in 13 seconds. 8 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

Cthulhu [f68482b8-f384-11e8-15f7-abe071a5a75f]

Failed to precompile Cthulhu [f68482b8-f384-11e8-15f7-abe071a5a75f] to "/home/thatch/.julia/compiled/v1.9/Cthulhu/jl_IeLsVq".
ERROR: LoadError: MethodError: no method matching show_src_expr(::IOContext{IOBuffer}, ::JuliaSyntax.TreeNode{TypedSyntax.TypedSyntaxData}, ::UInt32, ::String, ::String; type_annotations::Bool, iswarn::Bool, hide_type_stable::Bool, nd::Int32)

Closest candidates are:
  show_src_expr(::IO, ::Union{JuliaSyntax.TreeNode{TypedSyntax.TypedSyntaxData}, JuliaSyntax.SyntaxNode}, ::Int32, ::String, ::String; type_annotations, iswarn, hide_type_stable, nd)
   @ TypedSyntax ~/.julia/packages/TypedSyntax/LVzdW/src/show.jl:66

Stacktrace:
  [1] show_src_expr(io::IOContext{IOBuffer}, node::JuliaSyntax.TreeNode{TypedSyntax.TypedSyntaxData}, position::Int32, pre::String, pre2::String; type_annotations::Bool, iswarn::Bool, hide_type_stable::Bool, nd::Int32) (repeats 2 times)
    @ TypedSyntax ~/.julia/packages/TypedSyntax/LVzdW/src/show.jl:80
  [2] show_src_expr
    @ ~/.julia/packages/TypedSyntax/LVzdW/src/show.jl:66 [inlined]
  [3] printstyled(io::IOContext{IOBuffer}, rootnode::JuliaSyntax.TreeNode{TypedSyntax.TypedSyntaxData}; type_annotations::Bool, iswarn::Bool, hide_type_stable::Bool, with_linenumber::Bool, idxend::Int32)
    @ TypedSyntax ~/.julia/packages/TypedSyntax/LVzdW/src/show.jl:46
  [4] cthulhu_typed(io::IOContext{IOBuffer}, debuginfo::Symbol, src::Core.CodeInfo, rt::Any, effects::Core.Compiler.Effects, mi::Core.MethodInstance; iswarn::Bool, hide_type_stable::Bool, optimize::Bool, pc2remarks::Nothing, pc2effects::Nothing, inline_cost::Bool, type_annotations::Bool, annotate_source::Bool, inlay_types_vscode::Bool, diagnostics_vscode::Bool, jump_always::Bool, interp::Cthulhu.CthulhuInterpreter)
    @ Cthulhu ~/.julia/packages/Cthulhu/O1Xhq/src/codeview.jl:168
  [5] cthulhu_typed(::IOContext{IOBuffer}, ::Cthulhu.DInfo.DebugInfo, ::Core.CodeInfo, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Any, NTuple{12, Symbol}, NamedTuple{(:iswarn, :optimize, :hide_type_stable, :pc2remarks, :pc2effects, :inline_cost, :type_annotations, :annotate_source, :inlay_types_vscode, :diagnostics_vscode, :jump_always, :interp), Tuple{Bool, Bool, Bool, Nothing, Nothing, Bool, Bool, Bool, Bool, Bool, Bool, Cthulhu.CthulhuInterpreter}}})
    @ Cthulhu ~/.julia/packages/Cthulhu/O1Xhq/src/codeview.jl:121
  [6] (::Cthulhu.var"#96#103"{Cthulhu.CthulhuInterpreter, Cthulhu.DInfo.DebugInfo, Core.CodeInfo, Core.CodeInfo, DataType, Core.MethodInstance, Bool, Bool, Nothing, Nothing, Bool, Bool})(lambda_io::IOContext{IOBuffer})
    @ Cthulhu ~/.julia/packages/Cthulhu/O1Xhq/src/Cthulhu.jl:489
  [7] stringify(f::Any, context::IOContext{Base.DevNull})
    @ Cthulhu ~/.julia/packages/Cthulhu/O1Xhq/src/ui.jl:90
  [8] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, curs::Cthulhu.CthulhuCursor; override::Nothing, debuginfo::Symbol, optimize::Bool, interruptexc::Bool, iswarn::Bool, hide_type_stable::Bool, verbose::Nothing, remarks::Bool, with_effects::Bool, inline_cost::Bool, type_annotations::Bool, annotate_source::Bool, inlay_types_vscode::Bool, diagnostics_vscode::Bool, jump_always::Bool)
    @ Cthulhu ~/.julia/packages/Cthulhu/O1Xhq/src/Cthulhu.jl:488
  [9] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, mi::Core.MethodInstance; kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:iswarn,), Tuple{Bool}}})
    @ Cthulhu ~/.julia/packages/Cthulhu/O1Xhq/src/Cthulhu.jl:749
 [10] _descend(term::REPL.Terminals.TTYTerminal, args::Any; interp::Core.Compiler.NativeInterpreter, kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:iswarn,), Tuple{Bool}}})
    @ Cthulhu ~/.julia/packages/Cthulhu/O1Xhq/src/Cthulhu.jl:765
 [11] __descend_with_error_handling(args::Any; terminal::Any, kwargs::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
    @ Cthulhu ~/.julia/packages/Cthulhu/O1Xhq/src/Cthulhu.jl:213
 [12] _descend_with_error_handling(f::Any, argtypes::Any; kwargs::Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:iswarn, :terminal), Tuple{Bool, REPL.Terminals.TTYTerminal}}})
    @ Cthulhu ~/.julia/packages/Cthulhu/O1Xhq/src/Cthulhu.jl:202
 [13] descend_code_typed(::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, REPL.Terminals.TTYTerminal, Tuple{Symbol}, NamedTuple{(:terminal,), Tuple{REPL.Terminals.TTYTerminal}}})
    @ Cthulhu ~/.julia/packages/Cthulhu/O1Xhq/src/Cthulhu.jl:160
 [14] macro expansion
    @ ~/.julia/packages/Cthulhu/O1Xhq/src/Cthulhu.jl:841 [inlined]
 [15] macro expansion
    @ ~/.julia/packages/PrecompileTools/kmH5L/src/workloads.jl:78 [inlined]
 [16] macro expansion
    @ ~/.julia/packages/Cthulhu/O1Xhq/src/Cthulhu.jl:840 [inlined]
 [17] top-level scope
    @ ~/.julia/packages/PrecompileTools/kmH5L/src/workloads.jl:140
 [18] include
    @ ./Base.jl:457 [inlined]
 [19] 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, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2049
 [20] top-level scope
    @ stdin:3
in expression starting at /home/thatch/.julia/packages/Cthulhu/O1Xhq/src/Cthulhu.jl:1
in expression starting at stdin:3

(@v1.9) pkg> 

Seems to run just fine on 1.9 and 1.10 (64-bit) on my computer so it seems like this is a 32-bit-specific problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant