gtk3-scan fails on gtk_plug_get_type, wayland backend
When I enable docs and disable X11 backend in favor of Wayland, I get this error at final build stages:
gtk3-scan.c: In function 'get_object_types':
gtk3-scan.c:164:23: warning: implicit declaration of function 'gtk_plug_get_type'; did you mean 'atk_plug_get_type'? [-Wimplicit-function-declaration]
object_types[i++] = gtk_plug_get_type ();
^~~~~~~~~~~~~~~~~
atk_plug_get_type
gtk3-scan.c:205:23: warning: implicit declaration of function 'gtk_socket_get_type'; did you mean 'atk_socket_get_type'? [-Wimplicit-function-declaration]
object_types[i++] = gtk_socket_get_type ();
^~~~~~~~~~~~~~~~~~~
atk_socket_get_type
/usr/lib/gcc/x86_64-gentoo-linux-musl/8.2.0/../../../../x86_64-gentoo-linux-musl/bin/ld: .libs/gtk3-scan.o: in function `main':
gtk3-scan.c:(.text.startup+0x6da): undefined reference to `gtk_plug_get_type'
/usr/lib/gcc/x86_64-gentoo-linux-musl/8.2.0/../../../../x86_64-gentoo-linux-musl/bin/ld: gtk3-scan.c:(.text.startup+0x8ca): undefined reference to `gtk_socket_get_type'
collect2: error: ld returned 1 exit status
2019-02-09 15:43:38,078:scangobj.py:execute_command:1196:WARNING:Linking scanner failed: 1, command: /bin/sh ../../../libtool --tag=CC --mode=link x86_64-gentoo-linux-musl-gcc -lgobject-2.0 -lglib-2.0 -Os -pipe -march=native -Wall -Wl,-O1 -Wl,--as-needed gtk3-scan.lo ../../../gdk/libgdk-3.la ../../../gtk/libgtk-3.la -lpangocairo-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -latk-1.0 -lxkbcommon -lwayland-cursor -lwayland-egl -lwayland-client -lepoxy -lpangoft2-1.0 -lpango-1.0 -lfontconfig -lfreetype -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lm -lharfbuzz -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -Wl,-O1 -Wl,--as-needed -o gtk3-scan
make[4]: *** [Makefile:1344: scan-build.stamp] Error 1
make[4]: Leaving directory '/var/tmp/portage/x11-libs/gtk+-3.24.5/work/gtk+-3.24.5-abi_x86_64.amd64/docs/reference/gtk'
Before, this log piece matching gtk/Makefile.am seems relevant, as it get rids of both plug and socket:
/bin/grep -o '\bg[td]k_[a-zA-Z0-9_]*_get_type\b' | \
sort | uniq | \
/bin/sed '{ s/^/*tp++ = /; s/$/();/; s/^.*\(gdk_x11\|gtk_plug_\|gtk_socket_\).*$/#ifdef GDK_WINDOWING_X11\n&\n#endif/; }' >> xgen-gtf \
&& cp xgen-gtf gtktypefuncs.c && rm -f xgen-gtf
I tried adding socket and plug headers to docs/reference/gtk/Makefile.am IGNORE_HFILES but kept getting the error. How to exclude them from the scan properly?