Cannot compile julia on ubuntu


Hi, are there any unexpected compilations issues on a plain vanilla ubuntu compilation from source? I am having issues compiling it, ubuntu 16.04. Seems like it is pointing to the locally compiled libraries but it cannot find them to link them. I am confused.

gordinho@Elgordito:~/temp/julia$ make

SuiteSparse package compilation options:

SuiteSparse Version: 5.4.0
SuiteSparse top folder: /home/gordinho/temp/julia/deps/scratch/SuiteSparse-5.4.0
Package: LIBRARY= libsuitesparseconfig
Version: VERSION= 5.4.0
SO version: SO_VERSION= 5
System: UNAME= Linux
Install directory: INSTALL= /home/gordinho/temp/julia/deps/scratch/SuiteSparse-5.4.0
Install libraries in: INSTALL_LIB= /home/gordinho/temp/julia/usr/lib
Install include files in: INSTALL_INCLUDE= /home/gordinho/temp/julia/usr/include
Install documentation in: INSTALL_DOC= /home/gordinho/temp/julia/deps/scratch/SuiteSparse-5.4.0/share/doc/suitesparse-5.4.0
Optimization level: OPTIMIZATION= -O3
parallel make jobs: JOBS= 1
BLAS library: BLAS= -L/home/gordinho/temp/julia/usr/lib -lopenblas64_
LAPACK library: LAPACK= -L/home/gordinho/temp/julia/usr/lib -lopenblas64_
Intel TBB library: TBB=
Other libraries: LDLIBS= -lm -lrt -Wl,-rpath=/home/gordinho/temp/julia/usr/lib
static library: AR_TARGET= libsuitesparseconfig.a
shared library (full): SO_TARGET=
shared library (main): SO_MAIN=
shared library (short): SO_PLAIN=
shared library options: SO_OPTS= -L/home/gordinho/temp/julia/usr/lib -shared -Wl,-soname -Wl, -Wl,–no-undefined
shared library name tool: SO_INSTALL_NAME= echo
ranlib, for static libs: RANLIB= ranlib
static library command: ARCHIVE= ar rv
copy file: CP= cp -f
move file: MV= mv -f
remove file: RM= rm -f
pretty (for Tcov tests): PRETTY= grep -v “^#” | indent -bl -nce -bli0 -i4 -sob -l120
C compiler: CC= gcc -m64
C++ compiler: CXX= g++ -m64
CUDA compiler: NVCC= /usr/local/cuda-9.2/bin/nvcc
CUDA root directory: CUDA_PATH= /usr/local/cuda-9.2
OpenMP flags: CFOPENMP=
C/C++ compiler flags: CF= -O3 -fexceptions -fPIC
LD flags: LDFLAGS= -L/home/gordinho/temp/julia/usr/lib
Fortran compiler: F77= gfortran -m64
Fortran flags: F77FLAGS=
Intel MKL root: MKLROOT=
Auto detect Intel icc: AUTOCC= yes
SuiteSparseQR config: SPQR_CONFIG= -DLONGBLAS=long long -DSUN64
CUDA library: CUDART_LIB= /usr/local/cuda-9.2/lib64/
CUBLAS library: CUBLAS_LIB= /usr/local/cuda-9.2/lib64/
METIS and CHOLMOD/Partition configuration:
Your METIS library: MY_METIS_LIB=
Your metis.h is in: MY_METIS_INC=
METIS is used via the CHOLMOD/Partition module, configured as follows.
If the next line has -DNPARTITION then METIS will not be used:
CHOLMOD Partition config: -DNPARTITION
CHOLMOD Partition libs: -lccolamd -lcamd
CHOLMOD Partition include: -I/home/gordinho/temp/julia/deps/scratch/SuiteSparse-5.4.0/CCOLAMD/Include -I/home/gordinho/temp/julia/deps/scratch/SuiteSparse-5.4.0/CAMD/Include
/usr/bin/ld: cannot find -lSuiteSparse_GPURuntime
/usr/bin/ld: cannot find -lGPUQREngine
collect2: error: ld returned 1 exit status
Makefile:248: recipe for target ‘/home/gordinho/temp/julia/usr/lib/’ failed
make[4]: *** [/home/gordinho/temp/julia/usr/lib/] Error 1
Makefile:20: recipe for target ‘library’ failed
make[3]: *** [library] Error 2
Makefile:17: recipe for target ‘library’ failed
make[2]: *** [library] Error 2
/home/gordinho/temp/julia/deps/ recipe for target ‘scratch/SuiteSparse-5.4.0/build-compiled’ failed
make[1]: *** [scratch/SuiteSparse-5.4.0/build-compiled] Error 2
Makefile:57: recipe for target ‘julia-deps’ failed
make: *** [julia-deps] Error 2

1 Like


Just hit that as well:

make[3]: warning: -jN forced in submake: disabling jobserver mode.                                                        
In file included from /usr/local/cuda-9.1/include/host_config.h:50:0,                                                     
                 from /usr/local/cuda-9.1/include/cuda_runtime.h:78,                                                      
                 from <command-line>:0:                                                                                   
/usr/local/cuda-9.1/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 a
re not supported!                                                                                                         
 #error -- unsupported GNU version! gcc versions later than 6 are not supported!                                          


I’ve hit these as well. Workaround: USE_BINARYBUILDER_SUITESPARSE=1.

1 Like


Yep, I can confirm, I had this on ArchLinux too and USE_BINARYBUILDER_SUITESPARSE=1 solved it.



Fixed by

1 Like


As that PR is not yet merged, another workaround is:

make  # wait for it to fail
make -C deps distclean-suitesparse 
make -C deps compile-suitesparse CUDA=no

(of course one can use make -j... to speed it up)

1 Like


Is the proposed solution to not use CUDA/GPU acceleration? Wouldn’t having as much GPU acceleration as possible be the optimal goal?



The proposed solution in the PR turns off CUDA just for suitesparse. I’m not sure if the CUDA functionality of suitesparse is accessible from Julia at all anyway, or whether it could even play along with other CUDA functionality in Julia, or in other Julia packages.