build failure with conflicting swap64 symbol since #1065894
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox77 | --- | unaffected |
firefox78 | --- | fixed |
firefox79 | --- | fixed |
People
(Reporter: gaston, Assigned: jandem)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
78.0b1 fails to build on OpenBSD because swap32/swap64 are macros defined in sys/endian.h
, cf https://github.com/openbsd/src/blob/master/sys/sys/endian.h#L69:
In file included from /usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/new-regexp/regexp-macro-assembler-arch.h:18: [96/9107]
/usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/MacroAssembler.h:854:15: error: expected ')'
/usr/include/sys/endian.h:72:19: note: expanded from macro 'swap64'
#define swap64(x) __swap64(x)
^
/usr/include/sys/_endian.h:91:39: note: expanded from macro '__swap64'
(__uint64_t)(__builtin_constant_p(x) ? __swap64gen(x) : __swap64md(x))
^
/usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/MacroAssembler.h:854:15: note: to match this '('
/usr/include/sys/endian.h:72:19: note: expanded from macro 'swap64'
#define swap64(x) __swap64(x)
^
/usr/include/sys/_endian.h:91:14: note: expanded from macro '__swap64'
(__uint64_t)(__builtin_constant_p(x) ? __swap64gen(x) : __swap64md(x))
^
In file included from Unified_cpp_js_src_new-regexp1.cpp:47:
In file included from /usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/new-regexp/regexp-native-macro-assembler.cc:16:
In file included from /usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/MacroAssembler-inl.h:20:
In file included from /usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/x64/MacroAssembler-x64-inl.h:12:
/usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h:136:22: error: expected unqualified-id
void MacroAssembler::swap32(Register reg) { bswapl(reg); }
^
/usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h:136:22: error: call to non-static member function without an object argument
void MacroAssembler::swap32(Register reg) { bswapl(reg); }
^~~~~~~~~~~~~~~~~~~~
/usr/include/sys/endian.h:71:19: note: expanded from macro 'swap32'
#define swap32(x) __swap32(x)
^~~~~~~~~~~
/usr/include/sys/_endian.h:89:3: note: expanded from macro '__swap32'
(__uint32_t)(__builtin_constant_p(x) ? __swap32gen(x) : __swap32md(x))
^~~~~~~~~~
In file included from Unified_cpp_js_src_new-regexp1.cpp:47:
In file included from /usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/new-regexp/regexp-native-macro-assembler.cc:16:
In file included from /usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/MacroAssembler-inl.h:20:
/usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/x64/MacroAssembler-x64-inl.h:136:22: error: expected unqualified-id
void MacroAssembler::swap64(Register64 reg) { bswapq(reg.reg); }
^
/usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/x64/MacroAssembler-x64-inl.h:136:22: error: call to non-static member function without an object argument
void MacroAssembler::swap64(Register64 reg) { bswapq(reg.reg); }
^~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/endian.h:72:19: note: expanded from macro 'swap64'
#define swap64(x) __swap64(x)
^~~~~~~~~~~
/usr/include/sys/_endian.h:91:3: note: expanded from macro '__swap64'
(__uint64_t)(__builtin_constant_p(x) ? __swap64gen(x) : __swap64md(x))
^~~~~~~~~~
8 errors generated.
In file included from /usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/x64/SharedICRegisters-x64.h:10:
/usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/MacroAssembler.h:851:15: error: expected ')'
/usr/include/sys/endian.h:71:19: note: expanded from macro 'swap32'
#define swap32(x) __swap32(x)
^
/usr/include/sys/_endian.h:89:39: note: expanded from macro '__swap32'
(__uint32_t)(__builtin_constant_p(x) ? __swap32gen(x) : __swap32md(x))
^
/usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/MacroAssembler.h:851:15: note: to match this '('
/usr/include/sys/endian.h:71:19: note: expanded from macro 'swap32'
#define swap32(x) __swap32(x)
^
/usr/include/sys/_endian.h:89:14: note: expanded from macro '__swap32'
(__uint32_t)(__builtin_constant_p(x) ? __swap32gen(x) : __swap32md(x))
/usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/MacroAssembler.h:854:15: error: C++ requires a type specifier for all declarations
inline void swap64(Register64 reg) PER_ARCH;
^
/usr/include/sys/endian.h:72:19: note: expanded from macro 'swap64'
#define swap64(x) __swap64(x)
^
/usr/include/sys/_endian.h:91:15: note: expanded from macro '__swap64'
(__uint64_t)(__builtin_constant_p(x) ? __swap64gen(x) : __swap64md(x))
In file included from /usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/x64/SharedICRegisters-x64.h:10:
/usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/MacroAssembler.h:854:15: error: expected ')'
/usr/include/sys/endian.h:72:19: note: expanded from macro 'swap64'
#define swap64(x) __swap64(x)
^
/usr/include/sys/_endian.h:91:39: note: expanded from macro '__swap64'
(__uint64_t)(__builtin_constant_p(x) ? __swap64gen(x) : __swap64md(x))
^
/usr/obj/ports/firefox-78.0beta1/firefox-78.0/js/src/jit/MacroAssembler.h:854:15: note: to match this '('
/usr/include/sys/endian.h:72:19: note: expanded from macro 'swap64'
#define swap64(x) __swap64(x)
^
/usr/include/sys/_endian.h:91:14: note: expanded from macro '__swap64'
(__uint64_t)(__builtin_constant_p(x) ? __swap64gen(x) : __swap64md(x))
^
4 errors generated.
Reporter | ||
Comment 1•4 years ago
|
||
An option would be to rename those two swap64/swap32 methods to 'something else', or to #undef the existing macros in the consumers ?
Reporter | ||
Comment 2•4 years ago
|
||
after quick testing, adding #undef swap64 #undef swap32 somewhere at the beginning of MacroAssembler.h seems to help, would that be acceptable ?
Updated•4 years ago
|
Comment 3•4 years ago
|
||
Set release status flags based on info from the regressing bug 1065894
Assignee | ||
Comment 4•4 years ago
|
||
(In reply to Landry Breuil (:gaston) from comment #2)
after quick testing, adding #undef swap64 #undef swap32 somewhere at the beginning of MacroAssembler.h seems to help, would that be acceptable ?
I think I'd prefer renaming swap32 => byteSwap32
(and similar for swap64
, swap16SignExtend
, swap16ZeroExtend
) in js/src/jit to sidestep the issue. Do you want to write the patch?
Reporter | ||
Comment 5•4 years ago
|
||
that would also work for us ! sadly those days i dont think i'll have much time to tackle that...
Updated•4 years ago
|
Updated•4 years ago
|
Reporter | ||
Comment 6•4 years ago
|
||
jan, can this come back on the radar for 78 ? it would be a pity to have to fix that in an esr branch..
Assignee | ||
Comment 7•4 years ago
|
||
Unfortunately OpenBSD has a header file defining swap{16,32,64} macros.
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 9•4 years ago
|
||
Comment on attachment 9156979 [details]
Bug 1642883 - Rename MacroAssembler swap* methods to byteSwap* to fix OpenBSD build failures. r?caroline!
This is just renaming some functions to fix the build on a Tier 3 platform.
Comment 10•4 years ago
|
||
bugherder |
Comment 11•4 years ago
|
||
Comment on attachment 9156979 [details]
Bug 1642883 - Rename MacroAssembler swap* methods to byteSwap* to fix OpenBSD build failures. r?caroline!
Fixes Tier 3 build failures. Approved for 78.0b9.
Comment 12•4 years ago
|
||
bugherder uplift |
Reporter | ||
Comment 13•4 years ago
|
||
can confirm that 78.0b9 builds fine on OpenBSD, thanks!
Updated•4 years ago
|
Description
•