Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 903411 - www-client/firefox: ~riscv keyword request
Summary: www-client/firefox: ~riscv keyword request
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Keywording (show other bugs)
Hardware: riscv Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords: CC-ARCHES, PullRequest
Depends on:
Blocks:
 
Reported: 2023-03-28 19:49 UTC by jinqiang zhang
Modified: 2023-03-31 05:40 UTC (History)
1 user (show)

See Also:
Package list:
www-client/firefox ~riscv
Runtime testing required: ---
nattka: sanity-check+


Attachments
build.log.xz (build.log.xz,388.19 KB, text/plain)
2023-03-29 23:03 UTC, jinqiang zhang
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jinqiang zhang 2023-03-28 19:49:48 UTC
Please add the riscv keyword, Gecko and SpiderMonkey now have riscv64 support, even SpiderMonkey has jit acceleration (since 110.0.0).
I tested it on a sifive unmatched board and it seems to work fine (faster than I expected).

Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=1717203
SpiderMonkey: https://bugzilla.mozilla.org/show_bug.cgi?id=1800431
Comment 1 jinqiang zhang 2023-03-28 20:05:33 UTC
In the past, due to many riscv-specific patches, firefox for riscv was maintained in the riscv overlay. These patches are no longer needed on firefox-111.0, we can keyword firefox in the main tree.

