errors when testing LLVM (presumably from installation)

I’m using Julia with Manjaro Linux and I encountered some errors. I then downloaded the Julia binaries, but I got the same errors.

When I run test LLVM I get the following errors

(v1.0) pkg> test LLVM
   Testing LLVM
 Resolving package versions...
    Status `/tmp/tmpshsOZp/Manifest.toml`
  [929cbde3] LLVM v0.9.14
  [2a0f44e3] Base64  [`@stdlib/Base64`]
  [8ba89e20] Distributed  [`@stdlib/Distributed`]
  [b77e0a4c] InteractiveUtils  [`@stdlib/InteractiveUtils`]
  [8f399da3] Libdl  [`@stdlib/Libdl`]
  [37e2e46d] LinearAlgebra  [`@stdlib/LinearAlgebra`]
  [56ddb016] Logging  [`@stdlib/Logging`]
  [d6f4376e] Markdown  [`@stdlib/Markdown`]
  [de0858da] Printf  [`@stdlib/Printf`]
  [9a3f8284] Random  [`@stdlib/Random`]
  [9e88b42a] Serialization  [`@stdlib/Serialization`]
  [6462fe0b] Sockets  [`@stdlib/Sockets`]
  [8dfed614] Test  [`@stdlib/Test`]
  [4ec0a83e] Unicode  [`@stdlib/Unicode`]
execution engine: Error During Test at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/execution.jl:43
  Got exception outside of a @test
  LLVM error: Unable to find target for this triple (no targets are registered)
  Stacktrace:
   [1] JIT(::LLVM.Module, ::UInt32) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/execution.jl:102
   [2] JIT at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/execution.jl:92 [inlined]
   [3] JIT(::getfield(Main, Symbol("##211#225")){LLVM.Function}, ::LLVM.Module) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/execution.jl:112
   [4] (::getfield(Main, Symbol("##209#223")){getfield(Main, Symbol("#emit_sum#217")),getfield(Main, Symbol("#emit_retint#219")),getfield(Main, Symbol("#emit_phi#221"))})(::Context) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/execution.jl:152
   [5] Context(::getfield(Main, Symbol("##209#223")){getfield(Main, Symbol("#emit_sum#217")),getfield(Main, Symbol("#emit_retint#219")),getfield(Main, Symbol("#emit_phi#221"))}) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/core/context.jl:21
   [6] macro expansion at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/execution.jl:13 [inlined]
   [7] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
   [8] macro expansion at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/execution.jl:5 [inlined]
   [9] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
   [10] top-level scope at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/execution.jl:3
   [11] include at ./boot.jl:317 [inlined]
   [12] include_relative(::Module, ::String) at ./loading.jl:1041
   [13] include(::Module, ::String) at ./sysimg.jl:29
   [14] include(::String) at ./client.jl:388
   [15] macro expansion at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/runtests.jl:16 [inlined]
   [16] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
   [17] macro expansion at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/runtests.jl:10 [inlined]
   [18] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
   [19] top-level scope at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/runtests.jl:7
   [20] include at ./boot.jl:317 [inlined]
   [21] include_relative(::Module, ::String) at ./loading.jl:1041
   [22] include(::Module, ::String) at ./sysimg.jl:29
   [23] include(::String) at ./client.jl:388
   [24] top-level scope at none:0
   [25] eval(::Module, ::Any) at ./boot.jl:319
   [26] macro expansion at ./logging.jl:317 [inlined]
   [27] exec_options(::Base.JLOptions) at ./client.jl:219
   [28] _start() at ./client.jl:421
