kelleyk / ppa-emacs

Packaging repository for my Emacs PPA
https://launchpad.net/~kelleyk/+archive/ubuntu/emacs
97 stars 4 forks source link

27.1 builds fail on 16.04 LTS (xenial) #15

Closed kelleyk closed 3 years ago

kelleyk commented 3 years ago

See https://launchpadlibrarian.net/498210480/buildlog_ubuntu-xenial-amd64.emacs27_27.1~1.git86d8d76aa3-kk1+16.04_BUILDING.txt.gz

../../../src/xwidget.c:279:20: error: unknown type name ‘JSCValue’
 webkit_js_to_lisp (JSCValue *value)
                    ^
../../../src/xwidget.c: In function ‘webkit_javascript_finished_cb’:
../../../src/xwidget.c:372:7: error: unknown type name ‘JSCValue’
       JSCValue *value = webkit_javascript_result_get_js_value (js_result);
       ^
../../../src/xwidget.c:372:25: warning: implicit declaration of function ‘webkit_javascript_result_get_js_value’ [-Wimplicit-function-declaration]
       JSCValue *value = webkit_javascript_result_get_js_value (js_result);
                         ^
../../../src/xwidget.c:372:25: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
../../../src/xwidget.c:374:32: warning: implicit declaration of function ‘webkit_js_to_lisp’ [-Wimplicit-function-declaration]
       Lisp_Object lisp_value = webkit_js_to_lisp (value);
                                ^
../../../src/xwidget.c:374:32: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
Makefile:402: recipe for target 'xwidget.o' failed

This appears to be the relevant commit:

commit ae3edf0ac3f1e893338917497b55859d6aca7d42
Author: Jimmy Aguilar Mena <kratsbinovish@gmail.com>
Date:   Tue Sep 17 22:00:21 2019 +0200

    Substituted deprecated WebKitGTK+ api.

    * src/xwidget.c : Substituted WebKitGTK+ API calls and use
    JavaScriptCore GLib API instead.

I see some relevant discussion here: https://www.reddit.com/r/GTK/comments/buxizu/webkitgtk_how_to_tell_the_compiler_to_not_compile/

kelleyk commented 3 years ago

The relevant header (JSCValue.h) is in libjavascriptcoregtk-4.0-dev (when available), but the version in 16.04 LTS appears to be too old: https://packages.ubuntu.com/search?suite=xenial&arch=any&mode=exactfilename&searchon=contents&keywords=JSCValue.h

Perhaps it makes sense to disable xwidget support for the 16.04 LTS build, then?

The upstream commit is not huge, so it probably wouldn't be very difficult for someone to come up with a compatibility patch if they were interested.

kelleyk commented 3 years ago

I've resolved this issue by disabling xwidget support for 16.04 LTS and earlier. Packages with version 27.1~1.git86d8d76aa3-kk2 or later have the fix.