[vim/vim] gvim with gtk4 won't build (Issue #20488)

1 view
Skip to first unread message

chdiza

unread,
12:53 AM (4 hours ago) 12:53 AM
to vim/vim, Subscribed
chdiza created an issue (vim/vim#20488)

Steps to reproduce

Vim 9.2.0620.

./configure --enable-gui=gtk4 --without-wayland  --with-x
  --x-includes=/usr/include/x86_64-linux-gnu
  --x-libraries=/lib/x86_64-linux-gnu

make -j14

Observe the make process proceed, until this happens:

/usr/bin/ld: objects/gui_gtk4.o: in function `clip_read_cb':
/opt/bld/vim/src/gui_gtk4.c:3600:(.text+0xcac): undefined reference to `clip_convert_data'
collect2: error: ld returned 1 exit status
link.sh: Linking failed
make[1]: *** [Makefile:2113: vim] Error 1
make[1]: Leaving directory '/opt/bld/vim/src'
make: *** [Makefile:29: first] Error 2

Expected behaviour

Vim should build with gtk-4 support. It had been doing this correctly over the last couple of weeks once gtk4 support landed. It even worked a few days ago, but not today.

Version of Vim

9.2.0620

Environment

Linux Mint 22
Kitty 0.47.2
bash 5.2.21

Logs and stack traces


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/20488@github.com>

mattn

unread,
2:50 AM (2 hours ago) 2:50 AM
to vim/vim, Subscribed
mattn left a comment (vim/vim#20488)

Vim's GTK4 GUI intentionally does not use any X11 APIs. GTK has deprecated the X11 backend in GTK 4 and plans to remove it in GTK 5:

Following that direction, the GTK4 implementation in Vim excludes X11 entirely. configure forces with_x=no for --enable-gui=gtk4, so --with-x (and --x-includes/--x-libraries) has no effect.

The link error itself comes from --without-wayland: since patch 9.2.0606, clip_convert_data() is only compiled when Wayland clipboard support is enabled, but the GTK4 clipboard code also needs it. This is a build bug that should be fixed on the Vim side. As a workaround, please configure without --without-wayland.


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/20488/4688196036@github.com>

Reply all
Reply to author
Forward
0 new messages