target: Error During Test at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/target.jl:1
  Got exception outside of a @test
  LLVM error: Unable to find target for this triple (no targets are registered)
  Stacktrace:
   [1] Target(::String) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/target.jl:20
   [2] macro expansion at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/target.jl:5 [inlined]
   [3] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
   [4] top-level scope at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/target.jl:2
   [5] include at ./boot.jl:317 [inlined]
   [6] include_relative(::Module, ::String) at ./loading.jl:1041
   [7] include(::Module, ::String) at ./sysimg.jl:29
   [8] include(::String) at ./client.jl:388
   [9] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1088
   [10] include at ./boot.jl:317 [inlined]
   [11] include_relative(::Module, ::String) at ./loading.jl:1041
   [12] include(::Module, ::String) at ./sysimg.jl:29
   [13] include(::String) at ./client.jl:388
   [14] top-level scope at none:0
   [15] eval(::Module, ::Any) at ./boot.jl:319
   [16] macro expansion at ./logging.jl:317 [inlined]
   [17] exec_options(::Base.JLOptions) at ./client.jl:219
   [18] _start() at ./client.jl:421
targetmachine: Error During Test at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/targetmachine.jl:1
  Got exception outside of a @test
  LLVM error: Unable to find target for this triple (no targets are registered)
  Stacktrace:
   [1] Target(::String) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/target.jl:20
   [2] macro expansion at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/targetmachine.jl:4 [inlined]
   [3] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
   [4] top-level scope at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/targetmachine.jl:3
   [5] include at ./boot.jl:317 [inlined]
   [6] include_relative(::Module, ::String) at ./loading.jl:1041
   [7] include(::Module, ::String) at ./sysimg.jl:29
   [8] include(::String) at ./client.jl:388
   [9] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1090
   [10] include at ./boot.jl:317 [inlined]
   [11] include_relative(::Module, ::String) at ./loading.jl:1041
   [12] include(::Module, ::String) at ./sysimg.jl:29
   [13] include(::String) at ./client.jl:388
   [14] top-level scope at none:0
   [15] eval(::Module, ::Any) at ./boot.jl:319
   [16] macro expansion at ./logging.jl:317 [inlined]
   [17] exec_options(::Base.JLOptions) at ./client.jl:219
   [18] _start() at ./client.jl:421
recursion: Error During Test at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/Kaleidoscope.jl:5
  Got exception outside of a @test
  LLVM error: Unable to find target for this triple (no targets are registered)
  Stacktrace:
   [1] JIT(::LLVM.Module, ::UInt32) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/execution.jl:102
   [2] JIT at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/execution.jl:92 [inlined]
   [3] JIT(::getfield(Main.Kaleidoscope, Symbol("##20#21")){String}, ::LLVM.Module) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/execution.jl:112
   [4] run at /home/naturgewalt/.julia/packages/LLVM/RyXLI/examples/Kaleidoscope/run.jl:32 [inlined]
   [5] (::getfield(Main, Symbol("##275#279")){String})(::Context) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/Kaleidoscope.jl:22
   [6] Context(::getfield(Main, Symbol("##275#279")){String}) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/core/context.jl:21
   [7] macro expansion at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/Kaleidoscope.jl:19 [inlined]
   [8] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
   [9] macro expansion at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/Kaleidoscope.jl:6 [inlined]
   [10] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
   [11] top-level scope at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/Kaleidoscope.jl:3
   [12] include at ./boot.jl:317 [inlined]
   [13] include_relative(::Module, ::String) at ./loading.jl:1041
   [14] include(::Module, ::String) at ./sysimg.jl:29
   [15] include(::String) at ./client.jl:388
   [16] top-level scope at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/runtests.jl:19
   [17] include at ./boot.jl:317 [inlined]
   [18] include_relative(::Module, ::String) at ./loading.jl:1041
   [19] include(::Module, ::String) at ./sysimg.jl:29
   [20] include(::String) at ./client.jl:388
   [21] top-level scope at none:0
   [22] eval(::Module, ::Any) at ./boot.jl:319
   [23] macro expansion at ./logging.jl:317 [inlined]
   [24] exec_options(::Base.JLOptions) at ./client.jl:219
   [25] _start() at ./client.jl:421
