Julia: Bug report: `make install` does not copy `libLLVM-8jl.so` on Linux Environment (Julia-1.5 Dev)

Created on 5 Jan 2020  路  18Comments  路  Source: JuliaLang/julia

  • Since make install does not copy libLLVM-8jl.so (which wll be generated by running make command) on linux environment, I can't run Julia that will be installed by make install .
  • If I copy libLLVM-8jl.so manually to directory path/to/prefix/lib/julia/ it will be alright on Linux environment.

How to Reproduce

FROM ubuntu:18.04

RUN apt-get update && apt-get install -y \
    build-essential \
    libatomic1 \
    python \
    gfortran \
    perl \
    wget \
    m4 \
    cmake \
    pkg-config \
    git

ARG JL_VERSION="master"
ARG WDIR="/root"
ARG JL_BUILD_DIR=$WDIR/build
WORKDIR $JL_BUILD_DIR

RUN echo "\
CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0\n\
prefix=/usr/local/julia-$JL_VERSION\n\
USE_BINARYBUILDER = 0\n\
" > Make.user \
    && cat Make.user \
    && git clone --depth=1 -b $JL_VERSION https://github.com/JuliaLang/julia.git julia-$JL_VERSION\
    && cp Make.user $JL_BUILD_DIR/julia-$JL_VERSION \
    && cd julia-$JL_VERSION \
    && make -j $(nproc) \
    && make install

RUN rm -r $JL_BUILD_DIR && \
    apt-get clean && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
ENV PATH=/usr/local/julia-$JL_VERSION/bin:$PATH
# runtime test
RUN julia -e "using InteractiveUtils; versioninfo()" # it will fail

CMD ["julia"]
  • Run the following command will occur an error.
$ docker build -t buildmaster .
...
julia: error while loading shared libraries: libLLVM-8jl.so: cannot open shared object file: No such file or directory
build

Most helpful comment

This has been fixed on master by https://github.com/JuliaLang/julia/commit/5e0cab69966eb989f380492dda7590bca3a3ba8d AFAICT. I've filed https://github.com/JuliaLang/julia/pull/35273 to backport it (hopefully it's correct).

All 18 comments

Still same error happens

Step 10/12 : ENV PATH=/usr/local/julia-$JL_VERSION/bin:$PATH
 ---> Using cache
 ---> d4c771751911
Step 11/12 : RUN julia -e "using InteractiveUtils; versioninfo()"
 ---> Running in 28e324d74d1d
julia: error while loading shared libraries: libLLVM-9jl.so: cannot open shared object file: No such file or directory
The command '/bin/sh -c julia -e "using InteractiveUtils; versioninfo()"' returned a non-zero code: 127

Ah ... I've found this issue occurs when we set USE_BINARYBUILDER = 0.
that's why everyone other than me succeed to build julia without tear.

Apparently, today's julia Commit a66db76 solves our problem

Julia Version 1.5.0-DEV.unknown
Commit a66db76 (2020-03-21 17:57 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Genuine Intel(R) CPU 0000 @ 2.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, broadwell)
Removing intermediate container 33463c1ac24e
 ---> 89ab16a7a72c

This is also an issue on the v1.4.0 release.

I think Julia 1.5(in the future) will solve this problem.

This has been fixed on master by https://github.com/JuliaLang/julia/commit/5e0cab69966eb989f380492dda7590bca3a3ba8d AFAICT. I've filed https://github.com/JuliaLang/julia/pull/35273 to backport it (hopefully it's correct).

I am on Fdora 32 and just updated Julia and now I get the error:

julia: error while loading shared libraries: libLLVM-8jl.so: cannot open shared object file: No such file or directory

@sanderjson How did you install Julia?

I have it installed with dnf
I tried various remove and/installs
I also tried renaming the libllvm file in the installation

What worked in the end:
Dnf remove Julia
Reboot
Just typed Julia in the terminal
Hit yes when prompted to install the command

Edit: I do have the nalimilan/julia copr enabled

What exact version of the package do you have?

@nalimilan now I have julia-1.4.0-2.fc32.x86_64 - had the same issues this morning.

dnf remove julia
reboot
dnf install julia

julia-failed

dnf remove julia
reboot
julia

julia-working

Ah, there was a bad interaction between the fix I had applied in 1.4.0 and the fix that was backported in 1.4.1. Should be fixed in the new version I just built.

https://github.com/JuliaLang/julia/issues/34264#issuecomment-614769772

This error occurs build source from scratch.

Below is my prescription to solve the issue:

Here is my https://github.com/Julia-Embedded/jlcross/blob/master/rpi3/Dockerfile-v1.4.0#L34

It is fixed on Julia 1.4.1 and 1.5.0-dev, we didn't cache it early enough for 1.4.0 so yes either you have to manually copy or use USE_BINARYBUILDER_LLVM=1.

working as intended

It seems like this problem is back? julia-1.4.2-1.fc32.x86_64 gives the same error (Fedora 32). I installed through dnf install julia.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StefanKarpinski picture StefanKarpinski  路  113Comments

StefanKarpinski picture StefanKarpinski  路  216Comments

StefanKarpinski picture StefanKarpinski  路  166Comments

StefanKarpinski picture StefanKarpinski  路  131Comments

jiahao picture jiahao  路  417Comments