Building Julia 0.6 executable in a docker container


#1

Has anyone tried to build the Julia 0.6 executable from the source code? I’m trying to do so in a Docker container and running make (or sudo make) produces >100 errors. Any advice would be very appreciated!


#2

This Dockerfile works for me. You probably want more packages for doing any real work but this is enough to build Julia.

FROM ubuntu:16.04

RUN apt-get update \
 && apt-get install -y build-essential cmake curl gfortran git m4 python

RUN cd /opt \
 && git clone https://github.com/JuliaLang/julia.git \
 && cd julia \
 && make -j8

#3

It works for me as well - I didn’t use a dockerfile. Here are the packages I needed to install:

gcc, cmake, gfortran, g++, xz-utils, python, bzip2, m4


#4

Thank you for your responses! So I have all of the above packages. Running make -j8 seems to finish but no executable is produced. Is there something obvious that I’m missing here??


#5

From the root of the source directory, it’s in usr/bin/julia, and there should be a symlink from the root.


#6

Right, there’s no executable in usr/bin/. The directory is created during the make but then is empty. Once the make finishes, I get the (very descriptive) message make: *** [julia-deps] Error 2 but that’s the only red flag I see…


#7

That error is a fatal error. Look several lines above it for the reason it happened. (Likely a missing dependency.)


#8

Also - when you run into errors like this, it’s best to build serially (that is, without -j) while you troubleshoot. Sometimes race conditions (that won’t exist in a serial build) are the cause of build failures.


#9

Found the dependency issues! apt-get wasn’t updating my version of cmake which caused the other issues. Got it to work once I cleaned the OpenBlas build, reinstalled the julia dependencies and then ran the julia download_cmake.sh script. Thank you for your help!