loops: Error During Test at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/Kaleidoscope.jl:27
  Got exception outside of a @test
  LLVM error: Unable to find target for this triple (no targets are registered)
  Stacktrace:
   [1] write_objectfile(::LLVM.Module, ::String) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/target.jl:20
   [2] #277 at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/Kaleidoscope.jl:48 [inlined]
   [3] mktemp(::getfield(Main, Symbol("##277#281")){LLVM.Module}, ::String) at ./file.jl:555
   [4] mktemp at ./file.jl:553 [inlined]
   [5] (::getfield(Main, Symbol("##276#280")){String})(::Context) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/Kaleidoscope.jl:47
   [6] Context(::getfield(Main, Symbol("##276#280")){String}) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/core/context.jl:21
   [7] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1088
   [8] include at ./boot.jl:317 [inlined]
   [9] include_relative(::Module, ::String) at ./loading.jl:1041
   [10] include(::Module, ::String) at ./sysimg.jl:29
   [11] include(::String) at ./client.jl:388
   [12] top-level scope at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/runtests.jl:19
   [13] include at ./boot.jl:317 [inlined]
   [14] include_relative(::Module, ::String) at ./loading.jl:1041
   [15] include(::Module, ::String) at ./sysimg.jl:29
   [16] include(::String) at ./client.jl:388
   [17] top-level scope at none:0
   [18] eval(::Module, ::Any) at ./boot.jl:319
   [19] macro expansion at ./logging.jl:317 [inlined]
   [20] exec_options(::Base.JLOptions) at ./client.jl:219
   [21] _start() at ./client.jl:421
global vars: Error During Test at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/Kaleidoscope.jl:55
  Got exception outside of a @test
  LLVM error: Unable to find target for this triple (no targets are registered)
  Stacktrace:
   [1] JIT(::LLVM.Module, ::UInt32) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/execution.jl:102
   [2] JIT at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/execution.jl:92 [inlined]
   [3] JIT(::getfield(Main.Kaleidoscope, Symbol("##20#21")){String}, ::LLVM.Module) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/execution.jl:112
   [4] run at /home/naturgewalt/.julia/packages/LLVM/RyXLI/examples/Kaleidoscope/run.jl:32 [inlined]
   [5] (::getfield(Main, Symbol("##278#282")){String})(::Context) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/Kaleidoscope.jl:67
   [6] Context(::getfield(Main, Symbol("##278#282")){String}) at /home/naturgewalt/.julia/packages/LLVM/RyXLI/src/core/context.jl:21
   [7] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1092
   [8] include at ./boot.jl:317 [inlined]
   [9] include_relative(::Module, ::String) at ./loading.jl:1041
   [10] include(::Module, ::String) at ./sysimg.jl:29
   [11] include(::String) at ./client.jl:388
   [12] top-level scope at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/runtests.jl:19
   [13] include at ./boot.jl:317 [inlined]
   [14] include_relative(::Module, ::String) at ./loading.jl:1041
   [15] include(::Module, ::String) at ./sysimg.jl:29
   [16] include(::String) at ./client.jl:388
   [17] top-level scope at none:0
   [18] eval(::Module, ::Any) at ./boot.jl:319
   [19] macro expansion at ./logging.jl:317 [inlined]
   [20] exec_options(::Base.JLOptions) at ./client.jl:219
   [21] _start() at ./client.jl:421
Test Summary:        | Pass  Error  Total
LLVM                 |  406      6    412
  types              |    5             5
  pass registry      |              No tests
  support            |    1             1
  core               |  250           250
  linker             |    2             2
  irbuilder          |   80            80
  buffer             |    5             5
  bitcode            |    4             4
  ir                 |    3             3
  analysis           |    2             2
  moduleprovider     |              No tests
  passmanager        |    4             4
  pass               |    3             3
  execution          |   10      1     11
    generic values   |    9             9
    execution engine |    1      1      2
  transform          |              No tests
  target             |    1      1      2
  targetmachine      |           1      1
  datalayout         |   12            12
  debuginfo          |    2             2
  Kaleidoscope       |           3      3
    recursion        |           1      1
    loops            |           1      1
    global vars      |           1      1
  examples           |    4             4
  interop            |   18            18
