Compiling GTK 3.24/3.22 with Wayland IM support fails

I am trying to build GTK 3.24/3.22 with Wayland IM module support (–with-included-immodules=wayland) and so far I am running into a crash/failed compilation. Specifically:

imwayland.c:29:10: fatal error: text-input-unstable-v3-client-protocol.h: No such file or directory

I asked about this on IRC but I don’t think it went anywhere. Some relevant information:

  • Running “pkg-config --variable=pkgdatadir wayland-protocols” outputs “//usr/share/wayland-protocols”
  • Distro is Fedora 29
  • I have “wayland-protocols-devel-1.16-1.fc29.noarch” installed
  • The file “/usr/share/wayland-protocols/unstable/text-input/text-input-unstable-v3.xml” exists
  • I tried messing around with the pkgdatadir variable in /usr/share/pkgconfig/wayland-protocols.pc but nothing seemed to help

Am I missing some package or forgot some step?

Care to provide the full build log, as well as the way you’re building GTK?

You mixed up two different names. The file that you found is an XML file. But, the file that’s missing is a C header – it should be in a different place. Use pkg-config --cflags-only-I to find out where to look for it.

Absolutely. I am compiling GTK using autogen/configure/make, using GTK cloned from git. --with-included-immodules=wayland

configure --with-included-immodules=wayland


Autogen output, configure output, make output.

@greg-king I tried pkg-config --cflags-only-I wayland-protocols and it returned nothing, did I try the wrong thing? (not a pkg-config expert)

There’s something wrong in the build system; it seems it’s not generating the header and sources from the XML—and, yet, the rules are there and they typically work, as the CI infrastructure would have caught that.

Which version of Automake and Autoconf are you using? Are you using GNU make? Do you have a text-input-unstable-v3-client-protocol.h somewhere in the source directory or the inclusion path?

Can you try starting from a clean clone, and doing:

mkdir _build && cd _build
../configure --with-included-immodules=wayland


automake: automake-1.16.1-9.fc30.noarch
autoconf: autoconf-2.69-29.fc30.noarch
make: make-4.2.1-13.fc30.x86_64

Yes I am using GNU make, and no I can’t find that header file either in /usr/include or the sources pulled from git.

Same failure. :frowning_face:

Has the GTK3 side of things been ported to meson yet or is that only GTK4?

That’s entirely expected, as the header is generated. :slight_smile:
I was wondering if you were seeing some leftover file lying around.

The gtk-3-24 branch has a Meson build, so you may want to try that as well.

Ah yes, of course. :slight_smile: I looked didn’t find anything.

With meson I specified the Wayland backend and everything built correctly. As a side note: it seems specifying the Wayland backend (both with make and meson) does indeed the build the Wayland IM module, as I see an file after compilation.

imwayland.c:29:10: fatal error: text-input-unstable-v3-client-protocol.h: No such file or directory

This is your problem. Start looking where this file is, and why is not there.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.