Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 821091 - dev-lang/spidermonkey-78.15.0 get rid of llvm-objdump using gcc objdump
Summary: dev-lang/spidermonkey-78.15.0 get rid of llvm-objdump using gcc objdump
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-31 13:18 UTC by Ulenrich
Modified: 2021-11-01 12:43 UTC (History)
1 user (show)

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


Attachments
build_and_test_spidermonkey_with_gcc_objdump.gz (spidermonkey-78.15.0-r2:20211031-194940.log.gz,684.23 KB, application/gzip)
2021-10-31 21:17 UTC, Ulenrich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulenrich 2021-10-31 13:18:38 UTC
I wonder why dev-lang/spidermonkey depend on sys-devel/llvm
despite these disabled USEs:
---
 # emerge -1pv spidermonkey && \
echo "------" &&echo "Despite USE spidermonkey needs llvm:" && \
emerge -cvp $(qlist -IC sys-devel/llvm)

These are the packages that would be merged, in order:

Calculating dependencies  .... done!
[ebuild   R   ~] dev-lang/spidermonkey-78.15.0:78::gentoo  USE="-clang -debug -jit -lto -test" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
------
Despite USE spidermonkey needs llvm:

Calculating dependencies ... done!
  sys-devel/llvm-12.0.1 pulled in by:
    dev-lang/spidermonkey-78.15.0 requires sys-devel/llvm:12
    sys-devel/llvmgold-12 requires sys-devel/llvm:12[gold]

  sys-devel/llvm-common-12.0.1 pulled in by:
    sys-devel/llvm-12.0.1 requires sys-devel/llvm-common

  sys-devel/llvmgold-12 pulled in by:
    sys-devel/llvm-12.0.1 requires >=sys-devel/llvmgold-12

>>> No packages selected for removal by depclean
Comment 1 Tee KOBAYASHI 2021-10-31 14:14:56 UTC
See https://bugs.gentoo.org/740890
Comment 2 Ulenrich 2021-10-31 17:06:34 UTC
(In reply to Tee KOBAYASHI from comment #1)
> See https://bugs.gentoo.org/740890
Arrgh, 
this bdepends exists, because llvm-objdump is needed in the build. Therefore this is an upstream issue? I wonder if we could fake the llvm-objdump by showing a simple symbolic link to the spidermonkey configure srcript using objdump of the gcc compiler suite, like:
/usr/bin/llvm-objdump -> /usr/x86_64-pc-linux-gnu/bin/objdump
because the objdump from gcc has pretty much the same options like llvm-objdump.
Comment 3 Ulenrich 2021-10-31 17:49:43 UTC
(In reply to Ulenrich from comment #2)
> (In reply to Tee KOBAYASHI from comment #1)
> > See https://bugs.gentoo.org/740890
> Arrgh, 
> this bdepends exists, because llvm-objdump is needed in the build. 

I am just trying:
1. emerge -C sys-devel/llvm-common sys-devel/llvm
2. ln -s /usr/x86_64-pc-linux-gnu/bin/objdump /usr/bin/llvm-objdump
3. created a spidermonkey ebuild without bdepend llvm
4. try to emerge spidermonkey without any of llvm,
and this is now beyond any configure script running emerge:
---
emerge spidermonkey

These are the packages that would be merged, in order:

Calculating dependencies  ........ done!
[ebuild     U ~] dev-lang/spidermonkey-78.15.0-r1:78::locali [78.15.0:78::gentoo] USE="-clang -debug -jit -lto -test" 0 KiB

Total: 1 package (1 upgrade), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild manifests
>>> Running pre-merge checks for dev-lang/spidermonkey-78.15.0-r1
 * Checking for at least 6400 MiB disk space at "/srv/portage/dev-lang/spidermonkey-78.15.0-r1/temp" ...                                                                                     [ ok ]
>>> Emerging (1 of 1) dev-lang/spidermonkey-78.15.0-r1::locali
>>> Jobs: 0 of 1 complete, 1 running                Load
---

my emerge audit shows progress:
---
 max	4877428 dev-lang/spidermonkey: 2755 average for 13 merges
 kB   	3230536 /srv/portage/dev-lang/spidermonkey-78.15.0-r1
 kB   	3266216 /srv/portage/dev-lang/spidermonkey-78.15.0-r1
--- 
I wonder why in bug 740890 nobody tried this? Because we cannot create a symlink?
Comment 4 Ulenrich 2021-10-31 19:07:31 UTC
How can I test this spidermonkey build with enabled USE=test. I have never done this. Because I am sceptical if in deed the ggc objdump is doing the same as the llvm-objdump, therefore I have emerged with USE=test:
---
 # emerge spidermonkey

These are the packages that would be merged, in order:

Calculating dependencies  ....... done!
[ebuild     U ~] dev-lang/spidermonkey-78.15.0-r2:78::locali [78.15.0-r1:78::locali] USE="-clang -debug jit* -lto test*" 0 KiB

Total: 1 package (1 upgrade), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild manifests
>>> Running pre-merge checks for dev-lang/spidermonkey-78.15.0-r2
 * Checking for at least 7600 MiB disk space at "/srv/portage/dev-lang/spidermonkey-78.15.0-r2/temp" ...                                                              [ ok ]
>>> Emerging (1 of 1) dev-lang/spidermonkey-78.15.0-r2::locali
>>> Installing (1 of 1) dev-lang/spidermonkey-78.15.0-r2::locali
>>> Jobs: 1 of 1 complete                           Load avg: 1.14, 1.51, 1.88
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.
---
But how do I proceed with testing this spidermonkey build with gcc objdump?
Comment 5 Tee KOBAYASHI 2021-10-31 19:22:49 UTC
You can use

FEATURES="test" emerge spidermonkey

or

ebuild $(equery w spidermonkey) test
Comment 6 Ulenrich 2021-10-31 21:15:13 UTC
I had emerged spidermonkey before, so I uses this for test purpose:

(In reply to Tee KOBAYASHI from comment #5) 
> ebuild $(equery w spidermonkey) test

The above command builds spidermonkey again and tests for about half an hour. It ended with these two lines:
---
PASS
>>> Completed testing dev-lang/spidermonkey-78.15.0-r2
---
Conclusion: We can replace /usr/bin/llvm-objdump with the gcc objdump by purging llvm and creating a symlink:
lrwxrwxrwx 1 root root 36 Okt 31 20:54 /usr/bin/llvm-objdump -> /usr/x86_64-pc-linux-gnu/bin/objdump
Comment 7 Ulenrich 2021-10-31 21:17:46 UTC
Created attachment 747765 [details]
build_and_test_spidermonkey_with_gcc_objdump.gz

Log of test