Building Julia Offline

So, I’m trying to build Julia 0.6.2 on a machine without access to the internet.
I am able to do a make without errors using the julia-full package.
The problem starts with make install. How do I run make install without needing git to download packages (eg: METADATA.jl) from github? I tried to set NO_GIT=1, but that does not work. Is there any way I can download the packages myself and copy them to the installation build path?

jokalokao I am interested in this also, as I have installed systems on sites where people with guns inspect your security pass. (I’m talking about UK SEcure sites).

Does make full-source-dist not help?

Julia has lots of build dependencies where we use patched versions that has not yet been included by the popular package managers. These dependencies will usually be automatically downloaded when you build, but if you want to be able to build Julia on a computer without internet access you should create a full-source-dist archive with the special make target
make full-source-dist

that creates a julia-version-commit.tar.gz archive with all required dependencies.

Can you post the make install output? There have been issues with make attempting to rebuild the docs when it should not be necessary, and that requires installing packages.

I ran into the same problem on julia 0.7. The workaround in that case was to

  1. build julia 0.7 on some other machine (with access to the internet)
  2. copy the _build directory to the non-networked machine,
  3. run touch doc/_build/html/en/index.html.
  4. run make install

This tricked make install into thinking the documentation was already up-to-date, so it doesn’t try to rebuild it, and therefore downloading packages.

@jokalokao This seems to work for me
Download the Julia tarball with dependencies julia-0.6.2-full.tar.gz
Transfer to machine with no internet access
tar zxvf julia-0.6.2-full.tar.gz ; cd julia-0.6.2
create Make.user file containing:
NO_GIT:=1
USE_SYSTEM_CURL:=0
USE_SYSTEM_ARPACK:=0
OPENBLAS_TARGET_ARCH:=HASWELL

I had to edit this line out of the Makefile:
# Get all the dependencies downloaded
# @$(MAKE) -C deps getall NO_GIT=1

make -C base version_git.jl.phony but this seems to do nothing ???

then make all the dependency libraries in ./deps
make -C deps -j 20
make

I suspect having to edit the Makefile is a misunderstanding on my part rather than a buglet

I am fighting with the Openblas build at the moment. Seems to come from Easybuild using version 2.66 of binutils. TO explain, my gcc is provided by Easybuild

ps. On that subject - has anyone worked with Easybuild and Julia? If I’m not wrong I may have asked this question.

It falls in the same problem

I’ve got some warnings:

 Warning: git information unavailable; versioning information limited

And here the error occurs:

Building HTML documentation.
INFO: Initializing package repository /path/to/julia-0.6.2/doc/deps/v0.6
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
ERROR: LoadError: GitError(Code:ERROR, Class:Net, curl error: Failed to connect to github.com port XXX: Connection timed out
)

Looks like the error I suspected. It’s generally due to file timestamps: the built manual is older than at least one source file, which prompts make to rebuild it. It was supposed to be fixed by this PR, but it also depends on how the tarballs are built… Cc: @ararslan

I don’t know what information is particularly relevant here, but you can take a look at the light- and full-source-dist targets in the Julia Makefile.

I’ve just tried locally make && make install, and the docs were not rebuilt. Could you try that without any other options and without modifying any file? In particular, editing makefiles will likely trigger a rebuild.

Yeah, removing some options I had chosen helped with the METADATA problem.
And as @JaredCrean2 suggested:

I could install Julia.

Thank you for all your help!

Do you know what options exactly? It would be useful to understand the problem.