GNOME Bugzilla – Bug 786180
gjs 1.49.90 fails to build on s390x
Last modified: 2017-08-21 22:57:27 UTC
gjs 1.49.90 Ubuntu 17.10 Alpha gjs 1.4.90 fails to build on s390x but gjs 1.48 builds. See also bug 781595 but that was just about autopkgtest failures. This is a problem on Ubuntu because if we can't fix this, we'll need to remove gjs from s390x and it has quite a few reverse dependencies that will need to be removed also. Full build log at https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/2899/+build/13237102 Build log excerpt ----------------- /usr/bin/g-ir-compiler --includedir=. WarnLib-1.0.gir -o WarnLib-1.0.typelib CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2" CFLAGS="-g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security" LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro -Bsymbolic-functions" CC="gcc" PKG_CONFIG="/usr/bin/pkg-config" DLLTOOL="false" /usr/bin/g-ir-scanner --namespace=GIMarshallingTests --nsversion=1.0 --libtool="/bin/bash ./libtool" --include=Gio-2.0 --library=libgimarshallingtests.la --symbol-prefix=gi_marshalling_tests --warn-all --warn-error --warn-all --cflags-begin --cflags-end installed-tests/gimarshallingtests.c installed-tests/gimarshallingtests.h libgimarshallingtests.la --output GIMarshallingTests-1.0.gir g-ir-scanner: link: /bin/bash ./libtool --mode=link --tag=CC gcc -o /<<PKGBUILDDIR>>/tmp-introspect_ae6o8ry/Regress-1.0 -export-dynamic -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security /<<PKGBUILDDIR>>/tmp-introspect_ae6o8ry/Regress-1.0.o -L. libregress.la -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -Wl,-Bsymbolic-functions -Wl,-z,relro -Bsymbolic-functions libtool: link: gcc -o /<<PKGBUILDDIR>>/tmp-introspect_ae6o8ry/.libs/Regress-1.0 -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security /<<PKGBUILDDIR>>/tmp-introspect_ae6o8ry/Regress-1.0.o -Wl,--export-dynamic -pthread -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Bsymbolic-functions -Wl,--export-dynamic -L. ./.libs/libregress.so -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -pthread -Wl,-rpath -Wl,/usr/lib/gjs g-ir-scanner: link: /bin/bash ./libtool --mode=link --tag=CC gcc -o /<<PKGBUILDDIR>>/tmp-introspectvk828gjp/GIMarshallingTests-1.0 -export-dynamic -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security /<<PKGBUILDDIR>>/tmp-introspectvk828gjp/GIMarshallingTests-1.0.o -L. libgimarshallingtests.la -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -Wl,-Bsymbolic-functions -Wl,-z,relro -Bsymbolic-functions /usr/bin/g-ir-compiler --includedir=. Regress-1.0.gir -o Regress-1.0.typelib libtool: link: gcc -o /<<PKGBUILDDIR>>/tmp-introspectvk828gjp/.libs/GIMarshallingTests-1.0 -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security /<<PKGBUILDDIR>>/tmp-introspectvk828gjp/GIMarshallingTests-1.0.o -Wl,--export-dynamic -pthread -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Bsymbolic-functions -Wl,--export-dynamic -L. ./.libs/libgimarshallingtests.so -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -pthread -Wl,-rpath -Wl,/usr/lib/gjs /usr/bin/g-ir-compiler --includedir=. GIMarshallingTests-1.0.gir -o GIMarshallingTests-1.0.typelib g-ir-scanner: link: /bin/bash ./libtool --mode=link --tag=CC gcc -o /<<PKGBUILDDIR>>/tmp-introspectokle4s7h/GjsPrivate-1.0 -export-dynamic -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security /<<PKGBUILDDIR>>/tmp-introspectokle4s7h/GjsPrivate-1.0.o -L. libgjs.la -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -Wl,-Bsymbolic-functions -Wl,-z,relro -Bsymbolic-functions libtool: link: gcc -o /<<PKGBUILDDIR>>/tmp-introspectokle4s7h/.libs/GjsPrivate-1.0 -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security /<<PKGBUILDDIR>>/tmp-introspectokle4s7h/GjsPrivate-1.0.o -Wl,--export-dynamic -pthread -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Bsymbolic-functions -Wl,--export-dynamic -L. ./.libs/libgjs.so -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -pthread (process:39677): Gjs-ERROR **: Could not initialize Javascript Command '['/<<PKGBUILDDIR>>/tmp-introspectokle4s7h/GjsPrivate-1.0', '--introspect-dump=/<<PKGBUILDDIR>>/tmp-introspectokle4s7h/functions.txt,/<<PKGBUILDDIR>>/tmp-introspectokle4s7h/dump.xml']' died with <Signals.SIGTRAP: 5>. /usr/share/gobject-introspection-1.0/Makefile.introspection:159: recipe for target 'GjsPrivate-1.0.gir' failed make[2]: *** [GjsPrivate-1.0.gir] Error 1
Does the mozjs52 shell ("js52") work at all on s390? "Could not initialize Javascript" seems to point to an immediately serious problem...
I don't know. I don't have direct access to s390x, but I can build packages there. The mozjs52 build tests fail on s390x but they were failing with mozjs38 too. But maybe they fail earlier (I search for dh_auto_test to see the start of the tests) https://launchpad.net/ubuntu/+source/mozjs38/38.8.0~repack1-0ubuntu1/+build/12460514 https://launchpad.net/ubuntu/+source/mozjs52/52.2.1-1~git1/+build/13195236
So, as I suspected the "Could not initialize JavaScript" message is printed when JS_Init() fails. This doesn't seem like a problem with GJS, because JS_Init() is literally the first function call that is made when loading the dynamic library. Do you happen to have any instructions for setting up a s390x emulation environment with qemu? Or would it be possible to run the tests with mozjs52 compiled with --enable-debug so that we might get more info from debug-mode assertions? Another possibility is to patch gjs/engine.cpp to call JS_InitWithFailureDiagnostic() instead of JS_Init(), and include the returned diagnostic string in the error message. I'm willing to look into this to a certain extent, but it may be a problem that Mozilla has to solve.
Ubuntu dropped the gjs packages from the s390x architecture today. I think this means that no one really cares about running gjs on s390x, so I think you could close this bug if you wanted. https://launchpad.net/bugs/1712083
Well... okay. It seems a shame to drop support for something that _should_ work, but then again it's really difficult to debug this without access to a build environment. I'll close this but if anyone needs this architecture in the future, feel free to reopen it.