<div>Hello, I am facing the following problem when trying to compile Cairo with support to to X Window System (it works without it). First I configure it with:</div><div> </div><div>"./configure png_REQUIRES=/media/34GB/Arquivos-de-Programas-Linux/Png-1.0.19/lib/pkgconfig/ png_CFLAGS=/media/34GB/Arquivos-de-Programas-Linux/Png-1.0.19/include/ png_LIBS=/media/34GB/Arquivos-de-Programas-Linux/Png-1.0.19/lib/ FONTCONFIG_CFLAGS=/media/34GB/Arquivos-de-Programas-Linux/Fontconfig-2.4.0/include/ FONTCONFIG_LIBS=/media/34GB/Arquivos-de-Programas-Linux/Fontconfig-2.4.0/lib/ FREETYPE_CFLAGS=/media/34GB/Arquivos-de-Programas-Linux/Freetype-2.2.1/include/ FREETYPE_LIBS=/media/34GB/Arquivos-de-Programas-Linux/Freetype-2.2.1/lib/ --x-includes=/media/34GB/Arquivos-de-Programas-Linux/xorg/X11-1.6.7/include/:/media/34GB/Arquivos-de-Programas-Linux/xorg/Xorgproto-2018.1/include/ --x-libraries=/media/34GB/Arquivos-de-Programas-Linux/xorg/X11-1.6.7/lib/"</div><div> </div><div>It seems to be okay. configure output says:</div><div>"cairo will be compiled with the following surface backends:<div>image: yes (always builtin)</div><div>Xlib: yes"</div><div> </div><div>Xlib.h file it is in the X11-1.6.7/include/X11 dir that I believe should be detected from using --x-includes=.../X11-1.6.7/include/. It appears on the "CAIRO_CFLAGS" on the top level Makefile.</div><div> </div><div>However when I try to compile it, after sometime, gazilions of errors message appears,with the first one being:</div><div> </div><div>But why it isn't detected, since it appeared on both configure and on the Makefile? All the other include, from all the other packages, doesn't show any problems to being detected during the compilation stage.</div><div> </div><div>And what can I do rectify it? Pass the X11-1.6.7/include/ to CFLAGS on the makefile instead CAIRO_CFLAGS? Create a sym link to Xlib.h on /usr/include?</div><div> </div><div>P.S: I jus gave a look in config.log and perhaps this info might prove to be useful:</div><div> </div><div>"<div>configure:20161: result: libraries /media/34GB/Arquivos-de-Programas-Linux/xorg/X11-1.6.7/lib/, headers /media/34GB/Arquivos-de-Programas-Linux/xorg/X11-1.6.7/include/:/media/34GB/Arquivos-de-Programas-Linux/xorg/Xorgproto-2018.1/include/</div><div>configure:20179: checking for cairo's Xlib backend</div><div>configure:20196: checking for xlib</div><div>configure:20204: $PKG_CONFIG --exists --print-errors "$xlib_REQUIRES"</div><div>Package x11 was not found in the pkg-config search path.</div><div>Perhaps you should add the directory containing `x11.pc'</div><div>to the PKG_CONFIG_PATH environment variable</div><div>No package 'x11' found</div><div>configure:20207: $? = 1</div><div>configure:20222: $PKG_CONFIG --exists --print-errors "$xlib_REQUIRES"</div><div>Package x11 was not found in the pkg-config search path.</div><div>Perhaps you should add the directory containing `x11.pc'</div><div>to the PKG_CONFIG_PATH environment variable</div><div>No package 'x11' found</div><div>configure:20225: $? = 1</div><div>No package 'x11' found</div><div>configure:20422: gcc -o conftest -g -O2 conftest.c -lm -L/media/34GB/Arquivos-de-Programas-Linux/xorg/X11-1.6.7/lib/ -lX11 >&5</div><div>/media/34GB/Arquivos-de-Programas-Linux/xorg/X11-1.6.7/lib//libX11.so: undefined reference to `xcb_wait_for_reply64'</div><div>/media/34GB/Arquivos-de-Programas-Linux/xorg/X11-1.6.7/lib//libX11.so: undefined reference to `xcb_poll_for_queued_event'</div><div>/media/34GB/Arquivos-de-Programas-Linux/xorg/X11-1.6.7/lib//libX11.so: undefined reference to `xcb_poll_for_reply64'</div><div>collect2: ld returned 1 exit status</div>"</div></div>