Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 768543

Summary: =www-client/firefox-85.0-r1 w/ rust-1.49.0: Failed to read used LLVM version from rustc!
Product: Gentoo Linux Reporter: awilum <r.ziman8>
Component: Current packagesAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED FIXED    
Severity: major CC: bob.mt.wya, contyk, gentoo, herrtimson, ionen, khler.marcus, kripton, lo48576, matoro_gentoo, ms, nrndda
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: firefox-85.0-r1 build.log
Emerge --info

Description awilum 2021-02-03 17:55:47 UTC
Created attachment 685677 [details]
firefox-85.0-r1 build.log

>>> Emerging (2 of 2) www-client/firefox-85.0-r1::gentoo
>>> Failed to emerge www-client/firefox-85.0-r1, Log file:
>>>  '/var/tmp/portage/www-client/firefox-85.0-r1/temp/build.log'
 * Package:    www-client/firefox-85.0-r1
 * Repository: gentoo
 * Maintainer: mozilla@gentoo.org
 * USE:        abi_x86_64 amd64 clang dbus elibc_glibc gmp-autoupdate hwaccel kernel_linux l10n_fr lto openh264 system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Checking for at least 13500 MiB disk space at "/var/tmp/portage/www-client/firefox-85.0-r1/temp" ...
 [ ok ]
 * Using LLVM slot 11 to build
 * ERROR: www-client/firefox-85.0-r1::gentoo failed (setup phase):
 *   Failed to read used LLVM version from rustc!
 * 
 * Call stack:
 *                ebuild.sh, line 125:  Called pkg_setup
 *   firefox-85.0-r1.ebuild, line 409:  Called die
 * The specific snippet of code:
 *                      [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
 * 
 * If you need support, post the output of `emerge --info '=www-client/firefox-85.0-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-client/firefox-85.0-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-client/firefox-85.0-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-client/firefox-85.0-r1/temp/die.env'.
 * Working directory: '/var/tmp/portage/www-client/firefox-85.0-r1/homedir'
 * S: '/var/tmp/portage/www-client/firefox-85.0-r1/work/firefox-85.0'

 * Messages for package www-client/firefox-85.0-r1:

 * ERROR: www-client/firefox-85.0-r1::gentoo failed (setup phase):
 *   Failed to read used LLVM version from rustc!
 * 
 * Call stack:
 *                ebuild.sh, line 125:  Called pkg_setup
 *   firefox-85.0-r1.ebuild, line 409:  Called die
 * The specific snippet of code:
 *                      [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
 * 
 * If you need support, post the output of `emerge --info '=www-client/firefox-85.0-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-client/firefox-85.0-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-client/firefox-85.0-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-client/firefox-85.0-r1/temp/die.env'.
 * Working directory: '/var/tmp/portage/www-client/firefox-85.0-r1/homedir'
 * S: '/var/tmp/portage/www-client/firefox-85.0-r1/work/firefox-85.0'

In the firefox-85.0-r1.ebuild:
local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')

Output of rustc:
$ rustc -Vv 2>/dev/null
rustc 1.49.0 (e1884a8e3 2020-12-29)
binary: rustc
commit-hash: e1884a8e3c3e813aada8254edfa120e85bf5ffca
commit-date: 2020-12-29
host: x86_64-unknown-linux-gnu
release: 1.49.0
Comment 1 awilum 2021-02-03 17:56:20 UTC
Created attachment 685680 [details]
Emerge --info
Comment 2 awilum 2021-02-03 18:01:03 UTC
[I] dev-lang/rust-bin
     Available versions:  (stable) 1.46.0 1.47.0-r1 (~)1.48.0 (~)1.49.0
       {clippy doc rls rustfmt ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32" CPU_FLAGS_X86="sse2"}
     Installed versions:  1.49.0(stable)(14:04:28 03/02/2021)(-clippy -doc -rls -rustfmt ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" CPU_FLAGS_X86="sse2")
     Homepage:            https://www.rust-lang.org/
     Description:         Systems programming language from Mozilla
Comment 3 Ionen Wolkens gentoo-dev 2021-02-03 21:41:01 UTC
with rust-1.49.0:

$ rustc -vV
rustc 1.49.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.49.0

(no mention of llvm)
Comment 4 matoro archtester 2021-02-04 00:31:27 UTC
Confirming this for:

=sys-devel/llvm-11.0.1
=dev-lang/rust-1.49.9[system-llvm]
Comment 5 wippie 2021-02-04 10:10:29 UTC
Confirming this.
Also, downgrading to rust-1.48 before emerge of firefox works, since this version outputs LLVM version as expected.

# rustc -vV
rustc 1.48.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.48.0
LLVM version: 11.0
Comment 6 inasprecali 2021-02-04 14:14:30 UTC
I can also confirm this problem on an ~amd64 machine.
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2021-02-04 23:00:03 UTC
There is a bug in current rust version.

dev-lang/rust will be probably rev bumped soon to get https://github.com/rust-lang/rust/commit/64c1b0d614949f405d8b4498a3b2ea59d9ec230e

We are looking into ways how to patch rust-bin.

But for now it is not planned to adjust the firefox ebuild because the check itself is correct needed in general (not required for current rust versions which are in sync with Gentoo's LLVM version but this can change).

Feel free to wait, manually patch dev-lang/rust, copy firefox ebuild to your overlay and remove the check, disable LTO or switch to GCC.
Comment 8 Ionen Wolkens gentoo-dev 2021-02-05 13:43:51 UTC
*** Bug 768873 has been marked as a duplicate of this bug. ***
Comment 9 Larry the Git Cow gentoo-dev 2021-02-05 18:33:57 UTC
The bug has been referenced in the following commit(s):

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

commit 913a1a9332f138872b8399a3d7fe1258b33f3d1a
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-02-05 18:32:14 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-02-05 18:32:14 +0000

    mail-client/thunderbird: add rust-1.49 llvm version workaround
    
    Bug: https://bugs.gentoo.org/768543
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 mail-client/thunderbird/thunderbird-78.7.0.ebuild | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

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

commit 5157ea485742d977868e7bd15f0f0451ea3e6a18
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2021-02-05 15:14:57 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-02-05 18:30:37 +0000

    www-client/firefox: add rust-1.49 llvm version workaround
    
    Bug: https://bugs.gentoo.org/768543
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/firefox-78.7.0.ebuild  | 16 +++++++++++++---
 www-client/firefox/firefox-85.0-r1.ebuild | 16 +++++++++++++---
 2 files changed, 26 insertions(+), 6 deletions(-)
Comment 10 Larry the Git Cow gentoo-dev 2021-02-05 19:31:33 UTC
The bug has been referenced in the following commit(s):

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

commit 5c10219a508f89e245ad8f25d1e04e262a34cd8c
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2021-02-03 22:06:35 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-02-05 19:30:15 +0000

    dev-lang/rust: add rustc -vV patch to 1.49.0
    
    No revbump, since moz ebuilds have workaround now and we can't patch
    rust-bin.
    
    Bug: https://bugs.gentoo.org/768543
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-lang/rust/files/1.49.0-llvm-ver-display.patch | 31 +++++++++++++++++++++++
 dev-lang/rust/rust-1.49.0.ebuild                  |  1 +
 2 files changed, 32 insertions(+)
Comment 11 Thomas Deutschmann (RETIRED) gentoo-dev 2021-02-05 20:14:17 UTC
All done, closing.
Comment 12 julgo 2021-02-06 07:43:04 UTC
dev-lang/spidermonkey
Comment 13 Larry the Git Cow gentoo-dev 2021-02-06 12:56:01 UTC
The bug has been referenced in the following commit(s):

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

commit e175988041502f41609360c0760499c5b16882d9
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-02-06 12:55:37 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-02-06 12:55:37 +0000

    dev-lang/spidermonkey: add rust-1.49 llvm version workaround
    
    Bug: https://bugs.gentoo.org/768543
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild | 18 ++++++++++++++----
 dev-lang/spidermonkey/spidermonkey-78.7.1.ebuild | 16 +++++++++++++---
 2 files changed, 27 insertions(+), 7 deletions(-)
Comment 14 Larry the Git Cow gentoo-dev 2021-02-11 23:49:21 UTC
The bug has been referenced in the following commit(s):

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

commit 3fa99dfedc5fb7a9b66a45bfefb47e0bb8914b64
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2021-02-11 22:33:31 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-02-11 23:40:56 +0000

    profiles/package.mask: mask rust-1.50.0
    
    Until moz ebuilds extend workaround for llvm version
    
    Bug: https://bugs.gentoo.org/768543
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 profiles/package.mask | 7 +++++++
 1 file changed, 7 insertions(+)