Julia: Current master does not compile on ubuntu 16.04

Created on 1 Apr 2019  ·  5Comments  ·  Source: JuliaLang/julia

I am trying to compile a freshly cloned julia master on Ubuntu 16.04 and get the following error:

/home/me/progs/julia/julia-master/deps/llvm.mk:525: warning: overriding recipe for target '/home/me/progs/julia/julia-master/usr-staging/LLVM.v6.0.1.tgz'
/home/me/progs/julia/julia-master/deps/llvm.mk:525: warning: ignoring old recipe for target '/home/me/progs/julia/julia-master/usr-staging/LLVM.v6.0.1.tgz'
/home/me/progs/julia/julia-master/deps/llvm.mk:525: *** Attempting to use gcc4 LLVM tarball, but compiling with cxx11 string ABI; set "CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0" to avoid linker errors.  Stop.
Makefile:60: recipe for target 'julia-deps' failed
make: *** [julia-deps] Error 2

I guess this is because of https://github.com/JuliaLang/julia/commit/297f25aa2301265b8f5db263efb754731cac9959, how do I get julia to compile?

build linux

Most helpful comment

I just run into this as well. It would be great if at least that error message could be improved. Case in point, on my Debian 16.04, GCC is at version 5.4.0, while that error message talks about gcc4, which is very confusing. E.g. perhaps it could suggest to upgrade to gcc 7+ in addition to using those flags... Or generally provide some more information about what's going on and how to resolve it resp. where to find out how to resolve it.

In this regard, I also find the commit message for 297f25aa2301265b8f5db263efb754731cac9959 somewhat misleading; it says:

Use this to automatically fail out when users try to use a gcc4
tarball with a system that compiles for cxx11. [...]

That wording "users try to use" is written from an odd (to me, at least) perspective: It makes it sound as if it's the user's conscious decision to select a gcc4 tarball, even though the user in all likelihood did nothing but enter make, and then the Julia build system chose to pick that tarball... While I see the technical reasons for this when looking at that commit, I think it's important to keep in mind that most people trying to compile Julia don't know all that much about the intricate details of its build system... (no wonder, given that they are largely undocumented, at least AFAIK).

All 5 comments

Update gcc/gfortran to >= 7 or do what the error message suggest, make CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0.

thanks, works now!

I just run into this as well. It would be great if at least that error message could be improved. Case in point, on my Debian 16.04, GCC is at version 5.4.0, while that error message talks about gcc4, which is very confusing. E.g. perhaps it could suggest to upgrade to gcc 7+ in addition to using those flags... Or generally provide some more information about what's going on and how to resolve it resp. where to find out how to resolve it.

In this regard, I also find the commit message for 297f25aa2301265b8f5db263efb754731cac9959 somewhat misleading; it says:

Use this to automatically fail out when users try to use a gcc4
tarball with a system that compiles for cxx11. [...]

That wording "users try to use" is written from an odd (to me, at least) perspective: It makes it sound as if it's the user's conscious decision to select a gcc4 tarball, even though the user in all likelihood did nothing but enter make, and then the Julia build system chose to pick that tarball... While I see the technical reasons for this when looking at that commit, I think it's important to keep in mind that most people trying to compile Julia don't know all that much about the intricate details of its build system... (no wonder, given that they are largely undocumented, at least AFAIK).

Update gcc/gfortran to >= 7 or do what the error message suggest, make CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0.

Can confirm that make CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 worked.

Maybe

https://github.com/JuliaLang/julia/blob/master/doc/build/build.md#required-build-tools-and-external-libraries

should be updated as it states that Julia can be built with GCC >= 4.7, which does not seem to be the case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arshpreetsingh picture arshpreetsingh  ·  3Comments

ararslan picture ararslan  ·  3Comments

dpsanders picture dpsanders  ·  3Comments

StefanKarpinski picture StefanKarpinski  ·  3Comments

wilburtownsend picture wilburtownsend  ·  3Comments