[vim/vim] --enable-gui=gtk4 doesn't enable X11 feature despite --with-x (Issue #21072)

5 views
Skip to first unread message

Bagas Sanjaya

unread,
Aug 17, 2026, 9:06:34 AM (yesterday) Aug 17
to vim/vim, Subscribed
bagasme created an issue (vim/vim#21072)

Steps to reproduce

  • Configure vim with gtk4 GUI:
$ ./configure --prefix=${HOME}/.local/vim --with-features=huge \
  --enable-gpm --enable-acl --with-x=yes --enable-gui=gtk4 \
  --enable-multibyte --enable-cscope --enable-netbeans \
  --enable-perlinterp=dynamic --enable-python3interp=dynamic \
  --enable-tclinterp=dynamic --enable-canberra

Expected behaviour

I'm compiling vim with gtk4 GUI (--enable-gui=gtk4). When I check auto/config.log output, I see that X11 is not enabled despite being configure with --with-x=yes:

...
configure:10474: checking --enable-gui argument
configure:10565: result: GTK 4.x GUI support
configure:10864: checking --disable-gtktest argument
configure:10876: result: gtk test enabled
configure:10902: checking for pkg-config gtk4
configure:10907: result: found
configure:10909: checking for GTK - version >= 4.10.0
configure:10921: result: yes; found version 4.22.4
...

Switching back to gtk3 (--enable-gui=gtk3), however, does enable X11:

...
configure:9187: checking --with-wayland argument
configure:9202: result: yes
configure:9214: checking for wayland
configure:9217: result: yes
configure:9253: checking for cairo
configure:9259: result: yes
configure:9274: checking for pango
configure:9280: result: yes
configure:9308: checking for xmkmf
configure:9347: result: no
configure:9353: checking for X
configure:9391: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lX11 -lnsl   >&5
configure:9391: $? = 0
configure:9581: result: libraries , headers 
configure:9687: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lnsl    -lX11 >&5
configure:9687: $? = 0
configure:9803: checking for gethostbyname
configure:9803: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lnsl   >&5
configure:9803: $? = 0
configure:9803: result: yes
configure:9917: checking for connect
configure:9917: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lnsl   >&5
configure:9917: $? = 0
configure:9917: result: yes
configure:9975: checking for remove
configure:9975: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lnsl   >&5
configure:9975: $? = 0
configure:9975: result: yes
configure:10033: checking for shmat
configure:10033: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lnsl   >&5
configure:10033: $? = 0
configure:10033: result: yes
configure:10100: checking for IceConnectionNumber in -lICE
configure:10129: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lICE  -lnsl   >&5
configure:10129: $? = 0
configure:10141: result: yes
configure:10183: checking if X11 header files can be found
configure:10199: gcc -c -g -O2    conftest.c >&5
configure:10199: $? = 0
configure:10201: result: yes
configure:10222: checking for _XdmcpAuthDoIt in -lXdmcp
configure:10251: gcc -o conftest -g -O2  -L -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lXdmcp -lXt  -lSM -lICE -lX11  -lXdmcp -lnsl   >&5
configure:10251: $? = 0
configure:10263: result: yes
configure:10271: checking for IceOpenConnection in -lICE
configure:10300: gcc -o conftest -g -O2  -L -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lICE  -lXdmcp -lnsl   >&5
configure:10300: $? = 0
configure:10312: result: yes
configure:10321: checking for XpmCreatePixmapFromData in -lXpm
configure:10350: gcc -o conftest -g -O2    -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lXpm -lXt  -lSM -lICE -lXpm -lX11  -lXdmcp -lSM -lICE -lnsl   >&5
configure:10350: $? = 0
configure:10362: result: yes
configure:10370: checking if X11 header files implicitly declare return values
configure:10389: gcc -c -g -O2   -Werror  conftest.c >&5
configure:10389: $? = 0
configure:10391: result: no
configure:10429: checking size of wchar_t
configure:10435: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lnsl   >&5
configure:10435: $? = 0
configure:10435: ./conftest
configure:10435: $? = 0
configure:10452: result: 4
configure:10474: checking --enable-gui argument
configure:10562: result: GTK+ 3.x GUI support
configure:10681: checking --disable-gtktest argument
configure:10693: result: gtk test enabled
configure:10719: checking for pkg-config gtk+-3.0
configure:10724: result: found
configure:10726: checking for GTK - version >= 3.0.0
configure:10738: result: yes; found version 3.24.52
...

Full config.log:

Version of Vim

9.2.958

Environment

Operating system: Arch Linux

Logs and stack traces

(see Expected Behaviour section)


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21072@github.com>

Foxe Chen

unread,
Aug 17, 2026, 7:17:26 PM (15 hours ago) Aug 17
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#21072)

I remember this being intentional. However I'm not sure why this is done. @mattn ?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21072/5321350874@github.com>

mattn

unread,
Aug 17, 2026, 8:38:52 PM (14 hours ago) Aug 17
to vim/vim, Subscribed
mattn left a comment (vim/vim#21072)

Yes, this is intentional, done in patch 9.2.0511 (#20289, fixes #20268).

Vim's GTK4 GUI code does not use any X11 APIs directly; the X11 backend is loaded by GTK4 itself at runtime. Linking libX11/libXt/libICE/libSM would only add unnecessary dependencies, which was the complaint in #20268. --with-x=yes is overridden on purpose because packaging scripts often pass it unconditionally.

The trade-off: the gtk4 binary in a terminal has no +xterm_clipboard / +xsmp. Use the gtk3 build if those matter.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21072/5321968665@github.com>

Christian Brabandt

unread,
3:02 AM (8 hours ago) 3:02 AM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#21072)

Thanks, closing then.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21072/5324745867@github.com>

Reply all
Reply to author
Forward
0 new messages