undefined reference to `__wrap_WriteToClient' when doing LTO meson build
Hi, I had encountered link error during build with meson. My flags is:
-D ipv6=true \
-D dmx=true \
-D xvfb=true \
-D xnest=true \
-D xcsecurity=true \
-D xorg=true \
-D xephyr=true \
-D xwayland=true \
-D xwayland_eglstream=true \
-D glamor=true \
-D udev=true \
-D systemd_logind=true \
-D suid_wrapper=true \
-D xkb_dir=/usr/share/X11/xkb \
-D xkb_output_dir=/var/lib/xkb
And here is a snippet of link error,
/usr/bin/ld: /tmp/cc9Wx0Ti.ltrans3.ltrans.o: in function `XkbSendIndicatorNotify.isra.0':
<artificial>:(.text+0x54e): undefined reference to `__wrap_WriteToClient'
/usr/bin/ld: /tmp/cc9Wx0Ti.ltrans3.ltrans.o: in function `ProcXIQueryVersion':
<artificial>:(.text+0x7a6): undefined reference to `__wrap_WriteToClient'
/usr/bin/ld: /tmp/cc9Wx0Ti.ltrans3.ltrans.o: in function `ProcXIGetFocus':
<artificial>:(.text+0xab9): undefined reference to `__wrap_WriteToClient'
/usr/bin/ld: /tmp/cc9Wx0Ti.ltrans3.ltrans.o: in function `ProcXChangeDeviceDontPropagateList':
<artificial>:(.text+0x2052): undefined reference to `__wrap_dixLookupWindow'
Here is full error message: https://git.io/fjBLD. Full log: https://git.io/fjBtY
Reproducible with xorgproto
stable and git.
Edited by Adam Jackson