Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 631978 - dev-lang/julia-0.6.0 fails to compile if llvm-5 is installed
Summary: dev-lang/julia-0.6.0 fails to compile if llvm-5 is installed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-25 06:38 UTC by Patrick Lauer
Modified: 2018-03-19 01:01 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2017-09-25 06:38:18 UTC
In file included from /var/tmp/portage/dev-lang/julia-0.6.0/work/julia-0.6.0/src/intrinsics.cpp:7:0,
                 from /var/tmp/portage/dev-lang/julia-0.6.0/work/julia-0.6.0/src/codegen.cpp:2209:
/var/tmp/portage/dev-lang/julia-0.6.0/work/julia-0.6.0/src/ccall.cpp: In member function âstd::__cxx11::string function_sig_t::generate_func_sig()â:
/var/tmp/portage/dev-lang/julia-0.6.0/work/julia-0.6.0/src/ccall.cpp:1408:76: error: no matching function for call to âllvm::AttributeList::addAttributes(llvm::LLVMContext&, size_t, const llvm::AttributeList&)â
             attributes = attributes.addAttributes(jl_LLVMContext, i + 1, as);
                                                                            ^
In file included from /usr/lib64/llvm/5/include/llvm/IR/CallSite.h:32:0,
                 from /usr/lib64/llvm/5/include/llvm/Analysis/TargetLibraryInfo.h:16,
                 from /var/tmp/portage/dev-lang/julia-0.6.0/work/julia-0.6.0/src/codegen.cpp:48:
/usr/lib64/llvm/5/include/llvm/IR/Attributes.h:393:17: note: candidate: llvm::AttributeList llvm::AttributeList::addAttributes(llvm::LLVMContext&, unsigned int, const llvm::AttrBuilder&) const
   AttributeList addAttributes(LLVMContext &C, unsigned Index,
                 ^~~~~~~~~~~~~
/usr/lib64/llvm/5/include/llvm/IR/Attributes.h:393:17: note:   no known conversion for argument 3 from âconst llvm::AttributeListâ to âconst llvm::AttrBuilder&â
/var/tmp/portage/dev-lang/julia-0.6.0/work/julia-0.6.0/src/codegen.cpp: In function âvoid jl_init_codegen()â:
/var/tmp/portage/dev-lang/julia-0.6.0/work/julia-0.6.0/src/codegen.cpp:7344:5: error: âEngineBuilderâ was not declared in this scope
     EngineBuilder eb((std::unique_ptr<Module>(engine_module)));
     ^~~~~~~~~~~~~
/var/tmp/portage/dev-lang/julia-0.6.0/work/julia-0.6.0/src/codegen.cpp:7349:5: error: âebâ was not declared in this scope
     eb  .setEngineKind(EngineKind::JIT)
     ^~
/var/tmp/portage/dev-lang/julia-0.6.0/work/julia-0.6.0/src/codegen.cpp:7349:24: error: âEngineKindâ has not been declared
     eb  .setEngineKind(EngineKind::JIT)
                        ^~~~~~~~~~
make[1]: *** [Makefile:132: debuginfo.o] Error 1
make[1]: *** [Makefile:132: jitlayers.o] Error 1
make[1]: *** [Makefile:132: codegen.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-lang/julia-0.6.0/work/julia-0.6.0/src'
make: *** [Makefile:94: julia-src-release] Error 2
 * ERROR: dev-lang/julia-0.6.0::gentoo failed (compile phase):
 *   emake failed
Comment 1 James Cloos 2017-10-08 20:54:15 UTC
Part of the problem is that /usr/lib/llvm/5/bin is in PATH before /usr/lib/llvm/4/bin.

I tried editing /etc/profile.env and put llvm/4 before llvm/5 in PATH and ROOTPATH.

And with that change it julia-0.6.0-r1 merged.
Comment 2 EoD 2018-03-16 12:46:32 UTC
(In reply to James Cloos from comment #1)
> Part of the problem is that /usr/lib/llvm/5/bin is in PATH before
> /usr/lib/llvm/4/bin.
> 
> I tried editing /etc/profile.env and put llvm/4 before llvm/5 in PATH and
> ROOTPATH.
> 
> And with that change it julia-0.6.0-r1 merged.

As far as I know, this is intentional, as llvm's "has a linear release history" and hence the newest version is generally better.

Nowadays, you can use clang-4.0 in order to force an old version.
Comment 3 Larry the Git Cow gentoo-dev 2018-03-19 01:01:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e69e4d65126d5c92b52290154bc759b7a1a27aad

commit e69e4d65126d5c92b52290154bc759b7a1a27aad
Author:     Matthias Maier <tamiko@gentoo.org>
AuthorDate: 2018-03-18 22:15:33 +0000
Commit:     Matthias Maier <tamiko@gentoo.org>
CommitDate: 2018-03-19 01:00:55 +0000

    dev-lang/julia: version bump to 0.6.2
    
     * fix LLVM_MAXSLOT so that llvm/clang-4 is used for compilation
    
    Closes: https://bugs.gentoo.org/631978
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-lang/julia/Manifest           |   2 +
 dev-lang/julia/julia-0.6.2.ebuild | 192 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 194 insertions(+)