Summary: | www-client/firefox fails to build: error: use of undeclared identifier '{__NR_statx,__NR_rseq,__NR_fork}' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Paul Osmialowski <newchief> |
Component: | Current packages | Assignee: | Mozilla Gentoo Team <mozilla> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | herrtimson, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | ARM64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Paul Osmialowski
2020-11-13 19:30:04 UTC
Please attach the full build.log. This looks weird though. Have you got the latest linux-headers? (This is independent of the installed kernel *sources*). (In reply to Sam James from comment #1) > Please attach the full build.log. This looks weird though. Have you got the > latest linux-headers? (This is independent of the installed kernel > *sources*). Sorry: >sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) Yes, try 5.4 for me? Seems like you've just solved the mystery. No I don't have latest linux-headers on this machine, it's still linux-headers-4.4 to match with vendor-locked-in kernel 4.4.38. I guess updating it (and subsequent glibc rebuild) may result in unstable userspace... (In reply to Paul Osmialowski from comment #3) > Seems like you've just solved the mystery. No I don't have latest > linux-headers on this machine, it's still linux-headers-4.4 to match with > vendor-locked-in kernel 4.4.38. I guess updating it (and subsequent glibc > rebuild) may result in unstable userspace... Upgrading the headers is completely fine, it's independent of the kernel you need. glibc should be OK to upgrade too with newer headers. Ok, I'll try, but it will take time on this machine. Sadly, it still fails to build Unified_cpp_sandbox_linux3.cpp, yet this time the number of failing switch cases reduced to just one, __NR_fork: 538:00.26 /usr/lib/llvm/11/bin/aarch64-unknown-linux-gnu-clang++ -std=gnu++17 -o Unified_cpp_sandbox_linux3.o -c -I/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox_build/dist/system_wrappers -include /var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox-83.0/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DNS_NO_XPCOM -I/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox-83.0/security/sandbox/linux -I/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox_build/security/sandbox/linux -I/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox-83.0/security/sandbox/linux -I/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox-83.0/security/sandbox/chromium-shim -I/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox-83.0/security/sandbox/chromium -I/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox-83.0/nsprpub -I/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox_build/dist/include -I/usr/include/nspr -I/usr/include/nss -I/usr/include/nspr -I/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox_build/dist/include/nss -I/usr/include/pixman-1 -fPIC -DMOZILLA_CLIENT -include /var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox_build/mozilla-config.h -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -pipe -mcpu=cortex-a57 -mtune=cortex-a57 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -O2 -fomit-frame-pointer -funwind-tables -Wno-shadow -fexperimental-new-pass-manager -MD -MP -MF .deps/Unified_cpp_sandbox_linux3.o.pp -fcolor-diagnostics Unified_cpp_sandbox_linux3.cpp 538:04.68 In file included from Unified_cpp_sandbox_linux3.cpp:20: 538:04.68 /var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox-83.0/security/sandbox/linux/SandboxFilter.cpp:1423:12: error: use of undeclared identifier '__NR_fork' 538:04.68 case __NR_fork: 538:04.68 ^ 538:05.31 1 error generated. 538:05.32 gmake[4]: *** [/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox-83.0/config/rules.mk:676: Unified_cpp_sandbox_linux3.o] Error 1 538:05.32 gmake[4]: Leaving directory '/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox_build/security/sandbox/linux' 538:05.32 gmake[3]: *** [/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox-83.0/config/recurse.mk:72: security/sandbox/linux/target-objects] Error 2 538:05.34 gmake[3]: Leaving directory '/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox_build' 538:05.35 gmake[2]: *** [/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox-83.0/config/recurse.mk:34: compile] Error 2 538:05.41 gmake[2]: Leaving directory '/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox_build' 538:05.42 gmake[1]: *** [/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox-83.0/config/rules.mk:355: default] Error 2 538:05.45 gmake[1]: Leaving directory '/var/tmp/portage/www-client/firefox-83.0_rc2/work/firefox_build' 538:05.46 gmake: *** [client.mk:125: build] Error 2 538:05.50 99 compiler warnings present. [ebuild R ] sys-kernel/linux-headers-5.4-r1::gentoo USE="-headers-only" 0 KiB [ebuild R ] sys-libs/glibc-2.32-r2:2.2::gentoo USE="caps (crypt) gd multiarch ssp (static-libs) (-audit) (-cet) -compile-locales -custom-cflags -doc -headers-only (-multilib) -nscd -profile (-selinux) -static-pie -suid -systemtap -test (-vanilla)" 0 KiB I am almost certain that this is a result of sticking to old linux-headers. Now your system lacks support for all new __NR_* syscalls added in the past. Please upgrade to latest stable linux-headers *and* rebuild *all* packages depending on linux-headers to pick up __NR_statx, __NR_rseq and __NR_fork definition (don't forget about glibc). After a reboot, try again. In the meanwhile Sam will trigger a new build on our arm64 box just in case... But, I've rebuilt glibc and rebooted the machine before I started this failed build... Sam finished building on our arm64 box so this isn't a general problem. I run into this on my own with other packages on an outdated Gentoo system I was updating. All I can tell you based on this experience: Make sure that once you updated linux-headers, that you rebuild all packages depending on linux-headers (and the virtual) and maybe complete @system set. Doing emerge @system for some time now. Again, it will take time on this machine. Sadly it didn't help. I've rebuilt @system which included such critical things as gcc and binutils. Additionally, I've also rebuilt the clang compiler which for some time is the only one that can build firefox. The missing case bug still prevails. This missing constant was defined after the kernel version 4.4.38 that the vendor had provided. On this system I'm having the 4.4.38 sources unpacked in /usr/src and configured with whatever was exposed by vendor's kernel in /proc/config.gz - though it couldn't complete the entire build process, it was sufficient to install (and maintain) Gentoo on this machine. I've also got the gentoo-sources-5.4.48 installed, configured and compiled in /usr/src, I've tried to boot it, and although the bootloader accepted and started it, this kernel died soon after throwing some startup messages on the serial port, being unable to enumerate critical peripherals. Now I've redirected /usr/src/linux symlink to those configured and compiled 5.4.48-gentoo sources, also I've recompiled glibc again and rebooted the system. Firefox is being built now, we'll see how far this can go. The running kernel version doesn't matter. You can still build firefox with 3.x kernel. You really have to ensure that your system is up to date and knows about these syscalls. Keep in mind that even @system might be missing some critical packages. However, rebuilding all packages depending on sys-kernel/linux-headers and virtual/os-headers should resolve your issue. But the order could be important... I am closing this bug as INVALID because it's not a bug in firefox ebuild. For completeness, please be sure you don't get fooled by binaries packages -- you really need to rebuild to pick up changes from latest linux-headers. Also, do you use a build host or are you building directly on this host? There's not many of the binary packages installed in this system (and not many for arm64 Gentoo profiles available in general), the only thing that comes to my mind is... rust-bin. Also, I'm building everything natively on this machine, sadly, with MAKEOPTS="-j1 -l1" hence it can take forever with things like gcc, llvm, clang, webkits and firefox. No, I didn't mean something like rust-bin. With FEATURES=buildpkg or some emerge parameters for example you can create binpkgs by yourself. If you re-emerge these packages later and don't pay attention you can get fooled because you will just re-install binpkg instead of rebuilding the package like you intended to do. The only FEATURES I'm using -pid-sandbox, so this is not the issue here. Another attempt to build firefox just failed. Googling the error message I came across this: http://lists.llvm.org/pipermail/llvm-dev/2014-June/073603.html strangely, it's 2014 issue, while I have this board since 2018 and as I recall, 4.4 kernels weren't old at that time. OK, this code in question is coming from our musl patches. I'll guard the code between ifdef but till now I still don't understand why you hit this. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3acc858b86c6422ca957d32afddc8d6198bb2b2d commit 3acc858b86c6422ca957d32afddc8d6198bb2b2d Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-11-16 19:18:37 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-11-16 19:33:01 +0000 www-client/firefox: guard __NR_fork with ifdef Bug: https://bugs.gentoo.org/754297 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> www-client/firefox/Manifest | 2 +- www-client/firefox/firefox-83.0.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Please tell us if this will make firefox work for you so we can backport to ESR, too. Right, yet it will take some more time as it's now full version 83.0 (not merely _rc2) and it needs newer spidermonkey, which takes significant amount of time to build. Finally! >>> Source compiled. >>> Test phase [not enabled]: www-client/firefox-83.0 >>> Install www-client/firefox-83.0 into /home/tmp/portage/www-client/firefox-83.0/image * Unable to trace static ELF: /sbin/ldconfig: /sbin/ldconfig -p 0:01.80 /usr/bin/gmake -C . -j6 -s -w install 0:01.90 gmake: Entering directory '/home/tmp/portage/www-client/firefox-83.0/work/firefox_build' 0:01.92 gmake[1]: Entering directory '/home/tmp/portage/www-client/firefox-83.0/work/firefox_build/browser/installer' 0:18.21 gmake[1]: Leaving directory '/home/tmp/portage/www-client/firefox-83.0/work/firefox_build/browser/installer' 0:18.21 gmake: Leaving directory '/home/tmp/portage/www-client/firefox-83.0/work/firefox_build' * Disabling auto-update for gmp-gmpopenh264 plugin ... * Disabling auto-update for gmp-widevinecdm plugin ... * Installing langpack-pl@firefox.mozilla.org.xpi into /home/tmp/portage/www-client/firefox-83.0/image/usr/lib64/firefox/distribution/extensions ... >>> Completed installing www-client/firefox-83.0 into /home/tmp/portage/www-client/firefox-83.0/image * Final size of build directory: 5775280 KiB ( 5.5 GiB) * Final size of installed tree: 232012 KiB (226.5 MiB) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b07fd011e810d4609d8ef44d50098625aaccc77 commit 8b07fd011e810d4609d8ef44d50098625aaccc77 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-11-17 16:44:23 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-11-17 16:53:26 +0000 www-client/firefox: guard __NR_fork with ifdef Bug: https://bugs.gentoo.org/754297 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> www-client/firefox/Manifest | 2 +- www-client/firefox/firefox-78.5.0.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) |