Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 788763 - >=dev-lang/spidermonkey-78.10.1 fails to find llvm-objdump unless llvm-12 is used by the host during cross compile
Summary: >=dev-lang/spidermonkey-78.10.1 fails to find llvm-objdump unless llvm-12 is ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-07 15:44 UTC by tt_1
Modified: 2021-05-08 19:55 UTC (History)
2 users (show)

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


Attachments
compressed build log (spidermonkey-log.gz,5.04 KB, application/gzip)
2021-05-07 15:45 UTC, tt_1
Details
compressed configure log (spidermonkey-config.log.gz,6.57 KB, application/gzip)
2021-05-07 15:47 UTC, tt_1
Details
output from emerge --info (cross-target) (emerge-info.prefix,4.78 KB, text/plain)
2021-05-07 15:48 UTC, tt_1
Details
fix.patch (0001-dev-lang-spidermonkey-fix-LLVM-slot-test.patch,1008 bytes, patch)
2021-05-08 13:37 UTC, David Michael
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2021-05-07 15:44:54 UTC
so, this is a bit of a cornercase but: 

emerge-armv7a-unknown-linux-gnueabihf -av spidermonkey is going to fail with this message: 

checking for gmake... /usr/bin/gmake
checking for watchman... not found
checking for xargs... /usr/bin/xargs
checking for rpmbuild... not found
checking for NSIS version... no
checking for llvm-objdump... not found
DEBUG: llvm_objdump: Trying llvm-objdump
ERROR: Cannot find llvm-objdump

!!! Please attach the following file when seeking support:
!!! /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/dev-lang/spidermonkey-78.10.1/work/build/config.log
 * ERROR: dev-lang/spidermonkey-78.10.1::gentoo failed (configure phase):
 *   econf failed


this is a bug in the ebuild, that is triggered when llvm_setup fails to find the correct slot: 

>>> Emerging (1 of 1) dev-lang/spidermonkey-78.10.1::gentoo for /usr/armv7a-unknown-linux-gnueabihf/
 * Using LLVM slot 12 to build

while only llvm-11 slot is present with the host and no llvm at all is present in the prefix. 

So, the einfo https://github.com/gentoo/gentoo/blob/master/dev-lang/spidermonkey/spidermonkey-78.10.1.ebuild#L130 is lying to us! :-)
Comment 1 tt_1 2021-05-07 15:45:58 UTC
Created attachment 706509 [details]
compressed build log
Comment 2 tt_1 2021-05-07 15:47:30 UTC
Created attachment 706515 [details]
compressed configure log
Comment 3 tt_1 2021-05-07 15:48:14 UTC
Created attachment 706518 [details]
output from emerge --info (cross-target)
Comment 4 tt_1 2021-05-08 05:26:58 UTC
native compile seems to show the same issue, when choosing the llvm slot. I don't have llvm-12 on that machine, only llvm-11.1: 



>>> Emerging (1 of 1) dev-lang/spidermonkey-78.10.1::gentoo
 * firefox-78.10.1esr.source.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                                  [ ok ]
 * firefox-78esr-patches-12.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                                   [ ok ]
 * spidermonkey-78-patches-03.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                                 [ ok ]
 * Checking for at least 6400 MiB disk space at "/var/tmp/portage/dev-lang/spidermonkey-78.10.1/temp" ...                                                                        [ ok ]
 * Using LLVM slot 12 to build
 * Using python3.8 to build
>>> Unpacking source...
>>> Unpacking firefox-78.10.1esr.source.tar.xz to /var/tmp/portage/dev-lang/spidermonkey-78.10.1/work
Comment 5 David Michael 2021-05-08 13:23:47 UTC
I might have encountered this in a different scenario, or at least I didn't notice incorrect slots.

It looks like this happens when llvm is first being installed as a spidermonkey dependency and its env.d file is not loaded into the environment.  (The llvm-objdump tool is not in PATH by default.)  I was able to work around this failure by setting LLVM_OBJDUMP=/usr/lib/llvm/11/bin/llvm-objdump in the environment.
Comment 6 David Michael 2021-05-08 13:30:41 UTC
Oops, nevermind my previous comment, I had a polluted environment when I tested it.  I tried again from a cleaner root, and it looks like what you described.  Setting LLVM_OBJDUMP still works around the failure, though.
Comment 7 David Michael 2021-05-08 13:37:24 UTC
Created attachment 706629 [details, diff]
fix.patch
Comment 8 tt_1 2021-05-08 15:14:08 UTC
yes, this fixes both reported issues. 

