Closed Bug 1886378 Opened 6 months ago Closed 6 months ago

arm_neon_sve_bridge.h: No such file or directory when compiling libvpx

Categories

(Core :: Audio/Video, defect, P2)

ARM64
Linux
defect

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox124 --- unaffected
firefox125 --- unaffected
firefox126 --- wontfix
firefox127 --- fixed

People

(Reporter: dan, Assigned: chunmin)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files, 1 obsolete file)

I am getting a build failure on Linux/aarch64 (Fedora 38) in recent trunk, see bellow

...
/usr/bin/gcc -std=gnu99 -o vp9_error_sve.o -c  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DHAVE_CONFIG_H=vpx_config.h -DMOZ_HAS_MOZGLUE -I/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/media/libvpx -I/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/obj-aarch64-unknown-linux-gnu/media/libvpx -I/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/media/libvpx/config/linux/arm64 -I/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/media/libvpx/config -I/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/media/libvpx/libvpx -I/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/obj-aarch64-unknown-linux-gnu/dist/include -I/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/obj-aarch64-unknown-linux-gnu/dist/include/nspr -I/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/obj-aarch64-unknown-linux-gnu/dist/include/nss -include /home/jenkins/workspace/Firefox-default/label/aarch64/firefox/obj-aarch64-unknown-linux-gnu/mozilla-config.h -DMOZILLA_CLIENT -g0 -fPIC -fno-math-errno -pthread -gdwarf-4 -O2 -fno-omit-frame-pointer -funwind-tables -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wduplicated-cond -Wlogical-op -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-multistatement-macros -Wno-error=class-memaccess -Wformat -Wformat-overflow=2 -Werror=implicit-function-declaration -Wno-psabi -Wno-error=builtin-macro-redefined -Wno-sign-compare -Wno-unused-function -fno-strict-aliasing -ffp-contract=off  -MD -MP -MF .deps/vp9_error_sve.o.pp  -march=armv8.2-a+dotprod+i8mm+sve /home/jenkins/workspace/Firefox-default/label/aarch64/firefox/media/libvpx/libvpx/vp9/encoder/arm/neon/vp9_error_sve.c
In file included from /home/jenkins/workspace/Firefox-default/label/aarch64/firefox/media/libvpx/libvpx/vp9/encoder/arm/neon/vp9_error_sve.c:17:
/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/media/libvpx/libvpx/vpx_dsp/arm/vpx_neon_sve_bridge.h:16:10: fatal error: arm_neon_sve_bridge.h: No such file or directory
   16 | #include <arm_neon_sve_bridge.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[4]: *** [/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/config/rules.mk:600: vp9_error_sve.o] Error 1
gmake[4]: Leaving directory '/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/obj-aarch64-unknown-linux-gnu/media/libvpx'
gmake[3]: *** [/home/jenkins/workspace/Firefox-default/label/aarch64/firefox/config/recurse.mk:72: media/libvpx/target-objects] Error 2

Something changed in the last ~10 days, unfortunately I haven't seen this earlier.

I believe it is related to bug #1880814

Keywords: regression
Regressed by: 1880814

Ah, I think the SVE feature needs to be disabled on linux/aarch64 as we do in Windows/AArch64: https://phabricator.services.mozilla.com/D204798. Keep the NI until I submit the patch.

The missing header file seems to be provided by the compiler and will be available when building with GCC 14+, if I see right.

