Problem compiling xorg-server 1.20.5 from source: PresentCompleteModeCopy
On my linux system I try to compile xorg-server 1.20.5 but it fails here:
CC glxdriswrast.lo
CC glxdricommon.lo
CC glxscreens.lo
CC render2.lo
CC render2swap.lo
CC renderpix.lo
CC renderpixswap.lo
CC rensize.lo
CC single2.lo
CC single2swap.lo
CC singlepix.lo
CC singlepixswap.lo
CC singlesize.lo
CC swap_interval.lo
CC xfont.lo
CCLD libglx.la
CC glxdri2.lo
CCLD libglxdri.la
CC vndcmds.lo
CC vndext.lo
CC vndservermapping.lo
CC vndservervendor.lo
CCLD libglxvnd.la
make[1]: Leaving directory '/Depot/jj/xorg-server-1.20.5/glx'
Making all in present
make[1]: Entering directory '/Depot/jj/xorg-server-1.20.5/present'
CC present.lo
CC present_event.lo
CC present_execute.lo
present_execute.c: In function ‘present_execute_post’:
present_execute.c:110:24: error: ‘PresentCompleteModeSuboptimalCopy’ undeclared (first use in this function); did you mean ‘PresentCompleteModeCopy’?
mode = PresentCompleteModeSuboptimalCopy;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PresentCompleteModeCopy
present_execute.c:110:24: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:687: present_execute.lo] Error 1
make[1]: Leaving directory '/Depot/jj/xorg-server-1.20.5/present'
make: *** [Makefile:816: all-recursive] Error 1
Note that 1.20. compiled fine without any problem. Not sure what the issue is but perhaps there could be some check for whether PresentCompleteModeSuboptimalCopy has been found during configure time? (I am using the configure variant here, not yet meson; may try with meson).
With meson I get other errors, but I believe these are separate problems, not related to PresentCompleteModeCopy:
In file included from ../os/rpcauth.c:47:
/usr/include/tirpc/rpc/rpc.h:83:12: warning: redundant redeclaration of ‘bindresvport’ [-Wredundant-decls]
extern int bindresvport(int, struct sockaddr_in *);
^~~~~~~~~~~~
In file included from /usr/include/tirpc/rpc/rpc.h:40,
from ../os/rpcauth.c:47:
/usr/include/netinet/in.h:503:12: note: previous declaration of ‘bindresvport’ was here
extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __THROW;
^~~~~~~~~~~~
[575/661] Compiling C object 'hw/xfree86/glamor_egl/bf2859c@@glamoregl@sha/.._.._.._glamor_glamor_egl.c.o'.
FAILED: hw/xfree86/glamor_egl/bf2859c@@glamoregl@sha/.._.._.._glamor_glamor_egl.c.o
cc -Ihw/xfree86/glamor_egl/bf2859c@@glamoregl@sha -Ihw/xfree86/glamor_egl -I../hw/xfree86/glamor_egl -IXext -I../Xext -IXi -I../Xi -Icomposite -I../composite -Idamageext -I../damageext -Iexa -I../exa -Ifb -I../fb -Iglamor -I../glamor -Imi -I../mi -Imiext/damage -I../miext/damage -Imiext/shadow -I../miext/shadow -Imiext/sync -I../miext/sync -Idbe -I../dbe -Idri3 -I../dri3 -Iinclude -I../include -Ipresent -I../present -Irandr -I../randr -Irender -I../render -Ixfixes -I../xfixes -Ihw/xfree86/common -I../hw/xfree86/common -Ihw/xfree86/ddc -I../hw/xfree86/ddc -Ihw/xfree86/dri2 -I../hw/xfree86/dri2 -Ihw/xfree86/i2c -I../hw/xfree86/i2c -Ihw/xfree86/int10 -I../hw/xfree86/int10 -Ihw/xfree86/loader -I../hw/xfree86/loader -Ihw/xfree86/modes -I../hw/xfree86/modes -Ihw/xfree86/os-support -I../hw/xfree86/os-support -I../hw/xfree86/os-support/bus -Ihw/xfree86/parser -I../hw/xfree86/parser -Ihw/xfree86/ramdac -I../hw/xfree86/ramdac -Ihw/xfree86/vbe -I../hw/xfree86/vbe -Ihw/xfree86/vgahw -I../hw/xfree86/vgahw -I/Programs/Xproto/7.0.31/include -I/usr/include/X11/dri -I/Programs/Xorgproto/2018.4/include -I/usr/include/pixman-1 -I/Programs/Libxkbfile/1.1.0/include -I/Programs/Libxcb/1.13.1/include -I/usr/include/freetype2 -I/Programs/Libpng/1.6.37/include/libpng16 -I/Programs/Zlib/1.2.11/include -I/Programs/Harfbuzz/2.5.0/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/Programs/Pcre/8.43/include -I/Programs/Graphite2/1.3.13/include -I/Programs/Libdrm/2.4.98/include -I/Programs/Libdrm/2.4.98/include/libdrm -I/Programs/Mesa/18.3.4/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O2 -g -DHAVE_DIX_CONFIG_H -fno-strict-aliasing -fvisibility=hidden -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -O2 -fPIC -fno-strict-overflow -Wno-error -P -fPIC -D_DEFAULT_SOURCE -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -DHAVE_XORG_CONFIG_H -DXORG_NO_SDKSYMS -MD -MQ 'hw/xfree86/glamor_egl/bf2859c@@glamoregl@sha/.._.._.._glamor_glamor_egl.c.o' -MF 'hw/xfree86/glamor_egl/bf2859c@@glamoregl@sha/.._.._.._glamor_glamor_egl.c.o.d' -o 'hw/xfree86/glamor_egl/bf2859c@@glamoregl@sha/.._.._.._glamor_glamor_egl.c.o' -c ../glamor/glamor_egl.c
../glamor/glamor_egl.c: In function ‘glamor_get_formats’:
../glamor/glamor_egl.c:617:10: error: implicit declaration of function ‘eglQueryDmaBufFormatsEXT’; did you mean ‘eglQueryDevicesEXT’? [-Werror=implicit-function-declaration]
if (!eglQueryDmaBufFormatsEXT(glamor_egl->display, 0, NULL, &num))
^~~~~~~~~~~~~~~~~~~~~~~~
eglQueryDevicesEXT
../glamor/glamor_egl.c:617:10: warning: nested extern declaration of ‘eglQueryDmaBufFormatsEXT’ [-Wnested-externs]
../glamor/glamor_egl.c: In function ‘glamor_get_modifiers’:
../glamor/glamor_egl.c:657:10: error: implicit declaration of function ‘eglQueryDmaBufModifiersEXT’; did you mean ‘eglQueryDevicesEXT’? [-Werror=implicit-function-declaration]
if (!eglQueryDmaBufModifiersEXT(glamor_egl->display, format, 0, NULL,
^~~~~~~~~~~~~~~~~~~~~~~~~~
eglQueryDevicesEXT
../glamor/glamor_egl.c:657:10: warning: nested extern declaration of ‘eglQueryDmaBufModifiersEXT’ [-Wnested-externs]
cc1: some warnings being treated as errors
[580/661] Compiling C object 'hw/xfree86/x86emu/825bdfb@@x86emu@sta/ops.c.o'.
ninja: build stopped: subcommand failed.
PS: Hmm the format seems different to github issues. I see newlines here but in the issues, it seems as if the newlines get chopped away... very strange.