mozjs 38.8.0 on mips64el mistakenly selects 32-bit version of jsval_layout

RESOLVED DUPLICATE of bug 1357588

Status

RESOLVED DUPLICATE of bug 1357588
a year ago
7 months ago

People

(Reporter: lmy441900, Unassigned)

Tracking

38 Branch
Other
Linux

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
On mips64el platform, mozjs-38 is always failed to be built. Some of the error messages are:

```
In file included from /var/cache/acbs/build/acbs.q0katfs9/mozilla-esr38/js/src/jsalloc.h:18:0,
                 from /var/cache/acbs/build/acbs.q0katfs9/mozilla-esr38/js/src/jsatom.h:12,
                 from /var/cache/acbs/build/acbs.q0katfs9/mozilla-esr38/js/src/vm/Runtime.h:21,
                 from /var/cache/acbs/build/acbs.q0katfs9/mozilla-esr38/js/src/jscntxt.h:15,
                 from /var/cache/acbs/build/acbs.q0katfs9/mozilla-esr38/js/src/vm/RegExpObject.h:13,
                 from /var/cache/acbs/build/acbs.q0katfs9/mozilla-esr38/js/src/builtin/RegExp.h:10,
                 from /var/cache/acbs/build/acbs.q0katfs9/mozilla-esr38/js/src/builtin/RegExp.cpp:7:
../../dist/include/js/Value.h: At global scope:
../../dist/include/js/Utility.h:53:42: error: static assertion failed: JS_STATIC_ASSERT
 #define JS_STATIC_ASSERT(cond)           static_assert(cond, "JS_STATIC_ASSERT")
                                          ^
../../dist/include/js/Value.h:358:1: note: in expansion of macro 'JS_STATIC_ASSERT'
 JS_STATIC_ASSERT(sizeof(jsval_layout) == 8);
 ^~~~~~~~~~~~~~~~
```

I looked into it for a little while. I inserted `#error` macros to 3 of the 4 versions of jsval_layout (Little-Endian 32-bit and 64-bit, Big-Endian 32-bit and 64-bit, 64LE is not inserted since it should be the correct one), and find that on MIPS64EL the macro `JS_NUNBOX32` is defined so 32-bit Little-Endian version of jsval_layout is used on a 64-bit platform -- `sizeof (jsval_layout)` just can't be 8.
(Reporter)

Comment 1

a year ago
An (almost the same) issue is at https://bugzilla.mozilla.org/show_bug.cgi?id=1357588, but with a PPC64 architecture. I think the reason might be the same.
(Reporter)

Comment 2

a year ago
(In reply to Junde Yhi from comment #1)
> An (almost the same) issue is at
> https://bugzilla.mozilla.org/show_bug.cgi?id=1357588, but with a PPC64
> architecture. I think the reason might be the same.

Well, not PPC64, but MIPS64 (confused by the UA string), the same platform and mozjs version as this issue.
Status: UNCONFIRMED → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1357588

Updated

7 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.