i have setup like https://wiki.gentoo.org/wiki/Clang, use to work for most package (except some which then i masked out), but after upgrading llvm4 to llvm5, most package build fail: clang flto: Invalid value (Producer: 'LLVM5.0.1' Reader: 'LLVM 4.0.1') this happens because llvmgold-4 never get rebuilt/upgraded into llvmgold-5, this leaves the plugin (Reader) stay at version LLVM 4.0.1 i'n not sure if there's a way for ebuild to handle this, but it should be noted in the wiki upgrading clang with gold/flto support enabled Reproducible: Always Steps to Reproduce: 1. upgrade from llvm4 to llvm5 2. emerge some pacakge that used to work with clang-flto Actual Results: bfd plugin: LLVM gold plugin has failed to create LTO module: Invalid value (Producer: 'LLVM5.0.1' Reader: 'LLVM 4.0.1') Expected Results: no error
Do you have USE=gold enabled on sys-devel/llvm?
Also, do you use '-D' when upgrading @world?
(In reply to Michał Górny from comment #1) > Do you have USE=gold enabled on sys-devel/llvm? yes of course (In reply to Michał Górny from comment #2) > Also, do you use '-D' when upgrading @world? nope, i just did and it works (after downgrading llvmgold and tried with --deep). thanks but i did do a "Find in page" looking for "upgrade" on the wiki but found 0 result I still insist on adding wiki info about how to upgrade clang like we have for GCC, why not :) an on topic but another issue is that, when i was fighting this problem i saw a bug report says about setting STRIP_MASK='*.a', and it fix about 20 of failed package which i had to gcc instead but now works on clang. it may not be a final solution but it's helpful it we have such info on the wiki page as a "temporary workaround"
(In reply to Xuefer from comment #3) > (In reply to Michał Górny from comment #1) > > Do you have USE=gold enabled on sys-devel/llvm? > yes of course > > (In reply to Michał Górny from comment #2) > > Also, do you use '-D' when upgrading @world? > > nope, i just did and it works (after downgrading llvmgold and tried with > --deep). thanks > but i did do a "Find in page" looking for "upgrade" on the wiki but found 0 > result > I still insist on adding wiki info about how to upgrade clang like we have > for GCC, why not :) '-D' is generally recommended for all @world upgrades, independently of which packages they apply to. Nevertheless, I'm going to stricten the dependencies of LLVM to avoid this in the future. > an on topic but another issue is that, when i was fighting this problem i > saw a bug report says about setting STRIP_MASK='*.a', and it fix about 20 of > failed package which i had to gcc instead but now works on clang. it may not > be a final solution but it's helpful it we have such info on the wiki page > as a "temporary workaround" Could you point me to that bug report? This sounds like a completely different issue.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48c0875ad17e2e396e9094e2958f83bbbec65e51 commit 48c0875ad17e2e396e9094e2958f83bbbec65e51 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2018-01-28 11:26:42 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2018-01-28 11:26:58 +0000 sys-devel/llvm: Require LLVMgold new enough to handle the bitcode Raise the dependency on sys-devel/llvmgold so that a version new enough to handle bitcode of all installed LLVM versions is always used. Closes: https://bugs.gentoo.org/645824 sys-devel/llvm/llvm-4.0.1-r1.ebuild | 2 +- sys-devel/llvm/llvm-5.0.1.ebuild | 2 +- sys-devel/llvm/llvm-6.0.9999.ebuild | 2 +- sys-devel/llvm/llvm-9999.ebuild | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)