ERROR: LoadError: Some tests did not pass: 406 passed, 0 failed, 6 errored, 0 broken.
in expression starting at /home/naturgewalt/.julia/packages/LLVM/RyXLI/test/runtests.jl:5
ERROR: Package LLVM errored during testing

PS. I use bumblebee and optirun. Note that this errors occurs regardless of whether I run julia or optirun julia

strange - for me - it is OK.

Julia v1.0.1 - Generic Linux Binaries for x86 - 64bit + Ubuntu 18.04 -

(v1.0) pkg> add LLVM
 Resolving package versions...
 Installed LLVM ─ v0.9.14
  Updating `~/.julia/environments/v1.0/Project.toml`
  [929cbde3] + LLVM v0.9.14
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [929cbde3] + LLVM v0.9.14
  Building LLVM → `~/.julia/packages/LLVM/RyXLI/deps/build.log`

(v1.0) pkg> test LLVM
   Testing LLVM
 Resolving package versions...
    Status `/tmp/tmp90RWyu/Manifest.toml`
  [929cbde3] LLVM v0.9.14
  [2a0f44e3] Base64  [`@stdlib/Base64`]
  [8ba89e20] Distributed  [`@stdlib/Distributed`]
  [b77e0a4c] InteractiveUtils  [`@stdlib/InteractiveUtils`]
  [8f399da3] Libdl  [`@stdlib/Libdl`]
  [37e2e46d] LinearAlgebra  [`@stdlib/LinearAlgebra`]
  [56ddb016] Logging  [`@stdlib/Logging`]
  [d6f4376e] Markdown  [`@stdlib/Markdown`]
  [de0858da] Printf  [`@stdlib/Printf`]
  [9a3f8284] Random  [`@stdlib/Random`]
  [9e88b42a] Serialization  [`@stdlib/Serialization`]
  [6462fe0b] Sockets  [`@stdlib/Sockets`]
  [8dfed614] Test  [`@stdlib/Test`]
  [4ec0a83e] Unicode  [`@stdlib/Unicode`]
Test Summary: | Pass  Total
LLVM          |  439    439
   Testing LLVM tests passed 

(v1.0) pkg> 

  • can you share your versioninfo() ?

On clean - docker manjaro image (64 bit ) - It is OK - for me.

Are you using 32bit linux ?

my 64bit Manjaro - Julia 1.0.1 test script.

FROM jonathonf/manjaro
RUN pacman-mirrors -c all 
RUN pacman -Syu --noconfirm  wget tar gzip

ENV JULIA_MAJOR=1.0
ENV JULIA_VERSION=1.0.1
ENV JULIA_SHA256=9ffbcf7f4a111e13415954caccdd1ce90b5c835cee9f62d6ac708f5b752c87dd

ENV JULIA_DIR=/usr/local/julia
ENV JULIA_PATH=${JULIA_DIR}

RUN mkdir ${JULIA_DIR} && \
    cd /tmp && \
    wget -q https://julialang-s3.julialang.org/bin/linux/x64/${JULIA_MAJOR}/julia-${JULIA_VERSION}-linux-x86_64.tar.gz && \
    echo "$JULIA_SHA256 julia-${JULIA_VERSION}-linux-x86_64.tar.gz" | sha256sum -c - && \
    tar xzf julia-${JULIA_VERSION}-linux-x86_64.tar.gz -C ${JULIA_DIR} --strip-components=1 && \
    rm /tmp/julia-${JULIA_VERSION}-linux-x86_64.tar.gz
RUN ln -fs ${JULIA_DIR}/bin/julia /usr/local/bin/julia

RUN julia -O3 -e 'using Pkg; Pkg.REPLMode.pkgstr("add LLVM; test LLVM; precompile"); using LLVM'

I’ve just managed to get the prebuilt binary working, but deleting my ~/.julia directory and rebuilding all from scratch

1 Like

I’m on Julia version 1.0.0 on 64bit Manjaro and the default install is not working :sob:

1 Like