Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 877563 - =www-client/firefox-106.0 fails to compile with: ../media/ffvpx/libavutil/cpu.c:46:10: fatal error: sys/sysctl.h: No such file or directory
Summary: =www-client/firefox-106.0 fails to compile with: ../media/ffvpx/libavutil/cpu...
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: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-10-18 15:27 UTC by tt_1
Modified: 2022-10-20 08:37 UTC (History)
2 users (show)

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


Attachments
compressed build log (firefox-106.0-build-log.xz,472.30 KB, application/x-xz)
2022-10-18 15:27 UTC, tt_1
Details
output from emerge --info (emerge-info,5.18 KB, text/plain)
2022-10-18 15:28 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2022-10-18 15:27:53 UTC
Created attachment 824689 [details]
compressed build log

the build fails with: 

33:26.14 media/ffvpx/libavcodec/parser.o
33:26.16 /var/tmp/portage/portage/www-client/firefox-106.0/work/firefox_build/_virtualenvs/build/bin/python -m mozbuild.action.check_binary --target TestArray
33:26.18 /var/tmp/portage/portage/www-client/firefox-106.0/work/firefox-106.0/media/ffvpx/libavutil/cpu.c:46:10: fatal error: sys/sysctl.h: No such file or directory
33:26.18    46 | #include <sys/sysctl.h>
33:26.18       |          ^~~~~~~~~~~~~~
33:26.18 compilation terminated.


explanation: 

<sys/sysctl.h> is a header which was shipped with glibc before version glibc-2.32:

    The deprecated <sys/sysctl.h> header and the sysctl function have been
    removed. To support old binaries, the sysctl function continues to
    exist as a compatibility symbol (on those architectures which had it),
    but always fails with ENOSYS. This reflects the removal of the system
    call from all architectures, starting with Linux 5.5.

the include of this header is controlled via "HAVE_SYSCTL" in the file ../media/ffvpx/libavutil/cpu.c on line 46

if you grep for HAVE_SYSCTL inside of ../media/ffvpx/ , you're going to end up at various places:

config_unix64.asm:321:%define HAVE_SYSCTL 0
config_darwin64.h:315:#define HAVE_SYSCTL 1
config_win64.h:332:#define HAVE_SYSCTL 0
config_win64_aarch64.h:315:#define HAVE_SYSCTL 0
config_win32.asm:316:%define HAVE_SYSCTL 0
config_win64.asm:316:%define HAVE_SYSCTL 0
config_darwin64.asm:300:%define HAVE_SYSCTL 1
config_audio.h:315:#define HAVE_SYSCTL 0
config_android32.h:337:#define HAVE_SYSCTL 0
config_unix32.h:332:#define HAVE_SYSCTL 0
config_darwin_aarch64.h:337:#define HAVE_SYSCTL 1
config_android_x86_64.h:337:#define HAVE_SYSCTL 0
config_unix_aarch64.h:332:#define HAVE_SYSCTL 1
config_win32.h:332:#define HAVE_SYSCTL 0
config_android64.h:337:#define HAVE_SYSCTL 0
config_unix64.h:332:#define HAVE_SYSCTL 0
libavutil/cpu.c:41:#if HAVE_SYSCTL
libavutil/cpu.c:215:#elif HAVE_SYSCTL && defined(HW_NCPUONLINE)
libavutil/cpu.c:221:#elif HAVE_SYSCTL && defined(HW_NCPU)
config_generic.h:337:#define HAVE_SYSCTL 0

three unix configs report back correctly of not shipping the header, but one of them does:

config_unix_aarch64.h:332:#define HAVE_SYSCTL 1

which is why this must fail.
Comment 1 tt_1 2022-10-18 15:28:43 UTC
Created attachment 824691 [details]
output from emerge --info
Comment 2 tt_1 2022-10-18 15:32:29 UTC
upstream builds aarch64 with a rather old toolchain based on glibc-2.30, which still ships the header, so it never caught their attention.

upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1791275
upstream fix: https://hg.mozilla.org/mozilla-central/rev/0efaf5a00aac

sadly no backport to 106 beta, so 106 will have to pull in the patch into the patchset

so it will be fixed in 107.0 for good
Comment 3 Larry the Git Cow gentoo-dev 2022-10-20 08:37:20 UTC
The bug has been closed via the following commit(s):

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

commit 23bc24b49b9d79b16fda886bd9c36b4d2404001b
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2022-10-20 08:36:45 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-10-20 08:37:15 +0000

    www-client/firefox: add 106.0.1
    
     - include a fix for glibc-2.36 on arm64 failure.
    
    Closes: https://bugs.gentoo.org/877563
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 www-client/firefox/Manifest               |   99 +++
 www-client/firefox/firefox-106.0.1.ebuild | 1321 +++++++++++++++++++++++++++++
 2 files changed, 1420 insertions(+)