Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 645824 - sys-devel/clang flto: Invalid value (Producer: 'LLVM5.0.1' Reader: 'LLVM 4.0.1')
Summary: sys-devel/clang flto: Invalid value (Producer: 'LLVM5.0.1' Reader: 'LLVM 4.0.1')
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-26 17:26 UTC by Xuefer
Modified: 2018-01-28 11:27 UTC (History)
1 user (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 Xuefer 2018-01-26 17:26:10 UTC
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
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-01-27 08:32:59 UTC
Do you have USE=gold enabled on sys-devel/llvm?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-01-27 08:33:12 UTC
Also, do you use '-D' when upgrading @world?
Comment 3 Xuefer 2018-01-28 11:08:42 UTC
(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"
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-01-28 11:17:20 UTC
(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.
Comment 5 Larry the Git Cow gentoo-dev 2018-01-28 11:27:12 UTC
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(-)