Skip to content

Invalid bitcast and LLVM ERROR: Broken function found, compilation aborted! when including PyCall in system image #31473

Open
@tkf

Description

I'm trying to make PyCall.jl compatible with PackageCompiler.jl in JuliaPy/PyCall.jl#651. This branch itself has been working. You can check it with

julia -e 'using Pkg; pkg"dev PyCall"'
cd ~/.julia/dev/PyCall/
git remote add -f tkf https://github.com/tkf/PyCall.jl
# git checkout -b aot tkf/aot
git checkout -b aot 65eb0c04453420946c6e33d24d885f1cfa7578d0
aot/compile.jl --color=yes

However, merging JuliaPy/PyCall.jl#668

git merge --no-edit v1.91.0
aot/compile.jl --color=yes

breaks AOT-compilation with the following error (sandwiched by some logging messages and a stacktrace):

Invalid bitcast
  %56 = bitcast i64 %55 to %jl_value_t addrspace(64)*, !dbg !413904
LLVM ERROR: Broken function found, compilation aborted!

(Here is an example of the full output: https://travis-ci.org/JuliaPy/PyCall.jl/jobs/511050638#L761-L763)

Does this mean there is a function in JuliaPy/PyCall.jl#668 that invokes a bug in Julia compiler? How do I debug more?

cc: @stevengj

Metadata

Assignees

No one assigned

    Labels

    external dependenciesInvolves LLVM, OpenBLAS, or other linked libraries

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions