Closed Bug 1839023 Opened 1 year ago Closed 1 year ago

firefox fails to compile with: ../js/src/jit/shared/AtomicOperations-shared-jit.cpp:54:11: error: 'HasAlignmentFault' was not declared in this scope

Categories

(Core :: JavaScript Engine, defect, P3)

Firefox 114
ARM
Unspecified
defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox-esr115 --- fixed
firefox116 --- fixed

People

(Reporter: herrtimson, Assigned: sergesanspaille)

References

Details

Attachments

(3 files)

Attached file build.log.xz

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0

Steps to reproduce:

I downloaded firefox-114.0 sources and compiled them with gcc-11, for armv7a

Actual results:

the build fails to compile with:

64:22.16 /usr/bin/armv7a-unknown-linux-gnueabihf-g++ --sysroot /usr/armv7a-unknown-linux-gnueabihf -o AtomicOperations-shared-jit.o -c -I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-114.0/work/firefox_build/dist/stl_wrappers -I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-114.0/work/firefox_build/dist/system_wrappers -include /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-114.0/work/firefox-114.0/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DJS_HAS_CTYPES -DEXPORT_JS_API -DMOZ_HAS_MOZGLUE -I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-114.0/work/firefox-114.0/js/src/jit -I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-114.0/work/firefox_build/js/src/jit -I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-114.0/work/firefox_build/js/src -I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-114.0/work/firefox-114.0/js/src -I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-114.0/work/firefox_build/dist/include -I/usr/armv7a-unknown-linux-gnueabihf/usr/include/nspr -I/usr/armv7a-unknown-linux-gnueabihf/usr/include/nss -I/usr/armv7a-unknown-linux-gnueabihf/usr/include/nspr -I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-114.0/work/firefox_build/dist/include/nss -I/usr/armv7a-unknown-linux-gnueabihf/usr/include/libpng16 -I/usr/armv7a-unknown-linux-gnueabihf/usr/include -I/usr/armv7a-unknown-linux-gnueabihf/usr/include -I/usr/armv7a-unknown-linux-gnueabihf/usr/include/pixman-1 -I/usr/armv7a-unknown-linux-gnueabihf/usr/include -DMOZILLA_CLIENT -include /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-114.0/work/firefox_build/js/src/js-confdefs.h -fno-sized-deallocation -fno-aligned-new -pipe -fomit-frame-pointer -fno-tree-loop-vectorize -mthumb -mfpu=neon -mfloat-abi=hard -mno-thumb-interwork -fPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -O2 -fomit-frame-pointer -funwind-tables -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-invalid-offsetof -Wc++2a-compat -Wcomma-subscript -Wvolatile -Wno-error=deprecated -Wno-error=deprecated-enum-enum-conversion -Wduplicated-cond -Wimplicit-fallthrough -Wlogical-op -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wno-multistatement-macros -Wno-error=class-memaccess -Wformat -Wformat-security -Wformat-overflow=2 -Wno-psabi -I/usr/armv7a-unknown-linux-gnueabihf/usr/include -Werror=format -Wno-attributes -fno-strict-aliasing -ffp-contract=off -MD -MP -MF .deps/AtomicOperations-shared-jit.o.pp -fdiagnostics-color /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-114.0/work/firefox-114.0/js/src/jit/shared/AtomicOperations-shared-jit.cpp
64:22.16 /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-114.0/work/firefox-114.0/js/src/jit/shared/AtomicOperations-shared-jit.cpp: In function 'bool js::jit::UnalignedAccessesAreOK()':
64:22.16 /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-114.0/work/firefox-114.0/js/src/jit/shared/AtomicOperations-shared-jit.cpp:54:11: error: 'HasAlignmentFault' was not declared in this scope
64:22.16 54 | return !HasAlignmentFault();
64:22.16 | ^~~~~~~~~~~~~~~~~

Expected results:

I expect the build to compile and to bake me a nice firefox binary

The full build log is attached in xz compression

This might be missing include, as this is a non unified build and the unified build is not affected.

The Bugbug bot thinks this bug should belong to the 'Core::JavaScript Engine: JIT' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → JavaScript Engine: JIT
Product: Firefox → Core
Blocks: sm-meta
Severity: -- → S3
Component: JavaScript Engine: JIT → JavaScript Engine
Priority: -- → P3
Hardware: Unspecified → ARM

I tried adding

#include "jit/arm/Simulator-arm.h"

to AtomicOperations-shared-jit.cpp , but that didn't work and yields the same error as before.

Any ideas which missing include it could be?

Flags: needinfo?(sguelton)

https://phabricator.services.mozilla.com/D181738 should do the trick, or so I hope...

Flags: needinfo?(sguelton) → needinfo?(herrtimson)
Assignee: nobody → sguelton
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

I can confirm this fixes the compile, armv7a non-unified builds are now possible with gcc-11 :)

if possible, can you please uplift the fix to the 115beta branch? It is sufficent if the fix will be in 115.1.0, if the merge window closes before you're able to make the request.

Flags: needinfo?(herrtimson)

it seems you extended the patch a bit, does it need additional testing?

oh, no, it's just formatting stuff.

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch

serge, can you please start the uplift process into firefox-115esr branch for this non-unified fix as well?

Flags: needinfo?(sguelton)

Uplift Approval Request

  • Explanation of risk level: Only signiuficant for gcc-built aarch64 non-unified builds.
  • Is Android affected?: no
  • String changes made/needed: ø
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: ø
  • User impact if declined: Some downstream maintainers are no longer able to compile fx with gcc on arm64
  • Code covered by automated testing: no
  • Risk associated with taking this patch: ø
  • Fix verified in Nightly: yes
Flags: needinfo?(sguelton)

A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)

Attachment #9342189 - Flags: approval-mozilla-esr115+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: