# Cannot compile julia on ubuntu

**URL:** <https://discourse.julialang.org/t/cannot-compile-julia-on-ubuntu/20840>\
**Category:** New to Julia\
**Created:** [February 15, 2019, 9:39pm UTC](https://discourse.julialang.org/t/cannot-compile-julia-on-ubuntu/20840 "2019-02-15T21:39:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bafonso](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bafonso/32/7109_2.png) [@bafonso](https://discourse.julialang.org/u/bafonso)\
**Post date:** [February 15, 2019, 9:39pm UTC](https://discourse.julialang.org/t/cannot-compile-julia-on-ubuntu/20840/1 "2019-02-15T21:39:39Z")

</div>

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= libsuitesparseconfig.so.5.4.0  
> shared library (main): SO\_MAIN= libsuitesparseconfig.so.5  
> shared library (short): SO\_PLAIN= libsuitesparseconfig.so  
> shared library options: SO\_OPTS= -L/home/gordinho/temp/julia/usr/lib -shared -Wl,-soname -Wl,libsuitesparseconfig.so.5 -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  
> UMFPACK config: UMFPACK\_CONFIG= -DLONGBLAS=long long -DSUN64  
> CHOLMOD config: CHOLMOD\_CONFIG= -DLONGBLAS=long long -DSUN64 -DNPARTITION  
> SuiteSparseQR config: SPQR\_CONFIG= -DLONGBLAS=long long -DSUN64  
> CUDA library: CUDART\_LIB= /usr/local/cuda-9.2/lib64/libcudart.so  
> CUBLAS library: CUBLAS\_LIB= /usr/local/cuda-9.2/lib64/libcublas.so  
> 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/libspqr.so.2.0.9’ failed  
> make[4]: \*\*\* [/home/gordinho/temp/julia/usr/lib/libspqr.so.2.0.9] 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/suitesparse.mk:50: 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

---

<div class="post-metadata">

**Author:** ![vchuravy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vchuravy/32/8_2.png) [@vchuravy](https://discourse.julialang.org/u/vchuravy)\
**Post date:** [February 18, 2019, 4:39pm UTC](https://discourse.julialang.org/t/cannot-compile-julia-on-ubuntu/20840/2 "2019-02-18T16:39:08Z")

</div>

Just hit that as well:

```julia
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!                                          
  ^ ~~~~                                                                           

```

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [February 18, 2019, 5:50pm UTC](https://discourse.julialang.org/t/cannot-compile-julia-on-ubuntu/20840/3 "2019-02-18T17:50:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [February 18, 2019, 5:52pm UTC](https://discourse.julialang.org/t/cannot-compile-julia-on-ubuntu/20840/4 "2019-02-18T17:52:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vchuravy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vchuravy/32/8_2.png) [@vchuravy](https://discourse.julialang.org/u/vchuravy)\
**Post date:** [February 18, 2019, 6:20pm UTC](https://discourse.julialang.org/t/cannot-compile-julia-on-ubuntu/20840/5 "2019-02-18T18:20:27Z")

</div>

Fixed by [https://github.com/JuliaLang/julia/pull/31102](https://github.com/JuliaLang/julia/pull/31102)

---

<div class="post-metadata">

**Author:** ![traktofon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/traktofon/32/591_2.png) [@traktofon](https://discourse.julialang.org/u/traktofon)\
**Post date:** [February 28, 2019, 2:54pm UTC](https://discourse.julialang.org/t/cannot-compile-julia-on-ubuntu/20840/6 "2019-02-28T14:54:03Z")

</div>

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

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

```

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

---

<div class="post-metadata">

**Author:** ![bafonso](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bafonso/32/7109_2.png) [@bafonso](https://discourse.julialang.org/u/bafonso)\
**Post date:** [February 28, 2019, 3:50pm UTC](https://discourse.julialang.org/t/cannot-compile-julia-on-ubuntu/20840/7 "2019-02-28T15:50:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![traktofon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/traktofon/32/591_2.png) [@traktofon](https://discourse.julialang.org/u/traktofon)\
**Post date:** [March 1, 2019, 9:20am UTC](https://discourse.julialang.org/t/cannot-compile-julia-on-ubuntu/20840/8 "2019-03-01T09:20:00Z")

</div>

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.
