0

I use linux 5.4.0-150-generic #167~18.04.1-Ubuntu with libgtk-3-0:amd64 3.22.30-1ubuntu4 What is the correct Gtk3 version to get xwidgets running without warnings?

  1. when I run the build configuration (...see below) I get the warning:
configure: WARNING: Your version of Gtk+ will have problems with
       closing open displays.  This is no problem if you just use
       one display, but if you use more than one and close one of them
       Emacs may crash.
       See https://gitlab.gnome.org/GNOME/gtk/issues/221
  1. When I run Emacs, I get a popup window with warnings about potential crashes using multi display setups and possible problems closing Emacs depending on my Gtk3 version too.

Both warnings pointing to an Gtk+ version without issues but in the issue post .../issues/221. I cannot find a version in the info clutter of the discussion.

So which GTK3 version will work without problems?

 What toolkit should Emacs use?  GTK3

are shown.

./configure \
  --with-x-toolkit=gtk3\
  --with-tree-sitter\
  --with-gif\
  --with-png\
  --with-jpeg\
  --with-rsvg\
  --with-tiff\
  --with-imagemagick\
  --with-json\
  --with-xwidgets \
  --with-mailutils

Configuration tests

I have tried all 4 combinations and proposed version @db48x works ..see item 4

  1. ./configure

    • configure no Gtk+ warning
    • Does Emacs support Xwidgets? no
  2. ./configure --with-x-toolkit=gtk3

    • configure: WARNING: Your version of Gtk+ will have problems
    • Does Emacs support Xwidgets? no
  3. ./configure --with-x-toolkit=gtk3 --with-xwidgets

    • configure: WARNING: Your version of Gtk+ will have problems
    • Does Emacs support Xwidgets? yes
  4. ./configure --with-xwidgets

    • No warning about Gtk+
    • Does Emacs support Xwidgets? yes

Summary

So the combination

  1. explicit Gtk+ version ./configure --with-x-toolkit=gtk3 --with-xwidgets
  2. implicit Gtk+ version ./configure --with-xwidgets

Producing an Emacs build with GTK3 toolkit and xwidget support BUT in the explicit version with a warnings at startup (popup window).

Is at least the Gtk+ version aspect may be is irrelevant in the warning context and the switch --with-x-toolkit=gtk3 is a fossil?

I wonder what will happen, when I use the --with-pgtk

  1. ./configure --with-pgtk --with-xwidgets
    • No warning about Gtk+
    • Does Emacs support Xwidgets? yes
    • Changes the window system from X to pgtk

Ah so I guess --with-x-toolkit=gtk3 produce the warning, which can be omitted by the implicit version.

2
  • As it stands I don't think anybody is gonna answer this question. First of all, what warnings are you talking about? Is that runtime warnings or compilation warnings? And why do you care anyway, do they disrupt your workflow in any way?
    – Hi-Angel
    Commented Feb 20 at 21:03
  • See edit above long version.
    – huckfinn
    Commented Feb 21 at 0:43

1 Answer 1

2

Your question is confusing, but probably mostly because you are confused, or are confusing different things with each other.

The warning you mention (“WARNING: Your version of Gtk+ will have problems…”) has nothing to do with xwidgets. All versions of Gtk have a bug where if a Gtk application (such as Emacs) is running on an X display that is on another computer, and a network outage causes it to lose it’s connection to the X server, the Gtk library inside the application will crash. You’re going to see that warning every time you compile Emacs, because the Gtk developers have refused to fix the bug. This is unreasonable of them, but in to be fair most users will never actually experience this crash because of course they don’t use X over a network. There is nothing you can do about this, so just ignore the warning.

All you have to do is configure with the --with-xwidgets and the resulting Emacs will support xwidgets.

3
  • There are always these confusing things .... OK have tried all 4 combinations and indeed your proposed version works (item 4). The ./configure setup is indeed confusing and produces same setup results with and without warnings (item 3 and 4) about the Gtk+ version. Is at least the Gtk+ version aspect may be is irrelevant in the warning context and the switch --with-x-toolkit=gtk3 is a fossile? BTW: I had never an remote X server context in the question so the confusion is brought into the context by your answer.
    – huckfinn
    Commented Feb 21 at 9:22
  • If you don't specify --with-x-toolkit, then the configure script will guess. If you have libgtk3 headers installed then it will assume that you want gtk3. If you don't, it will check for libgtk2, and so on down the list. I don't know why the warning goes away in one of the four configurations you tested; perhaps in that case you were not building with any form of gtk support at all. Just build it with the options you want and ignore the warning; it doesn’t refer to anything that will affect you.
    – db48x
    Commented Feb 21 at 9:39
  • Despite of having these ugly popup dialog when the warning was thrown and you start your Emacs. Anyway I got a solution thanks and I will close the thread.
    – huckfinn
    Commented Feb 21 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.