Building with libdrm 2.4.94 fails due to missing declaration
Building weston 7.0.91 with libdrm 2.9.94 fails due to missing declaration:
cc -Ilibweston/backend-drm/75c3287@@drm-backend@sha -Ilibweston/backend-drm -I../libweston/backend-drm -I. -I../ -Iinclude -I../include -Ilibweston -I../libweston -Iprotocol -I/usr/include/pixman-1 -I/usr/include/libdrm -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -g -Wno-unused-parameter -Wno-shift-negative-value -Wno-missing-field-initializers -Wno-pedantic -fvisibility=hidden -fPIC -pthread -MD -MQ 'libweston/backend-drm/75c3287@@drm-backend@sha/modes.c.o' -MF 'libweston/backend-drm/75c3287@@drm-backend@sha/modes.c.o.d' -o 'libweston/backend-drm/75c3287@@drm-backend@sha/modes.c.o' -c ../libweston/backend-drm/modes.c
../libweston/backend-drm/modes.c: In function ‘drm_to_weston_mode_aspect_ratio’:
../libweston/backend-drm/modes.c:60:7: error: ‘DRM_MODE_FLAG_PIC_AR_64_27’ undeclared (first use in this function); did you mean ‘DRM_MODE_FLAG_PIC_AR_4_3’?
60 | case DRM_MODE_FLAG_PIC_AR_64_27:
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| DRM_MODE_FLAG_PIC_AR_4_3
../libweston/backend-drm/modes.c:60:7: note: each undeclared identifier is reported only once for each function it appears in
../libweston/backend-drm/modes.c:62:7: error: ‘DRM_MODE_FLAG_PIC_AR_256_135’ undeclared (first use in this function); did you mean ‘DRM_MODE_FLAG_PIC_AR_16_9’?
62 | case DRM_MODE_FLAG_PIC_AR_256_135:
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| DRM_MODE_FLAG_PIC_AR_16_9
[148/430] Generating symbol file 'libweston/2b98b6d@@weston-8@sha/libweston-8.so.0.0.0.symbols'.
ninja: build stopped: subcommand failed.
It seems that commit 6093772f is responsible which bumped the required libdrm version to 2.4.86. However DRM_MODE_FLAG_PIC_AR_64_27
and DRM_MODE_FLAG_PIC_AR_256_135
got only added with libdrm 2.4.95...
@daniels not sure how to fix this, I guess either ifdef those two cases or bump to 2.4.95 as minimum libdrm version...