riscv overlay: https://github.com/gentoo/riscv/tree/master/www-client/firefox
Comment 2 Yixun Lan archtester gentoo-dev 2023-03-29 00:38:16 UTC
(In reply to jinqiang zhang from comment #1)
> In the past, due to many riscv-specific patches, firefox for riscv was
> maintained in the riscv overlay. These patches are no longer needed on
> firefox-111.0, we can keyword firefox in the main tree.
> 
> riscv overlay: https://github.com/gentoo/riscv/tree/master/www-client/firefox

that's really great news! thanks!
could you share your test case/result? by using which USEs, so we can at lease log some information here

to @mozilla team, I will give a double check, then push the riscv keywording support to portage tree without obvious missing points, many thanks!

after this is done, I will drop firefox from overlay..
Comment 3 Joonas Niilola gentoo-dev 2023-03-29 06:32:00 UTC
Sure, sounds good. I'd appreciate if you tested some use flag combinations that everything works, i.e. do we need to pre-emptively package.use.mask some flags (lto, pgo) on riscv? 

But please go ahead.
Comment 4 Andrew Cameron 2023-03-29 08:37:14 UTC
Is it possible to post a copy of the successful build.log?
Comment 5 jinqiang zhang 2023-03-29 08:41:45 UTC
(In reply to Yixun Lan from comment #2)
> could you share your test case/result? by using which USEs, so we can at
> lease log some information here

I used Google Search and opened the gentoo.org website. These two things are relatively smooth.

I also tried playing Youtube videos (probably related to the graphics card driver) and running Kraken Benchmark, both of which are relatively slow, but after enabling jit, Kraken Benchmark will be much faster. The performance improvement of Kraken Benchmark test is similar to  PLCT lab's (https://imgur.com/W4JFDM9).

I am using the default USE now, I have not opened pgo lto or other USE

[binary   R    ] www-client/firefox-111.0-3:rapid::gentoo  USE="X clang dbus gmp-autoupdate openh264 system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp -debug (-eme-free) -geckodriver -hardened -hwaccel -jack -libproxy -lto (-pgo) -pulseaudio -screencast (-selinux) -sndio -system-png (-system-python-libs) -wayland -wifi" L10N="-ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -ca-valencia -cak -cs -cy -da -de -dsb -el -en-CA -en-GB -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fur -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -ne -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -sc -sco -si -sk -sl -son -sq -sr -sv -szl -ta -te -th -tl -tr -trs -uk -ur -uz -vi -xh -zh-CN -zh-TW" 0 KiB

(In reply to Andrew Cameron from comment #4)
> Is it possible to post a copy of the successful build.log?

Sure. I can provide a copy later.
Comment 6 Andrew Cameron 2023-03-29 21:15:19 UTC
Where did you find the ebuild for www-client/firefox-111.0-3
I only see the ebuild for www-client/firefox-111.0
Comment 7 jinqiang zhang 2023-03-29 21:20:33 UTC
(In reply to Andrew Cameron from comment #6)
> Where did you find the ebuild for www-client/firefox-111.0-3
> I only see the ebuild for www-client/firefox-111.0

I'm using binpkg, -3 is a binpkg build number suffix, /var/cache/binpkgs/www-client/firefox/firefox-111.0-3.xpak.

Yes, it is www-client/firefox/firefox-111.0.ebuild.
Comment 8 Andrew Cameron 2023-03-29 21:33:21 UTC
When I try to emerge it I get the following error
852:48.08 /var/tmp/portage/www-client/firefox-111.0/work/firefox-111.0/security/
sandbox/linux/broker/SandboxBrokerUtils.h:29:4: error: Missing stat syscall incl
ude.
852:48.08 #  error Missing stat syscall include.
852:48.08    ^
853:12.86 In file included from Unified_cpp_linux_broker0.cpp:2:
853:12.86 /var/tmp/portage/www-client/firefox-111.0/work/firefox-111.0/security/sandbox/linux/broker/SandboxBroker.cpp:473:33: error: use of undeclared identifier 'statstruct'
853:12.86     return lstatsyscall(aPath, (statstruct*)aBuff);
853:12.86                                 ^
853:12.86 /var/tmp/portage/www-client/firefox-111.0/work/firefox-111.0/security/sandbox/linux/broker/SandboxBroker.cpp:473:44: error: expected expression
853:12.86     return lstatsyscall(aPath, (statstruct*)aBuff);
853:12.87                                            ^
853:13.21 /var/tmp/portage/www-client/firefox-111.0/work/firefox-111.0/security/sandbox/linux/broker/SandboxBroker.cpp:475:30: error: use of undeclared identifier 'statstruct'
853:13.21   return statsyscall(aPath, (statstruct*)aBuff);
build.log lines 7155-7169/38289 53%
853:13.21                              ^
853:13.21 /var/tmp/portage/www-client/firefox-111.0/work/firefox-111.0/security/sandbox/linux/broker/SandboxBroker.cpp:475:41: error: expected expression
853:13.21   return statsyscall(aPath, (statstruct*)aBuff);
853:13.21                                         ^
853:34.63 5 errors generated.
Comment 9 jinqiang zhang 2023-03-29 21:39:39 UTC
(In reply to Andrew Cameron from comment #8)
> When I try to emerge it I get the following error
> 852:48.08
> /var/tmp/portage/www-client/firefox-111.0/work/firefox-111.0/security/
> sandbox/linux/broker/SandboxBrokerUtils.h:29:4: error: Missing stat syscall
> incl
> ude.
> 852:48.08 #  error Missing stat syscall include.
> 852:48.08    ^
> 853:12.86 In file included from Unified_cpp_linux_broker0.cpp:2:
> 853:12.86
> /var/tmp/portage/www-client/firefox-111.0/work/firefox-111.0/security/
> sandbox/linux/broker/SandboxBroker.cpp:473:33: error: use of undeclared
> identifier 'statstruct'
> 853:12.86     return lstatsyscall(aPath, (statstruct*)aBuff);
> 853:12.86                                 ^
> 853:12.86
> /var/tmp/portage/www-client/firefox-111.0/work/firefox-111.0/security/
> sandbox/linux/broker/SandboxBroker.cpp:473:44: error: expected expression
> 853:12.86     return lstatsyscall(aPath, (statstruct*)aBuff);
> 853:12.87                                            ^
> 853:13.21
> /var/tmp/portage/www-client/firefox-111.0/work/firefox-111.0/security/
> sandbox/linux/broker/SandboxBroker.cpp:475:30: error: use of undeclared
> identifier 'statstruct'
> 853:13.21   return statsyscall(aPath, (statstruct*)aBuff);
> build.log lines 7155-7169/38289 53%
> 853:13.21                              ^
> 853:13.21
> /var/tmp/portage/www-client/firefox-111.0/work/firefox-111.0/security/
> sandbox/linux/broker/SandboxBroker.cpp:475:41: error: expected expression
> 853:13.21   return statsyscall(aPath, (statstruct*)aBuff);
> 853:13.21                                         ^
> 853:34.63 5 errors generated.

I noticed it. Same reason with bug #833001, we need --disable-sanbox on riscv. I added it on the pull request. Did you see https://github.com/gentoo/gentoo/pull/30386?
Comment 10 jinqiang zhang 2023-03-29 21:42:04 UTC
s/--disable-sanbox/--disable-sandbox/
Comment 11 Andrew Cameron 2023-03-29 21:59:15 UTC
Thank you. I have applied your patch to the ebuild in my test Repo and will know tomorrow if it works for me on my VisionFive 2 Risc V SBC running Gentoo
Comment 12 jinqiang zhang 2023-03-29 23:03:27 UTC
Created attachment 859251 [details]
build.log.xz

success build.log, use xzless read it. commit f812c51dda24 www-client/firefox: enable 111.0 jit on riscv
Comment 13 Andrew Cameron 2023-03-30 11:43:03 UTC
I can confirm that with your patches Firefox 111.0 builds successfully and runs on my Visionfive 2 Risc V SBC
Comment 14 Larry the Git Cow gentoo-dev 2023-03-31 05:40:21 UTC
The bug has been closed via the following commit(s):

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

commit 1331779a8ea5a506e359555846924b0e332868b0
Author:     jinqiang zhang <peeweep@0x0.ee>
AuthorDate: 2023-03-30 12:47:11 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2023-03-31 05:38:01 +0000

    www-client/firefox: keyword 111.0 for ~riscv
    
    Closes: https://bugs.gentoo.org/903411
    Closes: https://github.com/gentoo/gentoo/pull/30386
    Signed-off-by: jinqiang zhang <peeweep@0x0.ee>
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 www-client/firefox/firefox-111.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)