GNOME Bugzilla – Bug 783882
geary fails to build on s390x
Last modified: 2017-09-25 03:01:32 UTC
geary git master fails to build on s390x on Ubuntu 17.10 Alpha but it builds on other architectures. Full build log at https://launchpad.net/ubuntu/+source/geary/0.12~20170613-0ubuntu1/+build/12760898 [ 83%] Generating .geary-web-process.stamp cd "/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src" && /usr/bin/valac -C -b /<<PKGBUILDDIR>>/src -d /<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src --pkg=geary-engine --pkg=gee-0.8 --pkg=gtk+-3.0 --pkg=javascriptcore-4.0 --pkg=libsoup-2.4 --pkg=webkit2gtk-web-extension-4.0 --pkg=gee-0.8 --pkg=gio-2.0 --pkg=glib-2.0 --pkg=gmime-2.6 --pkg=javascriptcore-4.0 --pkg=libxml-2.0 --pkg=posix --pkg=sqlite3 --vapidir=/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src --vapidir=/<<PKGBUILDDIR>>/bindings/vapi --metadatadir=/<<PKGBUILDDIR>>/bindings/metadata --target-glib=2.42 --thread --debug --enable-checking --enable-deprecated --fatal-warnings -D HAVE_LIBMESSAGINGMENU -D HAVE_LIBUNITY -D GTK_3_20 -D GTK_3_22 /<<PKGBUILDDIR>>/src/client/web-process/web-process-extension.vala /<<PKGBUILDDIR>>/src/client/web-process/web-process-extension.vala:89.26-89.72: error: Assignment: Cannot convert from `void*' to `JS.GlobalContext' JS.GlobalContext context = frame.get_javascript_global_context(); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /<<PKGBUILDDIR>>/src/client/web-process/web-process-extension.vala:92.17-92.23: error: The name `context' does not exist in the context of `GearyWebExtension.should_load_remote_images' context, "geary.allowRemoteImages", int.parse("__LINE__") ^^^^^^^ /<<PKGBUILDDIR>>/src/client/web-process/web-process-extension.vala:94.42-94.48: error: The name `context' does not exist in the context of `GearyWebExtension.should_load_remote_images' should_load = ret.to_boolean(context); ^^^^^^^ /<<PKGBUILDDIR>>/src/client/web-process/web-process-extension.vala:106.26-106.72: error: Assignment: Cannot convert from `void*' to `JS.GlobalContext' JS.GlobalContext context = frame.get_javascript_global_context(); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /<<PKGBUILDDIR>>/src/client/web-process/web-process-extension.vala:109.17-109.23: error: The name `context' does not exist in the context of `GearyWebExtension.remote_image_load_blocked' context, "geary.remoteImageLoadBlocked();", int.parse("__LINE__") ^^^^^^^ /<<PKGBUILDDIR>>/src/client/web-process/web-process-extension.vala:121.26-121.72: error: Assignment: Cannot convert from `void*' to `JS.GlobalContext' JS.GlobalContext context = frame.get_javascript_global_context(); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /<<PKGBUILDDIR>>/src/client/web-process/web-process-extension.vala:124.17-124.23: error: The name `context' does not exist in the context of `GearyWebExtension.selection_changed' context, "geary.selectionChanged();", int.parse("__LINE__") ^^^^^^^ Compilation failed: 7 error(s), 0 warning(s) src/CMakeFiles/geary-web-process.dir/build.make:67: recipe for target 'src/.geary-web-process.stamp' failed make[3]: *** [src/.geary-web-process.stamp] Error 1
I have tried a patch that "fixed" the issue, however I'm not sure if something breaks at runtime (I looked at vala binding, and a casting seems to be good enough, even if I don't know why they return void* and why only s390x breaks) ``` +--- geary-0.12~20170613.orig/src/client/web-process/web-process-extension.vala ++++ geary-0.12~20170613/src/client/web-process/web-process-extension.vala +@@ -86,7 +86,7 @@ public class GearyWebExtension : Object + private bool should_load_remote_images(WebKit.WebPage page) { + bool should_load = false; + WebKit.Frame frame = page.get_main_frame(); +- JS.GlobalContext context = frame.get_javascript_global_context(); ++ JS.GlobalContext context = (JS.GlobalContext) frame.get_javascript_global_context(); + try { + JS.Value ret = execute_script( + context, "geary.allowRemoteImages", int.parse("__LINE__") +@@ -103,7 +103,7 @@ public class GearyWebExtension : Object + + private void remote_image_load_blocked(WebKit.WebPage page) { + WebKit.Frame frame = page.get_main_frame(); +- JS.GlobalContext context = frame.get_javascript_global_context(); ++ JS.GlobalContext context = (JS.GlobalContext) frame.get_javascript_global_context(); + try { + execute_script( + context, "geary.remoteImageLoadBlocked();", int.parse("__LINE__") +@@ -118,7 +118,7 @@ public class GearyWebExtension : Object + + private void selection_changed(WebKit.WebPage page) { + WebKit.Frame frame = page.get_main_frame(); +- JS.GlobalContext context = frame.get_javascript_global_context(); ++ JS.GlobalContext context = (JS.GlobalContext) frame.get_javascript_global_context(); + try { + execute_script( + context, "geary.selectionChanged();", int.parse("__LINE__") ```
Created attachment 357339 [details] [review] patch that fixes the issue
Gianfranco's patch also fixes the same build failure on Debian's ppc64 architecture.
Pushed to master as commit ee76477. Thanks!
Should be able to revert this workaround once Bug 788113 lands.