GithubHelp home page GithubHelp logo

Comments (3)

oikumene avatar oikumene commented on May 21, 2024

Building with llvm18, I got following stack trace:

[57107] signal 6 (65543): Abort trap
in expression starting at none:0
thr_kill at /lib/libc.so.7 (unknown line)
_raise at /lib/libc.so.7 (unknown line)
abort at /lib/libc.so.7 (unknown line)
_ZN4llvm18report_fatal_errorERKNS_5TwineEb.cold at /wrkdirs/usr/ports/lang/juli
a/work/julia-1.11.0-beta1/usr/bin/../lib/libjulia-internal.so.1.11 (unknown line)
_ZN4llvm18report_fatal_errorEPKcb at /wrkdirs/usr/ports/lang/julia/work/julia-1.11.0-beta1/usr/bin/../lib/libjulia-internal.so.1.11 (unknown line)
_ZN12_GLOBAL__N_117CommandLineParser9addOptionEPN4llvm2cl6OptionEPNS2_10SubCommandE at /wrkdirs/usr/ports/lang/julia/work/julia-1.11.0-beta1/usr/bin/../lib/libjulia-internal.so.1.11 (unknown line)
_ZN4llvm2cl6Option11addArgumentEv at /wrkdirs/usr/ports/lang/julia/work/julia-1.11.0-beta1/usr/bin/../lib/libjulia-internal.so.1.11 (unknown line)
_ZN4llvm12DebugCounter8instanceEv.part.0 at /wrkdirs/usr/ports/lang/julia/work/julia-1.11.0-beta1/usr/bin/../lib/libjulia-internal.so.1.11 (unknown line)
_ZN4llvm2cl20getRegisteredOptionsERNS0_10SubCommandE at /wrkdirs/usr/ports/lang/julia/work/julia-1.11.0-beta1/usr/bin/../lib/libjulia-internal.so.1.11 (unknown line)
jl_init_llvm at /wrkdirs/usr/ports/lang/julia/work/julia-1.11.0-beta1/src/codegen.cpp:9965
jl_init_codegen_impl at /wrkdirs/usr/ports/lang/julia/work/julia-1.11.0-beta1/src/codegen.cpp:10059
_finish_julia_init at /wrkdirs/usr/ports/lang/julia/work/julia-1.11.0-beta1/src/init.c:857
jl_repl_entrypoint at /wrkdirs/usr/ports/lang/julia/work/julia-1.11.0-beta1/src/jlapi.c:1053
main at /wrkdirs/usr/ports/lang/julia/work/julia-1.11.0-beta1/usr/bin/julia (unknown line)
__libc_start1 at /lib/libc.so.7 (unknown line)
_start at /wrkdirs/usr/ports/lang/julia/work/julia-1.11.0-beta1/usr/bin/julia (unknown line)
Allocations: 0 (Pool: 0; Big: 0); GC: 0

from julia.

giordano avatar giordano commented on May 21, 2024

LLVM 18? Julia master doesn't even support LLVM 17 yet, v1.11 only supports LLVM 16. But I take you're trying to build Julia with an external and unsupported llvm version, which based on googling the error message

LLVM ERROR: inconsistency in registered CommandLine options

is very likely the cause of your problem.

from julia.

oikumene avatar oikumene commented on May 21, 2024

By "llvm18", I wanted to say that I built julia with clang18. I always used llvm shipped with julia.
But I looked into the wrong log file, and the above error message was built by gcc13. (building julia with clang on FreeBSD has the same problem as #52067 until recent FreeBSD-current. I will try it later)

I found this conversation. It is rather old but describes the problem I encountered.

  • The problem seems to be caused by initCommonOptions() invoked many times. It is in libLLVMSupport.a (from deps/srccache/llvm-julia-16.0.6-2/llvm/lib/Support/CommandLine.cpp)
  • libLLVM-16jl.so links all the static LLVM libraries in us/lib/.
  • libjulia-internal.so links libLLVMSupport.a and libLLVMTargetParser.a (via RT_LLVM_LIBS in src/Makefile)
  • libjulia-codegen.so links all the static LLVM libraries, libjulia-internal.so and libLLVM-16jl.so (via CG_RELEASE_LIBS and CG_LLVMLINK in src/Makefile)

So, there is three instance of initCommonOptions(), one in libLLVM-16jl.so, one in libjulia-codegen.so and one in libjulia-internal.so, which make initCommonOptions() called many times.
The solution I took is to remove linking of static LLVM libraries from libjulia-internal.so and libjulia-codegen.so, and link libLLVM-16jl.so to libjulia-internal.so too. As libLLVM-16jl.so links all the static LLVM libraries, the code in the three libraries may call LLVM functions while initCommonOptions() is called only once in libLLVM-16jl.so.

from julia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.