Bug#1063446: libmozjs-115-dev: cannot call JS::CanonicalizeNaN(double) on mips64el
Simon McVittie <[email protected]> Thu, 8 Feb 2024 10:37:33 +0000
| Newsgroups | gmane.linux.debian.ports.mips |
|---|---|
| Message-ID | <ZcSu7VqPfiU2aSzE__35924.5910005242$1707388776$gmane$org@tautology.pseudorandom.co.uk> |
Package: libmozjs-115-dev Version: 115.7.0-2 Severity: serious Tags: upstream Justification: makes gjs FTBFS (#1063433) X-Debbugs-Cc: [email protected] User: [email protected] Usertags: mips64el Control: block 1063433 by -1 Original steps to reproduce: Try to compile gjs 1.78.3-1 (#1063433), which calls this public API: double JS::CanonicalizeNaN(double) Simplified steps to reproduce: Try to compile the attached, with: g++ test.cpp -o test $(pkgconf --cflags --libs mozjs-115) Expected result: gjs or the simplified test compiles, links and runs successfully Actual result: On amd64 and other architectures, linking succeeds. On mips64el, linking fails: /usr/bin/ld: /tmp/cc41qWiD.o: in function `main': test.cpp:(.text+0x22c): undefined reference to `JS::detail::CanonicalizedNaNBits' I think this is because mozjs has mips-specific code to detect which is the preferred representation of NaN, with the result stored in a global variable that is read by the inline function JS::CanonicalizeNaN(double); but that global variable is not exported, so gjs cannot validly refer to it. I'm preparing a possible patch (but it will take a long time to test, because compiling mozjs on mips64el is extremely slow). smcv