zink, turnip: compilation is failing when compiling zink and turnip with only kgsl support
System information
- OS: Debian Bookworm proot running in Termux
- GPU:
Turnip Adreno (TM) 650
- Kernel version:
Linux localhost 4.19.110-perf+ #1 SMP PREEMPT Mon Feb 1 18:51:31 CST 2021 armv8l Android
- Mesa version: OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.1.0-devel (git-f99eab23)
- Xserver version (if applicable): Xvfb 21.1.7 with Termux patches
- Desktop manager and compositor: n/a
Describe the issue
When I'm trying to compile Zink and Turnip with kgsl support alone, compilation fails with error below:
FAILED: src/loader/libloader.a.p/loader.c.o
cc -Isrc/loader/libloader.a.p -Isrc/loader -I../src/loader -Iinclude -I../include -Isrc -I../src -fvisibility=hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O2 -g -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="23.1.0-devel"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=0 -DHAVE_OPENGL_ES_2=1 -DHAVE_SWRAST -DHAVE_ZINK -DVIDEO_CODEC_VC1DEC=0 -DVIDEO_CODEC_H264DEC=0 -DVIDEO_CODEC_H264ENC=0 -DVIDEO_CODEC_H265DEC=0 -DVIDEO_CODEC_H265ENC=0 -DHAVE_X11_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_XCB_PLATFORM -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DALLOW_KCMP -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_REALLOCARRAY -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_SYS_INOTIFY_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_TIMESPEC_GET -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_GNU_QSORT_R -DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DLLVM_AVAILABLE '-DMESA_LLVM_VERSION_STRING="15.0.7"' -DLLVM_IS_SHARED=1 -DDRAW_LLVM_AVAILABLE -DUSE_LIBELF -DUSE_LIBGLVND=1 -DHAVE_VALGRIND -DMESA_EXECMEM -DHAVE_DRI -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -DHAVE_LIBSENSORS=1 -mtls-dialect=gnu2 -Werror=missing-prototypes -Werror=return-type -Werror=empty-body -Werror=incompatible-pointer-types -Wimplicit-fallthrough -Wmisleading-indentation -Wno-missing-field-initializers -Wno-format-truncation -Wno-nonnull-compare -fno-math-errno -fno-trapping-math -fno-common -Wno-unused-function -Werror=format -Wformat-security -ffunction-sections -fdata-sections -fPIC -pthread -DUSE_DRICONF '-DDEFAULT_DRIVER_DIR="/usr/local/lib/arm-linux-gnueabihf/dri"' -MD -MQ src/loader/libloader.a.p/loader.c.o -MF src/loader/libloader.a.p/loader.c.o.d -o src/loader/libloader.a.p/loader.c.o -c ../src/loader/loader.c
../src/loader/loader.c: In function ‘loader_get_render_node’:
../src/loader/loader.c:184:8: warning: implicit declaration of function ‘drmGetDeviceFromDevId’ [-Wimplicit-function-declaration]
184 | if (drmGetDeviceFromDevId(device, 0, &dev_ptr) < 0)
| ^~~~~~~~~~~~~~~~~~~~~
../src/loader/loader.c:193:4: warning: implicit declaration of function ‘drmFreeDevice’; did you mean ‘drmFreeDevices’? [-Wimplicit-function-declaration]
193 | drmFreeDevice(&dev_ptr);
| ^~~~~~~~~~~~~
| drmFreeDevices
../src/loader/loader.c: In function ‘drm_construct_id_path_tag’:
../src/loader/loader.c:258:26: error: ‘struct _drmDevice’ has no member named ‘businfo’
258 | device->businfo.pci->domain,
| ^~
../src/loader/loader.c:259:26: error: ‘struct _drmDevice’ has no member named ‘businfo’
259 | device->businfo.pci->bus,
| ^~
../src/loader/loader.c:260:26: error: ‘struct _drmDevice’ has no member named ‘businfo’
260 | device->businfo.pci->dev,
| ^~
../src/loader/loader.c:261:26: error: ‘struct _drmDevice’ has no member named ‘businfo’
261 | device->businfo.pci->func) < 0) {
| ^~
../src/loader/loader.c:269:27: error: ‘struct _drmDevice’ has no member named ‘businfo’
269 | fullname = device->businfo.platform->fullname;
| ^~
../src/loader/loader.c:271:27: error: ‘struct _drmDevice’ has no member named ‘businfo’
271 | fullname = device->businfo.host1x->fullname;
| ^~
../src/loader/loader.c: In function ‘drm_get_id_path_tag_for_fd’:
../src/loader/loader.c:314:8: warning: implicit declaration of function ‘drmGetDevice2’; did you mean ‘drmGetDevices2’? [-Wimplicit-function-declaration]
314 | if (drmGetDevice2(fd, 0, &device) != 0)
| ^~~~~~~~~~~~~
| drmGetDevices2
../src/loader/loader.c: In function ‘loader_get_user_preferred_fd’:
../src/loader/loader.c:366:24: error: ‘struct _drmDevice’ has no member named ‘deviceinfo’
366 | devices[i]->deviceinfo.pci->vendor_id == vendor_id &&
| ^~
../src/loader/loader.c:367:24: error: ‘struct _drmDevice’ has no member named ‘deviceinfo’
367 | devices[i]->deviceinfo.pci->device_id == device_id) {
| ^~
../src/loader/loader.c: In function ‘drm_get_pci_id_for_fd’:
../src/loader/loader.c:431:23: error: ‘struct _drmDevice’ has no member named ‘deviceinfo’
431 | *vendor_id = device->deviceinfo.pci->vendor_id;
| ^~
../src/loader/loader.c:432:21: error: ‘struct _drmDevice’ has no member named ‘deviceinfo’
432 | *chip_id = device->deviceinfo.pci->device_id;
| ^~
../src/loader/loader.c: In function ‘loader_get_device_name_for_fd’:
../src/loader/loader.c:489:11: warning: implicit declaration of function ‘drmGetDeviceNameFromFd2’ [-Wimplicit-function-declaration]
489 | return drmGetDeviceNameFromFd2(fd);
| ^~~~~~~~~~~~~~~~~~~~~~~
../src/loader/loader.c:489:11: warning: returning ‘int’ from a function with return type ‘char *’ makes pointer from integer without a cast [-Wint-conversion]
489 | return drmGetDeviceNameFromFd2(fd);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[645/1301] Compiling C object src/freedreno/vulkan/libvulkan_freedreno.so.p/tu_pipeline.c.o
ninja: build stopped: subcommand failed.
It's compiling fine when both msm and kgsl are enabled, but there are issues with running vulkan itself in this case (I'm using MESA_VK_WSI_DEBUG=sw
to deal with lack of DRI3 as env variable works after update of xserver sources in Termux repo).
Taging #8460 for visibility.