Bug#873778: Fix for the mozjs52 build on armel

Simon McVittie smcv at debian.org
Sun Oct 1 18:03:46 UTC 2017


Control: clone -1 -2
Control: retitle -2 FTBFS on mips64el: various test failures

On Sat, 23 Sep 2017 at 12:29:08 +0200, Emilio Pozuelo Monfort wrote:
> Let's track the mips64el failure in a different bug, as it's
> completely different from this.

Cloned away. I haven't investigated those failures at all.

> The remaining problem seems to be a big-endian issue (mips, s390x,
> hppa, powerpc, sparc64). ppc64 fails in a slightly different manner,
> might just be it's failing earlier for a different reason but would
> also suffer from this bug.

I traced into this a bit and came to the same conclusion. It turns out
the failure mode is that the embedded code copy of libicu v58 fails
to initialize, because the embedded binary copy of the ICU data is
hard-coded to be the little-endian one by the build system (also it's
bundled in the source package rather than being built from source),
and at runtime libicu insists on its data files being of equal endianness.

This results in ./js/src/js/src/shell/js silently exiting 1 because
it makes no attempt at error reporting during initialization (insert
table flip here). ./js/src/js/src/shell/js is the standalone JavaScript
shell, similar to /usr/bin/js24 and analogous to /usr/bin/gjs-console - it
isn't installed any more in mozjs52 (I don't think) but it's still built
and used for build-time testing.

It is correct that this is release-critical, because it makes mozjs
completely useless on the affected architectures, as far as I can see.

To be less nasty to debug, I suspect the dh_auto_test override should
do something like this:

	./js/src/js/src/shell/js -e 'print("hello, world") || { \
		echo "js shell doesn't appear to work"; \
		exit 1; \
	}

before it even attempts to run upstream tests - and it should probably
try this even on architectures where the full test suite is skipped or
known-broken, because, again, if this fails then mozjs being available
is just a trap for the unwary.

These Firefox changes look promising:
https://anonscm.debian.org/cgit/pkg-mozilla/iceweasel.git/tree/debian/patches/debian-hacks/Allow-to-override-ICU_DATA_FILE-from-the-environment.patch
https://anonscm.debian.org/cgit/pkg-mozilla/iceweasel.git/log/?qt=grep&q=endian
although unfortunately the standalone mozjs doesn't have this:
https://anonscm.debian.org/cgit/pkg-mozilla/iceweasel.git/tree/intl/icu_sources_data.py
so we would need to insert a copy.

If libicu v59 (currently in experimental) is going to be uploaded to
unstable soon, then we might be able to reduce the level of wtf by using
the system libicu instead. Laszlo, what are your plans for icu v59?

Regards,
    smcv



More information about the pkg-gnome-maintainers mailing list