please allow a few days to check if firefox and friends are also affected, thank you
Comment 9 Thomas Deutschmann (RETIRED) gentoo-dev 2021-05-08 18:52:20 UTC
Oh, I missed

> If llvm_check_deps() is not defined,
                       ^^^^^^^^^^^^^^
> the function defaults to checking whether sys-devel/llvm:${LLVM_SLOT} is installed. 

So yes, we need to check for LLVM version if we override that function.
Comment 10 Larry the Git Cow gentoo-dev 2021-05-08 19:21:03 UTC
The bug has been referenced in the following commit(s):

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

commit 17a87a43efc1bafd17efa0a03d5c2af7178ff904
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-05-08 19:20:06 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-05-08 19:20:57 +0000

    mail-client/thunderbird: check for sys-devel/llvm:$LLVM_SLOT in llvm_check_deps()
    
    When we override llvm_check_deps(), we have to check for
    sys-devel/llvm:$LLVM_SLOT on our own.
    
    Bug: https://bugs.gentoo.org/788763
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 mail-client/thunderbird/thunderbird-78.10.1.ebuild | 5 +++++
 1 file changed, 5 insertions(+)

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

commit 32728668bf3e609dab53f4fb5c1b1cf004db32ff
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-05-08 19:19:14 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-05-08 19:20:57 +0000

    www-client/firefox: check for sys-devel/llvm:$LLVM_SLOT in llvm_check_deps()
    
    When we override llvm_check_deps(), we have to check for
    sys-devel/llvm:$LLVM_SLOT on our own.
    
    Bug: https://bugs.gentoo.org/788763
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/firefox-78.10.1.ebuild | 5 +++++
 www-client/firefox/firefox-88.0.1.ebuild  | 5 +++++
 2 files changed, 10 insertions(+)

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

commit bbf71d409405483a3bce4780cca8a25c5d7fc942
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-05-08 19:18:10 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-05-08 19:20:56 +0000

    dev-lang/spidermonkey: check for sys-devel/llvm:$LLVM_SLOT in llvm_check_deps()
    
    When we override llvm_check_deps(), we have to check for
    sys-devel/llvm:$LLVM_SLOT on our own.
    
    Thanks-to: David Michael <fedora.dm0@gmail.com>
    Bug: https://bugs.gentoo.org/788763
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 dev-lang/spidermonkey/spidermonkey-78.10.1.ebuild | 5 +++++
 1 file changed, 5 insertions(+)
Comment 11 Larry the Git Cow gentoo-dev 2021-05-08 19:55:50 UTC
The bug has been referenced in the following commit(s):

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

commit 59eb17fd52e53d2c59bbc43b9264c49846dec0ac
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-05-08 19:54:07 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-05-08 19:55:42 +0000

    Revert "mail-client/thunderbird: check for sys-devel/llvm:$LLVM_SLOT in llvm_check_deps()"
    
    This reverts commit 17a87a43efc1bafd17efa0a03d5c2af7178ff904.
    
    Bug: https://bugs.gentoo.org/788763
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 mail-client/thunderbird/thunderbird-78.10.1.ebuild | 5 -----
 1 file changed, 5 deletions(-)

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

commit fa84cd83ddc48415ec3e124a7bf789312a71fefe
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-05-08 19:52:18 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-05-08 19:55:24 +0000

    Revert "www-client/firefox: check for sys-devel/llvm:$LLVM_SLOT in llvm_check_deps()"
    
    This reverts commit 32728668bf3e609dab53f4fb5c1b1cf004db32ff.
    
    Not needed for firefox where we already check for clang:$LLVM_SLOT
    which will depend on corresponding llvm slot.
    
    Bug: https://bugs.gentoo.org/788763
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/firefox-78.10.1.ebuild | 5 -----
 www-client/firefox/firefox-88.0.1.ebuild  | 5 -----
 2 files changed, 10 deletions(-)