Created attachment 451048 [details] output of `emerge --info '=dev-lang/julia-0.5.0-r2::gentoo'` Emerging =dev-lang/julia-0.5.0-r2 fails with what appears to be a complaint from the compiler: ... In file included from /var/tmp/portage/dev-lang/julia-0.5.0-r2/work/julia-0.5.0/src/codegen.cpp:653:0: /var/tmp/portage/dev-lang/julia-0.5.0-r2/work/julia-0.5.0/src/cgutils.cpp: In function 'llvm::Type* julia_struct_to_llvm(jl_value_t*, bool*)': /var/tmp/portage/dev-lang/julia-0.5.0-r2/work/julia-0.5.0/src/cgutils.cpp:426:51: error: invalid initialization of reference of type 'const llvm::DataLayout&' from expression of type 'const llvm::DataLayout*' jl_ExecutionEngine->getDataLayout(); ^ Makefile:109: recipe for target 'codegen.o' failed make[1]: *** [codegen.o] Error 1 ... Peeking into this piece of code shows that the used bits depend on llvm version. I appear to have LLVM (http://llvm.org/): LLVM version 3.7.1 Optimized build. Default target: i686-pc-linux-gnu Host CPU: core2
Created attachment 451058 [details] complete build log
Created attachment 451062 [details] output of `emerge -pqv '=dev-lang/julia-0.5.0-r2::gentoo'`
I've also experienced this build error while I had llvm-3.7 installed. However, after upgrading to llvm-3.9, it doesn't occur anymore. (As far as I can tell, at least -- I'm still unable to build julia due to bug 572188, so I can't say for sure.) @Rupert: Could you please test whether upgrading to llvm 3.8 or 3.9 fixes the issue for you? If yes, Patrick will just need to update julia's DEPEND.
Actually building works for me with llvm-3.9, good tip. (Of course this is still unstable and then needs an unstable mesa-13.0.0, so may cause follow-up issues.)
Had the same issue as Rupert with an eaerlier version of LLVM (3.7.1-r3(16:52:49 08/13/16)). Installed sys-devel/llvm-3.9.1 and no more error.
commit 59697faaa112dc0c252c8f4cc77823b596b1765f Author: Matthias Maier <tamiko@gentoo.org> Date: Wed Mar 22 18:03:19 2017 -0500 dev-lang/julia: depend on llvm-3.9 or newer, bug #597806 Package-Manager: Portage-2.3.3, Repoman-2.3.2