Linux

  • Julia를 빌드하려면 GCC 버전 4.7 이상이 필요합니다.
  • 외부 공유 라이브러리를 시스템 라이브러리 검색 경로에 포함되지 않은 경우 사용하려면 Make.user에서 USE_SYSTEM_XXX=1LDFLAGS=-Wl,-rpath,/path/to/dir/contains/libXXX.so를 설정하십시오.
  • LDFLAGS를 설정하는 대신, 라이브러리 디렉토리를 환경 변수 LD_LIBRARY_PATH에 넣는 것(컴파일 및 실행 시간 모두)도 작동합니다.
  • USE_SYSTEM_* 플래그는 주의해서 사용해야 합니다. 이 플래그는 문제 해결, 포팅 및 패키징을 위해서만 사용되며, 패키지 유지 관리자가 Julia 개발자와 긴밀히 협력하여 Julia가 올바르게 빌드되도록 합니다. 프로덕션 사용 사례는 공식적으로 제공된 바이너리를 사용해야 합니다. 이러한 플래그 사용으로 인해 발생하는 문제는 일반적으로 수용되지 않습니다.
  • 또한 external dependencies를 참조하십시오.

Architecture Customization

줄리아는 Make.user 파일에서 ARCH Makefile 변수를 설정하여 비제네릭 아키텍처로 빌드할 수 있습니다. 추가 사용자 정의 옵션에 대한 자세한 내용은 Make.inc의 적절한 섹션을 참조하십시오. 예를 들어 MARCHJULIA_CPU_TARGET와 같은 옵션이 있습니다.

예를 들어, Pentium 4용으로 빌드하려면 MARCH=pentium4로 설정하고 링크를 위한 필요한 시스템 라이브러리를 설치해야 합니다. Ubuntu에서는 lib32gfortran-6-dev, lib32gcc1, lib32stdc++6 등을 포함할 수 있습니다.

Make.user에서 MARCH=native를 설정하여 현재 머신 CPU에 맞게 최적화된 최대 성능 빌드를 할 수 있습니다.

Linux Build Troubleshooting

ProblemPossible Solution
OpenBLAS build failureSet one of the following build options in Make.user and build again: <ul><li> OPENBLAS_TARGET_ARCH=BARCELONA (AMD CPUs) or OPENBLAS_TARGET_ARCH=NEHALEM (Intel CPUs)<ul>Set OPENBLAS_DYNAMIC_ARCH = 0 to disable compiling multiple architectures in a single binary.</ul></li><li> OPENBLAS_NO_AVX2 = 1 disables AVX2 instructions, allowing OpenBLAS to compile with OPENBLAS_DYNAMIC_ARCH = 1 using old versions of binutils </li><li> USE_SYSTEM_BLAS=1 uses the system provided libblas <ul><li>Set LIBBLAS=-lopenblas and LIBBLASNAME=libopenblas to force the use of the system provided OpenBLAS when multiple BLAS versions are installed. </li></ul></li></ul><p> If you get an error that looks like ../kernel/x86_64/dgemm_kernel_4x4_haswell.S:1709: Error: no such instruction: `vpermpd $ 0xb1,%ymm0,%ymm0', then you need to set OPENBLAS_DYNAMIC_ARCH = 0 or OPENBLAS_NO_AVX2 = 1, or you need a newer version of binutils (2.18 or newer). (Issue #7653)</p><p> If the linker cannot find gfortran and you get an error like julia /usr/bin/x86_64-linux-gnu-ld: cannot find -lgfortran, check the path with gfortran -print-file-name=libgfortran.so and use the output to export something similar to this: export LDFLAGS=-L/usr/lib/gcc/x86_64-linux-gnu/8/. See Issue #6150.</p>
Illegal Instruction errorCheck if your CPU supports AVX while your OS does not (e.g. through virtualization, as described in this issue).