Many developer libraries and developer tools are required to build Cygwin/X. Several packages are required in addition to the default packages installed by the Cygwin installer. Following is a list of additional packages that are required to compile Cygwin/X natively in Cygwin. Note that some of these packages are meta packages that will automatically cause several other packages to be selected for installation; do not unselect any of these automatically selected packages.
autoconf, automake, binutils, bison, bzip2, cygport, diffutils, fileutils, findutils, flex, gawk, gcc-core, git, libtool, make, patch, pkg-config, python3, sed, tar
Required protocol headers:
bigreqsproto, compositeproto, damageproto, dmxproto, fixesproto, fontsproto, glproto, inputproto, kbproto, presentproto, randrproto, recordproto, renderproto, resourceproto, scrnsaverproto, windowsdriproto, xcmiscproto, xextproto, xf86bigfontproto, xineramaproto, xproto
Required development libraries:
libdmx-devel, libfontenc-devel, libfreetype-devel, libGL-devel, libpixman1-devel, libX11-devel, libXRes-devel, libXau-devel, libXaw-devel, libXdmcp-devel, libXext-devel, libXfont2-devel, libXi-devel, libXinerama-devel, libXmu-devel, libXpm-devel, libXrender-devel, libXtst-devel, libxcb-icccm-devel, libxcb-image-devel, libxcb-keysyms-devel, libxcb-randr-devel, libxcb-render-devel, libxcb-render-util-devel, libxcb-shape-devel, libxcb-util-devel, libxcb-xkb-devel, libxkbfile-devel, zlib
Required miscellaneous packages:
font-util, khronos-opengl-registry, python3-lxml, xorg-util-macros, xtrans
Optional packages for building developer documentation:
docbook-xml43, doxygen, fop, xmlto, xorg-sgml-doctools
Note: The /usr/share/doc/Cygwin/xorg-server-n.n.n.README file installed with the X server binary package lists up-to-date runtime and build requirements.
Tip: Use setup -q -Ppackagename,packagename,etc. to quickly install the required packages.
Note: As of libXfont 1.5 and X server 1.16, the linkage issue discussed here should be resolved. This section is retained for information only.
libXfont must be statically linked for the server to start correctly, otherwise it fails with errors loading all fonts, including the mandatory fixed font.
This is due to limitations of Cygwin's current weak symbol handling, which requires static linking to work correctly. For example, in libXfont the RegisterFPEFunctions function is defined weak and should be overloaded with RegisterFPEFunctions defined in dix/dixfont.c in the xserver. However, such overloading will only currently work for Cygwin when libXfont is statically linked with the X server, and not as a shared libary.
If Cygwin's libXfont-devel package contains a shared library stub, /usr/lib/libXFont.dll.a, when building the X server, you must prepare your compilation environment so that the libXfont shared libary stub is not linked with.
A quick and dirty way of achieving this is to move libXFont.la and libXfont.dll.a aside whilst building the X server.
mv /usr/lib/libXFont.la /usr/lib/libXFont.la.old mv /usr/lib/libXFont.dll.a /usr/lib/libXFont.dll.a.old
A cleaner way is to generate a customized .pc file for libXfont and arrange for that to be in your PKG_CONFIG_PATH when ./configuring the X server. For example:
sed -e 's| -lXfont| /usr/lib/libXfont.a|' /usr/lib/pkgconfig/xfont.pc > ~/xfont.pc export PKG_CONFIG_PATH=~:$PKG_CONFIG_PATH