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

Bug 746947

Summary: dev-lang/spidermonkey-78.3.0 build ends with mozglue/static/rust/lib.rs:89: error: undefined reference to 'RustMozCrash'
Product: Gentoo Linux Reporter: Roy Bamford <neddyseagoon>
Component: Current packagesAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED FIXED    
Severity: normal CC: jstein, sam
Priority: Normal    
Version: unspecified   
Hardware: ARM64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: spidermonkey-78.3.0 build log

Description Roy Bamford gentoo-dev 2020-10-06 18:46:30 UTC
Created attachment 664117 [details]
spidermonkey-78.3.0 build log

dev-lang/spidermonkey-78.3.0 fails to link on arm64

Build log attached.
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2020-10-06 22:23:44 UTC
Please add `emerge --info` for completeness but this is caused by LTO in your CFLAGS:

> checking whether the C compiler (/usr/bin/aarch64-unknown-linux-gnu-gcc -std=gnu99 -mcpu=cortex-a72+crc -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto=6 -Wl,-O1 -Wl,--as-needed ) works... (cached) yes

See also: https://forums.gentoo.org/viewtopic-p-8501895.html#8501895
Comment 2 Larry the Git Cow gentoo-dev 2020-10-07 01:03:38 UTC
The bug has been closed via the following commit(s):

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

commit f86cb89cde8192adfdab42ee0b69109ddc12f1bd
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-10-07 01:01:00 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-10-07 01:03:32 +0000

    dev-lang/spidermonkey: add USE=lto
    
    Forcing LTO via CFLAGS is not enough -- we need to tell build system
    that we want to use LTO.
    
    Closes: https://bugs.gentoo.org/746947
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 dev-lang/spidermonkey/metadata.xml               |  1 +
 dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild | 14 ++++++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)