I'm trying to build the Tigervnc server in an i386/alpine (Docker) environment. I manage to build the Viewer after disabling NLS support, but the Server build fails at
Can anybody shed some light on what I need to tweak or include to get the server to build?
I'm building from
https://github.com/TigerVNC/tigervnc/archive/v1.7.0.tar.gz. Please see the following for my build process setup and config.
I'm able to fulfill all the build-time deps by doing:
apk add cmake alpine-sdk zlib-dev fltk-dev gnutls-dev libjpeg-turbo autoconf automake util-macros font-util-dev libtool libxkbfile-dev
Following the instructions as at
https://github.com/TigerVNC/tigervnc/blob/master/BUILDING.txt, this is how it goes for me:
# TigerVNC viewer build (succeeds)
I had trouble building the TigerVNC viewer due to libintl_gettext reference errors in linking. Even after I followed the advice at
https://www.gnu.org/software/gettext/FAQ.html#integrating_undefined and built and installed gettext from source, I still got those errors, so after
cmake -G "Unix Makefiles" .
I edit config.h to have
#define ENABLE_NLS 0
and then "make" succeeds. NLS support is not critical for me at the moment.
# TigerVNC Server build (fails)
I pull down
https://www.x.org/archive//individual/xserver/xorg-server-1.18.4.tar.gz which I believe corresponds to the alpine xorg version I have installed:
xorg-server-dev-1.18.4-r3
and the patch
patch -p1 < <tiger_sourcedir>/unix/xserver118.patch
applies cleanly.
I configure like this (very close to default in BUILDING.txt):
./configure --with-pic --without-dtrace --disable-static --disable-dri --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive --disable-config-hal --disable-config-udev --disable-dri2 --disable-xwayland --enable-glx --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" --with-xkb-path=/usr/share/X11/xkb --with-xkb-output=/var/lib/xkb --with-xkb-bin-directory=/usr/bin
but "make TIGERVNC_SRCDIR=<tiger_sourcedir>" fails like this:
CC libvnccommon_la-Input.loInput.c: In function 'vncKeyboardEvent':Input.c:396:13: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'KeySym {aka long unsigned int}' [-Wformat=] LOG_DEBUG("Unexpected release of keysym 0x%x", keysym); ^Input.c:70:46: note: in definition of macro 'LOG_DEBUG' #define LOG_DEBUG(...) vncLogDebug(LOG_NAME, __VA_ARGS__) ^~~~~~~~~~~Input.c:440:14: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'KeySym {aka long unsigned int}' [-Wformat=] LOG_ERROR("Failure adding new keysym 0x%x", keysym); ^Input.c:67:46: note: in definition of macro 'LOG_ERROR' #define LOG_ERROR(...) vncLogError(LOG_NAME, __VA_ARGS__) ^~~~~~~~~~~Input.c:444:12: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'KeySym {aka long unsigned int}' [-Wformat=] LOG_INFO("Added unknown keysym 0x%x to keycode %d", ^Input.c:69:44: note: in definition of macro 'LOG_INFO' #define LOG_INFO(...) vncLogInfo(LOG_NAME, __VA_ARGS__) ^~~~~~~~~~~Input.c:454:14: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'KeySym {aka long unsigned int}' [-Wformat=] LOG_ERROR("Newly added keysym 0x%x cannot be generated", keysym); ^Input.c:67:46: note: in definition of macro 'LOG_ERROR' #define LOG_ERROR(...) vncLogError(LOG_NAME, __VA_ARGS__) ^~~~~~~~~~~Input.c:475:13: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'KeySym {aka long unsigned int}' [-Wformat=] LOG_DEBUG("Finding alternative to keysym 0x%x to avoid fake shift for numpad", keysym); ^Input.c:70:46: note: in definition of macro 'LOG_DEBUG' #define LOG_DEBUG(...) vncLogDebug(LOG_NAME, __VA_ARGS__) ^~~~~~~~~~~Input.c:584:14: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'KeySym {aka long unsigned int}' [-Wformat=] LOG_ERROR("Keysym 0x%x generated by both keys %d and %d", keysym, i, keycode); ^Input.c:67:46: note: in definition of macro 'LOG_ERROR' #define LOG_ERROR(...) vncLogError(LOG_NAME, __VA_ARGS__) ^~~~~~~~~~~ CC libvnccommon_la-InputXKB.lo CXXLD libvnccommon.lamake[2]: *** No rule to make target '../../../../common/network/libnetwork.la', needed by 'libvnc.la'. Stop.make[2]: Leaving directory '/root/build2/unix/xserver/hw/vnc'make[1]: *** [Makefile:612: all-recursive] Error 1make[1]: Leaving directory '/root/build2/unix/xserver/hw'make: *** [Makefile:779: all-recursive] Error 1