(In reply to Dan Horák from comment #4)

The missing header file seems to be provided by the compiler and will be available when building with GCC 14+, if I see right.

Hey Dan, good to hear the news! Let me know if the build works with GCC 14+.

Flags: needinfo?(cchang) → needinfo?(dan)

I don't have a system with gcc 14 handy right now, but it's my plan to check that. Anyway, gcc 14 hasn't been released yet, so at least a check about the SVE support would be useful in the buildsystem. Haven't checked how it looks with clang.

Flags: needinfo?(dan)
Assignee: nobody → cchang
Severity: -- → S4
Priority: -- → P2

:chunmin the Fx126 soft code freeze starts next week.
Do you plan on patching this before Fx126 goes to beta on 2024-04-15

Flags: needinfo?(cchang)

Yes, I'll submit a patch oncebug 1888772 is resolved.

Depends on: 1888772

This patch, akin to D204798 in bug 1880814 [1, 2], disables the SVE
features on the Linux/AArch64 platform.

[1] https://phabricator.services.mozilla.com/D204798
[2] https://hg.mozilla.org/mozilla-central/rev/d3a921beb422

This patch, similar to D204801 in bug 1880814 [1, 2], removes the
SVE-related files ending with _sve.c from the libvpx sources on Linux
AArch64 platforms. The SVE feature was disabled in the preceding patch.

[1] https://phabricator.services.mozilla.com/D204801
[2] https://hg.mozilla.org/mozilla-central/rev/a708b3c2ddc0

Depends on D206718

This patch updates the linux/aarch64 sources in our code base to the
SVE-disabled version. The commit version remains at 7fb8cec.

Depends on D206719

with the 3 changes applied I can build Firefox again on Fedora 38 on aarch64 (with gcc-13.2.1-7.fc38.aarch64)

And I have got my hands on Fedora Rawhide system with gcc 14 so I retried the build there and it still fails. A closer look shows that the arm_neon_sve_bridge.h got added only in December 2023 into the gcc git tree, which will make it available first in gcc 15 I believe.

Attachment #9395170 - Attachment description: Bug 1886378 - Remove files ending with *_sve.c* on linux/aarch64 → Bug 1886378 - Rework source-list generation across platforms and architectrues

Initially, vpx_config.c on various platform-architecture combinations
was revmoed from the input list for source list generation and later
added to the source list in moz.build. This was necessary because the
generated list was based solely on architecture, while the vpx_config.c
differed across platform-architecture combinations.

With the source list generation reworked in the previous patch, each
platform-architecture combination now has its own list. Therefore,
vpx_config.c can be directly included in the source list, simplifying
the process.

Depends on D206719

Attachment #9396064 - Attachment description: Bug 1886378 - Include vpx_config.c directly in source list → Bug 1886378 - Include vpx_config.c directly in source list
Attachment #9395171 - Attachment description: Bug 1886378 - Update linux/aarch64 sources to SVE-disabled version → Bug 1886378 - Update linux/aarch64 sources to SVE-disabled version
Attachment #9396064 - Attachment description: Bug 1886378 - Include vpx_config.c directly in source list → Bug 1886378 - Include vpx_config.c directly in source list

This patch updates the linux/aarch64 sources in our code base to the
SVE-disabled version. The commit version remains at 7fb8cec.

Depends on D207183

Attachment #9396933 - Attachment is obsolete: true
Attachment #9395171 - Attachment description: Bug 1886378 - Update linux/aarch64 sources to SVE-disabled version → Bug 1886378 - Update linux/aarch64 sources to SVE-disabled version
Pushed by cchang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2143ac890f26 Disable SVE on linux/aarch64 r=glandium https://hg.mozilla.org/integration/autoland/rev/bdcc287fced5 Rework source-list generation across platforms and architectrues r=glandium https://hg.mozilla.org/integration/autoland/rev/e82d37e48dcd Include vpx_config.c directly in source list r=glandium https://hg.mozilla.org/integration/autoland/rev/bfaf7b3f0e79 Update linux/aarch64 sources to SVE-disabled version r=glandium

Confirming it builds OK again on aarch64 after the committed changes.

The patch landed in nightly and beta is affected.
:chunmin, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox126 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(cchang)

This bug just disables SVE features on Linux, so there should be no impactful functionality changes, and has no need to be uplifted.

Flags: needinfo?(cchang)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: