unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: 33679@debbugs.gnu.org
Cc: Ricardo Wurmus <rekado@elephly.net>, Joakim Verona <joakim@verona.se>
Subject: bug#33679: Emacs uses APIs deprecated in WebKitGTK 2.21.1
Date: Sat, 8 Dec 2018 15:59:36 -0800	[thread overview]
Message-ID: <65ba713b-68e0-02d2-7795-177a7f27a407@cs.ucla.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 1866 bytes --]

I hadn't built Emacs lately with xwidgets support. When I tried it on Fedora 29 
via './configure --with-xwidgets --enable-gcc-warnings' the build failed with 
the diagnostics at the end of this message. Apparently WebKitGTK has mutated and 
Emacs hasn't kept up. Although I plan to work around the immediate problem by 
installing the attached patch on master, could an xwidgets expert please fix 
this the "right" way by using the JavaScriptCore GLib API instead? Thanks.

   CC       xwidget.o
xwidget.c: In function ‘webkit_javascript_finished_cb’:
xwidget.c:393:2: error: ‘webkit_javascript_result_get_global_context’ is 
deprecated [-Werror=deprecated-declarations]
   context = webkit_javascript_result_get_global_context (js_result);
   ^~~~~~~
In file included from /usr/include/webkitgtk-4.0/webkit2/webkit2.h:54,
                  from xwidget.c:30:
/usr/include/webkitgtk-4.0/webkit2/WebKitJavascriptResult.h:49:1: note: declared 
here
  webkit_javascript_result_get_global_context (WebKitJavascriptResult *js_result);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xwidget.c:394:2: error: ‘webkit_javascript_result_get_value’ is deprecated: Use 
'webkit_javascript_result_get_js_value' instead [-Werror=deprecated-declarations]
   value = webkit_javascript_result_get_value (js_result);
   ^~~~~
In file included from /usr/include/webkitgtk-4.0/webkit2/webkit2.h:54,
                  from xwidget.c:30:
/usr/include/webkitgtk-4.0/webkit2/WebKitJavascriptResult.h:52:1: note: declared 
here
  webkit_javascript_result_get_value          (WebKitJavascriptResult *js_result);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:384: xwidget.o] Error 1
make[1]: Leaving directory '/home/eggert/src/gnu/emacs/master-tmp/src'
make: *** [Makefile:421: src] Error 2

[-- Attachment #2: 0001-Suppress-WebKitGTK-2.21.1-diagnostics.patch --]
[-- Type: text/x-patch, Size: 1040 bytes --]

From bcdda254cb249950812a6b7122278a4d63761194 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sat, 8 Dec 2018 15:29:07 -0800
Subject: [PATCH] Suppress WebKitGTK+ 2.21.1 diagnostics

* src/xwidget.c: Suppress deprecation warnings.
---
 src/xwidget.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/xwidget.c b/src/xwidget.c
index 6da7a0bb3f..24f7d39077 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -30,6 +30,14 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 #include <webkit2/webkit2.h>
 #include <JavaScriptCore/JavaScript.h>
 
+/* Suppress GCC deprecation warnings starting in WebKitGTK+ 2.21.1 for
+   webkit_javascript_result_get_global_context and
+   webkit_javascript_result_get_value.
+   FIXME: Use the JavaScriptCore GLib API instead, and remove this hack.  */
+#if WEBKIT_CHECK_VERSION (2, 21, 1) && GNUC_PREREQ (4, 2, 0)
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
 static struct xwidget *
 allocate_xwidget (void)
 {
-- 
2.19.2


             reply	other threads:[~2018-12-08 23:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-08 23:59 Paul Eggert [this message]
2020-08-21 12:10 ` bug#33679: Emacs uses APIs deprecated in WebKitGTK 2.21.1 Lars Ingebrigtsen
2020-08-21 21:51   ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65ba713b-68e0-02d2-7795-177a7f27a407@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=33679@debbugs.gnu.org \
    --cc=joakim@verona.se \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).