You are not logged in.
Hallo Arch linux community,
I'm trying to compile Emacs with xwidget-webkit support but having some difficulties. Usually I clone the Emacs repository, checkout a certain branch/tag and do:
$ ./configure -C --prefix=$HOME/.local/opt/emacs --with-cairo --with-json --with-xwidgets --with-mailutils --with-tree-sitter --with-native-compilation --with-imagemagick --with-gif --with-jpeg --with-png --with-xml2 --with-tiff --with-x-toolkit=yes --with-libsystemd --with-modules
...
$ make -j4
...
$ make installWhen I start emacs:
$ ~/.local/opt/emacs/bin/emacs -QAnd call xwidget-webkit-browse-url I get a segmentation fault:
acktrace:
/home/victor/.local/opt/emacs/bin/emacs(emacs_backtrace+0x4e)[0x624df3e89b4e]
/home/victor/.local/opt/emacs/bin/emacs(terminate_due_to_signal+0x82)[0x624df3d2ffca]
/home/victor/.local/opt/emacs/bin/emacs(+0x90590)[0x624df3d30590]
/home/victor/.local/opt/emacs/bin/emacs(+0x185336)[0x624df3e25336]
/home/victor/.local/opt/emacs/bin/emacs(+0x1858b1)[0x624df3e258b1]
/home/victor/.local/opt/emacs/bin/emacs(+0x185abb)[0x624df3e25abb]
/usr/lib/libX11.so.6(_XError+0x11c)[0x71380144274c]
/usr/lib/libX11.so.6(+0x44858)[0x713801442858]
/usr/lib/libX11.so.6(+0x44915)[0x713801442915]
/usr/lib/libX11.so.6(_XEventsQueued+0x5a)[0x7138014429aa]
/usr/lib/libX11.so.6(XPending+0x58)[0x7138014352c8]
/usr/lib/libgdk-3.so.0(+0x88128)[0x713802495128]
/usr/lib/libglib-2.0.so.0(+0x5a68b)[0x7138015c468b]
/usr/lib/libglib-2.0.so.0(+0xb918f)[0x71380162318f]
/usr/lib/libglib-2.0.so.0(g_main_context_pending+0x2d)[0x7138015c36ad]
/usr/lib/libgtk-3.so.0(gtk_events_pending+0x13)[0x713801ded333]
/home/victor/.local/opt/emacs/bin/emacs(+0x185723)[0x624df3e25723]
/home/victor/.local/opt/emacs/bin/emacs(gobble_input+0x101)[0x624df3e6fef1]
/home/victor/.local/opt/emacs/bin/emacs(process_pending_signals+0x15)[0x624df3e702c5]
/home/victor/.local/opt/emacs/bin/emacs(probably_quit+0x3d)[0x624df3ef948d]
/home/victor/.local/opt/emacs/bin/emacs(Ffuncall+0x23)[0x624df3ef9643]
/home/victor/.local/opt/emacs/bin/emacs(+0x28428a)[0x624df3f2428a]
/home/victor/.local/opt/emacs/bin/emacs(map_obarray+0xc3)[0x624df3f2e7f3]
/home/victor/.local/opt/emacs/bin/emacs(Fmapatoms+0x51)[0x624df3f2e871]
/home/victor/.local/opt/emacs/bin/../lib/emacs/29.3/native-lisp/29.3-f9dfd786/preloaded/simple-fab5b0cf-9ff4140c.eln(F657865637574652d657874656e6465642d636f6d6d616e6
42d2d73686f72746572_execute_extended_command__shorter_0+0x98)[0x7137e9b6da98]
/home/victor/.local/opt/emacs/bin/emacs(exec_byte_code+0x410)[0x624df3f44030]
/home/victor/.local/opt/emacs/bin/emacs(Ffuncall+0xf6)[0x624df3ef9716]
/home/victor/.local/opt/emacs/bin/emacs(Fapply+0x2b8)[0x624df3ef9ae8]
/home/victor/.local/opt/emacs/bin/emacs(Ffuncall+0xf6)[0x624df3ef9716]
/home/victor/.local/opt/emacs/bin/../lib/emacs/29.3/native-lisp/29.3-f9dfd786/preloaded/timer-3ee7cfd9-226b3dc9.eln(F74696d65722d6576656e742d68616e646c6572_timer_eve
nt_handler_0+0x427)[0x7137e81bd607]
/home/victor/.local/opt/emacs/bin/emacs(Ffuncall+0xf6)[0x624df3ef9716]
/home/victor/.local/opt/emacs/bin/emacs(timer_check+0x311)[0x624df3e711b1]
/home/victor/.local/opt/emacs/bin/emacs(+0x1d1535)[0x624df3e71535]
/home/victor/.local/opt/emacs/bin/emacs(+0x1d1738)[0x624df3e71738]
/home/victor/.local/opt/emacs/bin/emacs(read_char+0xdaf)[0x624df3e7749f]
/home/victor/.local/opt/emacs/bin/emacs(+0x1d9e95)[0x624df3e79e95]
/home/victor/.local/opt/emacs/bin/emacs(+0x1dbd85)[0x624df3e7bd85]
/home/victor/.local/opt/emacs/bin/emacs(internal_condition_case+0x67)[0x624df3ef7da7]
/home/victor/.local/opt/emacs/bin/emacs(command_loop_2+0x26)[0x624df3e671b6]
/home/victor/.local/opt/emacs/bin/emacs(internal_catch+0x41)[0x624df3ef7d01]
/home/victor/.local/opt/emacs/bin/../lib/emacs/29.3/native-lisp/29.3-f9dfd786/preloaded/simple-fab5b0cf-9ff4140c.eln(F657865637574652d657874656e6465642d636f6d6d616e642d2d73686f72746572_execute_extended_command__shorter_0+0x98)[0x7137e9b6da98]
/home/victor/.local/opt/emacs/bin/emacs(exec_byte_code+0x410)[0x624df3f44030]
/home/victor/.local/opt/emacs/bin/emacs(Ffuncall+0xf6)[0x624df3ef9716]
/home/victor/.local/opt/emacs/bin/emacs(Fapply+0x2b8)[0x624df3ef9ae8]
/home/victor/.local/opt/emacs/bin/emacs(Ffuncall+0xf6)[0x624df3ef9716]
/home/victor/.local/opt/emacs/bin/../lib/emacs/29.3/native-lisp/29.3-f9dfd786/preloaded/timer-3ee7cfd9-226b3dc9.eln(F74696d65722d6576656e742d68616e646c6572_timer_event_handler_0+0x427)[0x7137e81bd607]
/home/victor/.local/opt/emacs/bin/emacs(Ffuncall+0xf6)[0x624df3ef9716]
/home/victor/.local/opt/emacs/bin/emacs(timer_check+0x311)[0x624df3e711b1]
/home/victor/.local/opt/emacs/bin/emacs(+0x1d1535)[0x624df3e71535]
/home/victor/.local/opt/emacs/bin/emacs(+0x1d1738)[0x624df3e71738]
/home/victor/.local/opt/emacs/bin/emacs(read_char+0xdaf)[0x624df3e7749f]
/home/victor/.local/opt/emacs/bin/emacs(+0x1d9e95)[0x624df3e79e95]
/home/victor/.local/opt/emacs/bin/emacs(+0x1dbd85)[0x624df3e7bd85]
/home/victor/.local/opt/emacs/bin/emacs(internal_condition_case+0x67)[0x624df3ef7da7]
/home/victor/.local/opt/emacs/bin/emacs(command_loop_2+0x26)[0x624df3e671b6]
/home/victor/.local/opt/emacs/bin/emacs(internal_catch+0x41)[0x624df3ef7d01]
/home/victor/.local/opt/emacs/bin/emacs(+0x1c7151)[0x624df3e67151]
...
[1] 387967 IOT instruction (core dumped) ~/.local/opt/emacs/bin/emacs -QAs I've found out here (https://www.reddit.com/r/emacs/comments … _sessions/) it has to do with webkit2gtk:
╰─➤ sudo pacman -Qi webkit2gtk 134 ↵
[sudo] password for victor:
Name : webkit2gtk
Version : 2.44.0-1
Description : Web content engine for GTK
Architecture : x86_64
URL : https://webkitgtk.org
Licenses : custom
Groups : None
Provides : libjavascriptcoregtk-4.0.so=18-64 libwebkit2gtk-4.0.so=37-64
Depends On : at-spi2-core atk bubblewrap cairo enchant fontconfig freetype2 glib2 gst-plugins-bad-libs gst-plugins-base-libs gstreamer gtk3
harfbuzz harfbuzz-icu hyphen icu libavif libdrm libegl libepoxy libgcrypt libgl libgles libjpeg libjxl libmanette libpng libseccomp
libsecret libsoup libsystemd libtasn1 libwebp libwpe libx11 libxcomposite libxml2 libxslt libxt mesa openjpeg2 sqlite wayland woff2
wpebackend-fdo xdg-dbus-proxy zlib libWPEBackend-fdo-1.0.so libwpe-1.0.so
Optional Deps : geoclue: Geolocation support [installed]
gst-libav: nonfree media decoding
gst-plugins-bad: media decoding [installed]
gst-plugins-good: media decoding [installed]
Required By : None
Optional For : wxwidgets-gtk3
Conflicts With : None
Replaces : None
Installed Size : 106.07 MiB
Packager : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date : Sat 16 Mar 2024 05:09:24 PM CET
Install Date : Wed 27 Mar 2024 01:23:02 PM CET
Install Reason : Explicitly installed
Install Script : No
Validated By : SignatureAny ideas? Downgrading webkit2gtk (as mentioned in the reddit thread) lead to some more strange compilation problems.
Any help here would be appreciated.
Offline
The reddit thread is clear - and the emacs bug report more so: those versions are incompatible. Emacs is using a feature of webkit that newer versions of webkit does not provide. Either webkit needs to add this back (unlikely) or emacs needs to switch to using wpe (which they really should have been using anyways).
In the mean time, you'd need to use an older version of webkit for this to work.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
In the mean time, you'd need to use an older version of webkit for this to work.
Well, that's why I'm here. I hoped someone has figured out which combination of Emacs and webkit2gtk works because in my case downgrading webkit2gtk cause compilation errors.
Fun fact: While I was reading through this thread (https://lists.gnu.org/archive/html/bug- … 00651.html) I saw this CLI arguments:
-xrm "emacs.synchronous: true"When I run Emacs (with xwidget-webkit support enabled) like this:
~/.local/opt/emacs/bin/emacs --init-directory ~/.config/emacs -xrm "emacs.synchronous: true"xwidget-webkit works! I mainly use it in combination with elfeed while going thourgh my RSS/Atom feeds. I hope this might be helpful for other Emacsers.
Offline
I hoped someone has figured out which combination of Emacs and webkit2gtk works
The redit thread and emacs bug report are quite clear about this already - there's nothing there to "figure out."
downgrading webkit2gtk cause compilation errors.
And if you want help with those errors you'd need to actually tell us something about them: https://bbs.archlinux.org/viewtopic.php?id=57855
Based on the emacs bug report, the current version of webkit is not even expected to work - so there is nothing to solve. But previous versions are expected to work ... and any errors you get trying to build emacs against and older webkit may be solvable. But no error is solvable until it is actually described.
When I run Emacs (with xwidget-webkit support enabled) like this... xwidget-webkit works!
Great. Does that workaround satisfy your needs? If so, please mark the thread as solved. If not, we need to learn about the "compilation errors."
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Does anyone know exact steps to fix this? I tried downgrading to webkit2gtk-2.40.5-2-x86_64.pkg.tar.zst but then when I rebuild Emacs from source, and then run `ldd $(which emacs) | grep webkit`, which supposedly should bind to 4.0 of libewebkit2gtk, but it still loads the newer one. Trying to run xwidget-webkit-browse-url in Emacs doesn't crash it, yet doesn't display anything - only blank buffer.
Offline
I tried downgrading to webkit2gtk-2.40.5-2-x86_64.pkg.tar.zst
What does that mean, specifically the "tried" part.
which supposedly should bind to 4.0 of libewebkit2gtk, but it still loads the newer one
Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
Don't downgrade the system webkit2gtk, fetch a compatible one, put it somewhere and LD_PRELOAD it for emacs.
Or use vim ![]()
Offline