Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 597806 - dev-lang/julia-0.5.0-r2 fails to build: invalid initialization of reference of type 'const llvm::DataLayout&' from expression of type 'const llvm::DataLayout*'
Summary: dev-lang/julia-0.5.0-r2 fails to build: invalid initialization of reference o...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 613576
  Show dependency tree
 
Reported: 2016-10-22 16:53 UTC by Rupert Mazzucco
Modified: 2017-03-22 23:04 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output of `emerge --info '=dev-lang/julia-0.5.0-r2::gentoo'` (emerge--info.out,5.94 KB, text/plain)
2016-10-22 16:53 UTC, Rupert Mazzucco
Details
complete build log (build.log,278.60 KB, text/plain)
2016-10-22 16:59 UTC, Rupert Mazzucco
Details
output of `emerge -pqv '=dev-lang/julia-0.5.0-r2::gentoo'` (emerge-pqv.out,55 bytes, text/plain)
2016-10-22 17:01 UTC, Rupert Mazzucco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rupert Mazzucco 2016-10-22 16:53:31 UTC
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
Comment 1 Rupert Mazzucco 2016-10-22 16:59:42 UTC
Created attachment 451058 [details]
complete build log
Comment 2 Rupert Mazzucco 2016-10-22 17:01:07 UTC
Created attachment 451062 [details]
output of `emerge -pqv '=dev-lang/julia-0.5.0-r2::gentoo'`
Comment 3 Mira Ressel 2016-11-08 20:22:59 UTC
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.
Comment 4 Rupert Mazzucco 2016-11-11 00:23:37 UTC
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.)
Comment 5 Jacob Martin 2017-01-12 01:42:09 UTC
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.
Comment 6 Matthias Maier gentoo-dev 2017-03-22 23:04:36 UTC
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