Linux
-
The Julia build requires GCC version 4.7 or later.
-
To use external shared libraries that are not on the system library search path, set the variables
USE_SYSTEM_XXX=1
andLDFLAGS=-Wl,-rpath,/path/to/dir/contains/libXXX.so
in the 'Make.user` file. -
Instead of setting the variable
LDFLAGS
, you can also assign the library directory to the environment variableLD_LIBRARY_PATH
(both at compile time and at runtime). -
The
USE_SYSTEM_*
flags should be used with caution. They are intended only for troubleshooting, porting and packaging in close collaboration of package maintenance specialists with Julia developers to ensure that Julia builds correctly. Only officially provided binaries should be used for use in the production environment. Problems arising from the use of these flags, as a rule, are not accepted for consideration. -
See also the section dedicated to external dependencies.
Setting up the architecture
To build Julia for a non-universal architecture, you can configure the ARCH' Makefile variable in the `Make.user' file. For additional parameters of the setting, such as `MARCH
and JULIA_CPU_TARGET
, see the corresponding section `Make.inc'.
For example, to build for a Pentium 4, set the variable MARCH=pentium4
and install the necessary system libraries for the layout. In Ubuntu, these can be, among other things, the libraries lib32gfortran-6-dev, lib32gcc1 and lib32stdc++6.
In addition, you can set MARCH=native
and `Make.user' to get a build with maximum performance optimized for the CPU of the current computer.
Troubleshooting Linux builds
The problem | Possible solution |
---|---|
OpenBLAS build failed |
Set one of the following build parameters in 'Make.user` and repeat the build: <ul><li> |
Illegal Instruction error (Invalid instruction) |
Check if the CPU supports AVX instructions, while the OS does not (for example, through virtualization, as described in https://github.com/JuliaLang/julia/issues/3263 [this problem]). |