Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928664 - www-client/firefox-124.0.2 build fails on arm64: use of undeclared identifier '__NR_epoll_wait'
Summary: www-client/firefox-124.0.2 build fails on arm64: use of undeclared identifier...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-04-06 04:11 UTC by Chris Mansfield
Modified: 2024-04-07 07:43 UTC (History)
5 users (show)

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


Attachments
build log (bzip2 compressed) (build.log.bz2,358.87 KB, application/x-bzip2)
2024-04-06 04:11 UTC, Chris Mansfield
Details
emerge --info =www-client/firefox-124.0.2 (emerge.info,6.58 KB, text/plain)
2024-04-06 04:15 UTC, Chris Mansfield
Details
Fixed 0029-bgo-928137-add-epoll_pwait2-syscall-to-sandbox.patch builds on arm64 (0029-bgo-928137-add-epoll_pwait2-syscall-to-sandbox.patch,1.95 KB, patch)
2024-04-06 11:31 UTC, Janne Grunau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Mansfield 2024-04-06 04:11:24 UTC
Created attachment 889551 [details]
build log (bzip2 compressed)

I'm trying to emerge the newest Firefox release for my raspberry pi's but it keeps failing with this error:

166:35.40 In file included from Unified_cpp_sandbox_linux2.cpp:101:                                                                                                           
166:35.40 /var/tmp/portage/www-client/firefox-124.0.2/work/firefox-124.0.2/security/sandbox/linux/SandboxFilter.cpp:957:7: error: use of undeclared identifier '__NR_epoll_wait'                        

Seems strange as the previous version (124.0.1) built just fine on the same machine.
Comment 1 Chris Mansfield 2024-04-06 04:15:34 UTC
Created attachment 889552 [details]
emerge --info =www-client/firefox-124.0.2
Comment 2 Joonas Niilola gentoo-dev 2024-04-06 04:58:15 UTC
Hmm this is a case of mixing stable and unstable packages.
Comment 3 Joonas Niilola gentoo-dev 2024-04-06 05:10:07 UTC
(In reply to Joonas Niilola from comment #2)
> Hmm this is a case of mixing stable and unstable packages.

... or maybe not directly, because I seem to have the new syscall defines in glibc-2.38. 

But I now see you're using a very ancient kernel. Looks like the new syscall was added between kernels 5.10 and 5.15. I don't know if I want to create ebuild hacks for an unstable rapidly moving desktop package that requires kernel >5.10.

It is the patch 0029-bgo-928137-add-epoll_pwait2-syscall-to-sandbox.patch that was added between 124.0.1 and 124.0.2. Gentoo bug #928137 and upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1889045 - you can make a local edit removing that patch. But be aware, this patch should be landing upstream ~soon so you're required to update that kernel soon if you want to stick using Firefox rapid release.
Comment 4 Mart Raudsepp gentoo-dev 2024-04-06 09:37:36 UTC
It is failing on a asahi 6.6 based kernel and glibc-2.39 as well (clang).
Comment 5 James Calligeros 2024-04-06 09:40:23 UTC
This is reproducible on all my Apple Silicon Macs with the latest glibc and a new-ish kernel.

Kernel: sys-kernel/asahi-sources-6.6.0_p16
glibc: sys-libs/glibc-2.39-r2
Comment 6 Janne Grunau 2024-04-06 09:53:33 UTC
the patch is broken. on arm64 as epoll_wait and thus __NR_epoll_wait doesn't exists. The patch assumes that if __NR_epoll_pwait2 is defined __NR_epoll_wait will be as well. This is in general not true.
Comment 7 Janne Grunau 2024-04-06 11:31:59 UTC
Created attachment 889575 [details, diff]
Fixed 0029-bgo-928137-add-epoll_pwait2-syscall-to-sandbox.patch builds on arm64

I've attached a fixed version which doesn't assume that epoll_wait exists if epoll_pwait2 exists. Should fix build on the somewhat releveant arches arm64, longarch64, and riscv.
Comment 8 Joonas Niilola gentoo-dev 2024-04-06 16:13:50 UTC
Thanks, seems to have compiled on amd64 as well!
Comment 9 Larry the Git Cow gentoo-dev 2024-04-06 16:15:29 UTC
The bug has been closed via the following commit(s):

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

commit 015c1a9499ecffda2d743275baab1d6304fd9e1e
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2024-04-06 16:14:23 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2024-04-06 16:14:23 +0000

    www-client/firefox: arm64 build fix for 124.0.2
    
    Closes: https://bugs.gentoo.org/928664
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 www-client/firefox/Manifest               | 2 +-
 www-client/firefox/firefox-124.0.2.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 10 tt_1 2024-04-06 16:25:41 UTC
has arm been tested yet with the new patch?
Comment 11 Joonas Niilola gentoo-dev 2024-04-06 16:27:50 UTC
Firefox doesn't have ~arm keyword in Gentoo, and to my knowledge upstream also doesn't do arm builds. So I don't think it's been publicly tested at least anywhere.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-06 16:31:29 UTC
I also see no reason to believe the new patch wouldn't work, given what the error was...?
Comment 13 Janne Grunau 2024-04-06 16:49:13 UTC
the patch is build/run tested on arm64 by me. 32-bit arm shouldn't have had a problem with the original patch as it has the epoll_wait syscall.
Comment 14 tt_1 2024-04-06 16:50:43 UTC
(In reply to Janne Grunau from comment #13)
> the patch is build/run tested on arm64 by me. 32-bit arm shouldn't have had
> a problem with the original patch as it has the epoll_wait syscall.

thanks, I'll still give it a try once the 23.0 profile upgrade is through
Comment 15 Michał Dec 2024-04-07 07:37:27 UTC
I've just hit this bug today, but I've noticed I have an older patch
Comment 16 Joonas Niilola gentoo-dev 2024-04-07 07:43:09 UTC
(In reply to Michał Dec from comment #15)
> I've just hit this bug today, but I've noticed I have an older patch

emerge --sync and try again. Make sure your Manifest file lists the file "firefox-124-patches-04.tar.xz"