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

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

Closed
terasakisatoshi opened this issue Jan 5, 2020 · 18 comments
Labels
building Build system, or building Julia or its dependencies

Comments

@terasakisatoshi
Copy link

  • 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
@terasakisatoshi
Copy link
Author

@ViralBShah ViralBShah added the building Build system, or building Julia or its dependencies label Jan 5, 2020
@terasakisatoshi
Copy link
Author

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

@terasakisatoshi
Copy link
Author

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.

@terasakisatoshi
Copy link
Author

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

@non-Jedi
Copy link
Contributor

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

@terasakisatoshi
Copy link
Author

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

@nalimilan
Copy link
Member

This has been fixed on master by 5e0cab6 AFAICT. I've filed #35273 to backport it (hopefully it's correct).

@sanderjson
Copy link

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

@nalimilan
Copy link
Member

@sanderjson How did you install Julia?

@sanderjson
Copy link

sanderjson commented Apr 16, 2020

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

@nalimilan
Copy link
Member

What exact version of the package do you have?

@sanderjson
Copy link

@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

@nalimilan
Copy link
Member

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.

@terasakisatoshi
Copy link
Author

#34264 (comment)

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

@vchuravy
Copy link
Member

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.

@sanderjson
Copy link

working as intended

@ghost
Copy link

ghost commented Jun 16, 2020

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.

@nalimilan
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants