Subject: bug#44204: Emacs --with-xwidgets complains under Ubuntu 20.04

From: Po Lu <[email-masked]>
Date: Thu, 09 Dec 2021 10:20:04 +0800

Paul Eggert <[email-masked]> writes:

> That's odd, as I observe some of the problem on Fedora 35 x86-64,
> using the default GNOME login. I built current Emacs master (commit
> 63f07ea22f3954c2154d831017caf494911cb515) with './configure
> --with-xwidgets --enable-gcc-warnings', then run 'src/emacs -Q', then
> in the *scratch* buffer type:
>
> (make-xwidget 'webkit "title" 500 500 '())
>
> followed by C-j. On stderr I see this string:
>
> Overriding existing handler for signal 10. Set JSC_SIGNAL_FOR_GC if
> you want WebKit to use a different signal

That's a completely different error, caused by JavaScriptCore overriding
the SIGUSR1 handler to stop threads for GC.

This is only done on systems running the Linux kernel, and once the JSC
developers add the programmatic interface that allows programs to change
the signal used, I plan to change it to their recommended workaround
signal, SIGRTMIN, on such systems.

> <xwidget-event> is undefined [4 times]

You are supposed to (require 'xwidget) before running any xwidget
functions.  For some reason that isn't enforced.

> On my Ubuntu 20.04.3 LTS x86-64 platform, where I observe both the
> above issues and the Gdk-WARNINGs I mentioned previously, 'dpkg -s
> libwebkit2gtk-4.0-37' reports:

> XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
> XDG_CURRENT_DESKTOP=ubuntu:GNOME
> XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
> XDG_MENU_PREFIX=gnome-
> XDG_RUNTIME_DIR=/run/user/1000
> XDG_SESSION_CLASS=user
> XDG_SESSION_DESKTOP=ubuntu
> XDG_SESSION_TYPE=x11

That is very odd, but I will look into this.  Thanks.