zink: build failure, unknown type name PFN_vkUseIOSurfaceMVK, PFN_vkGetIOSurfaceMVK in zink_screen.h
System information
- OS: MacOS Catalina 10.15.7
- GPU: Intel Iris Plus Graphics 1536 MB graphics
- Kernel version: Darwin kirlia.home 19.6.0 Darwin Kernel Version 19.6.0: Tue Oct 12 18:34:05 PDT 2021; root:xnu-6153.141.43~1/RELEASE_X86_64 x86_64
- Mesa version: 21.2.0-devel
- Xserver version (if applicable): XQuartz 2.8.0_beta3 (xorg-server 1.19.7)
- Vulkan Instance Version: 1.2.176.1 (LunarG install)
- Meson version: 0.58.0
- Ninja version: 1.10.2
Describe the issue
I'm trying to compile mesa zink over LunarG vulkan with meson/ninja.
meson builddir/ -Dgallium-drivers=zink -Dc_std=c11
ninja -C builddir/
Vulkan is installed and vulkaninfo works. Meson reports that it finds vulkan:
Run-time dependency vulkan found: YES
However the build fails as follows, on two files:
In file included from src/gallium/drivers/zink/zink_device_info.c:2:
../src/gallium/drivers/zink/zink_screen.h:146:4: error: unknown type name 'PFN_vkUseIOSurfaceMVK'
PFN_vkUseIOSurfaceMVK vk_UseIOSurfaceMVK;
^
../src/gallium/drivers/zink/zink_screen.h:147:4: error: unknown type name 'PFN_vkGetIOSurfaceMVK'
PFN_vkGetIOSurfaceMVK vk_GetIOSurfaceMVK;
^
2 errors generated.
The same error appears with file src/gallium/drivers/zink/zink_instance.c
if I relaunch the build.
I have tried to build with the main branch but get even more build errors.
Any extra information would be greatly appreciated
Mesa full log
The Meson build system
Version: 0.58.0
Source dir: /Users/franco/build/mesa
Build dir: /Users/franco/build/mesa/builddir
Build type: native build
Program python found: YES (/opt/local/bin/python)
Project name: mesa
Project version: 21.2.0-devel
C compiler for the host machine: cc (clang 12.0.0 "Apple clang version 12.0.0 (clang-1200.0.32.29)")
C linker for the host machine: cc ld64 609.8
C++ compiler for the host machine: c++ (clang 12.0.0 "Apple clang version 12.0.0 (clang-1200.0.32.29)")
C++ linker for the host machine: c++ ld64 609.8
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found CMake: /opt/local/bin/cmake (3.21.4)
Run-time dependency clang found: NO (tried cmake)
Found pkg-config: /opt/local/bin/pkg-config (0.29.2)
Run-time dependency vulkan found: YES
Program python3 found: YES (/opt/local/bin/python3)
Fetching value of define "ETIME" : 101
Checking for function "bswap32" : YES
Checking for function "bswap64" : YES
Checking for function "clz" : YES
Checking for function "clzll" : YES
Checking for function "ctz" : YES
Checking for function "expect" : YES
Checking for function "ffs" : YES
Checking for function "ffsll" : YES
Checking for function "popcount" : YES
Checking for function "popcountll" : YES
Checking for function "unreachable" : YES
Checking for function "types_compatible_p" : YES
Compiler for C supports function attribute const: YES
Compiler for C supports function attribute flatten: YES
Compiler for C supports function attribute malloc: YES
Compiler for C supports function attribute pure: YES
Compiler for C supports function attribute unused: YES
Compiler for C supports function attribute warn_unused_result: YES
Compiler for C supports function attribute weak: YES
Compiler for C supports function attribute format: YES
Compiler for C supports function attribute packed: YES
Compiler for C supports function attribute returns_nonnull: YES
Compiler for C supports function attribute alias: NO
Compiler for C supports function attribute noreturn: YES
Compiler for C supports function attribute visibility:hidden: YES
Checking if "__uint128_t" compiles: YES
Compiler for C supports arguments -Werror=implicit-function-declaration: YES
Compiler for C supports arguments -Werror=missing-prototypes: YES
Compiler for C supports arguments -Werror=return-type: YES
Compiler for C supports arguments -Werror=empty-body: YES
Compiler for C supports arguments -Werror=incompatible-pointer-types: YES
Compiler for C supports arguments -Werror=int-conversion: YES
Compiler for C supports arguments -Wimplicit-fallthrough: YES
Compiler for C supports arguments -Werror=thread-safety: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-format-truncation: NO
Compiler for C supports arguments -fno-math-errno: YES
Compiler for C supports arguments -fno-trapping-math: YES
Compiler for C supports arguments -Qunused-arguments: YES
Compiler for C supports arguments -fno-common: YES
Compiler for C supports arguments -Werror=format: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C++ supports arguments -Werror=return-type: YES
Compiler for C++ supports arguments -Werror=empty-body: YES
Compiler for C++ supports arguments -Wno-non-virtual-dtor: YES
Compiler for C++ supports arguments -Wno-missing-field-initializers: YES
Compiler for C++ supports arguments -Wno-format-truncation: NO
Compiler for C++ supports arguments -fno-math-errno: YES
Compiler for C++ supports arguments -fno-trapping-math: YES
Compiler for C++ supports arguments -Qunused-arguments: YES
Compiler for C++ supports arguments -flifetime-dse=1: NO
Compiler for C++ supports arguments -Werror=format: YES
Compiler for C++ supports arguments -Wformat-security: YES
Compiler for C supports arguments -Wno-override-init: YES
Compiler for C supports arguments -Wno-initializer-overrides: YES
Compiler for C supports arguments -Werror=pointer-arith: YES
Compiler for C++ supports arguments -Werror=pointer-arith: YES
Compiler for C supports arguments -Werror=gnu-empty-initializer: YES
Compiler for C++ supports arguments -Werror=gnu-empty-initializer: YES
Compiler for C supports arguments -Wmicrosoft-enum-value: YES
Checking if "GCC atomic builtins" compiles: YES
Checking if "GCC atomic builtins required -latomic" links: YES
Checking if "GCC 64bit atomics" with dependency not-found links: YES
Library ws2_32 found: NO
Header has symbol "major" : NO
Header has symbol "major" : NO
Check usable header "sys/sysctl.h" : YES
Check usable header "xlocale.h" : YES
Check usable header "linux/futex.h" : NO
Check usable header "endian.h" : NO
Check usable header "dlfcn.h" : YES
Check usable header "execinfo.h" : YES
Check usable header "sys/shm.h" : YES
Check usable header "cet.h" : NO
Check usable header "pthread_np.h" : NO
Checking for function "strtof" : YES
Checking for function "mkostemp" : YES
Checking for function "timespec_get" : YES
Checking for function "memfd_create" : NO
Checking for function "random_r" : NO
Checking for function "flock" : YES
Checking for function "strtok_r" : YES
Checking for function "getrandom" : NO
Header has symbol "program_invocation_name" : NO
Checking for function "posix_memalign" : YES
Checking whether type "struct dirent" has member "d_type" : YES
Checking if "strtod has locale support" links: YES
Checking if "Bsymbolic" links: NO
Checking if "gc-sections" links: NO
Checking if "version-script" links: NO
Checking if "dynamic-list" links: NO
Compiler for C supports link arguments -Wl,--build-id=sha1: NO
Checking for function "dlopen" : YES
Checking for function "dladdr" with dependency not-found: YES
Checking for function "dl_iterate_phdr" : NO
Checking for function "clock_gettime" : YES
Run-time dependency zlib found: YES 1.2.11
Run-time dependency libzstd found: YES 1.5.0
Run-time dependency threads found: YES
Checking for function "pthread_setaffinity_np" with dependency threads: NO
Library expat found: YES
Library m found: YES
Run-time dependency libdrm found: NO (tried pkgconfig, framework and cmake)
WARNING: Ignoring LLVM CMake dependency because dynamic was requested
llvm-config found: NO need '>= 3.9.0'
Run-time dependency LLVM found: NO (tried cmake and config-tool)
Looking for a fallback subproject for the dependency llvm (modules: bitwriter, engine, mcdisassembler, mcjit, core, executionengine, scalaropts, transformutils, instcombine)
Neither a subproject directory nor a llvm.wrap file was found.
Subproject llvm is buildable: NO (disabling)
Dependency llvm (modules: bitwriter, engine, mcdisassembler, mcjit, core, executionengine, scalaropts, transformutils, instcombine) from subproject subprojects/llvm found: NO (subproject failed to configure)
Run-time dependency valgrind found: NO (tried pkgconfig)
Program bison found: YES (/opt/local/bin/bison)
Program bison found: YES 3.8.2 (/opt/local/bin/bison)
Program flex found: YES (/opt/local/bin/flex)
Library System found: YES
Run-time dependency x11 found: YES 1.7.2
Run-time dependency xext found: YES 1.3.4
Run-time dependency xfixes found: YES 6.0.0
Run-time dependency xcb-glx found: YES 1.14
Run-time dependency xcb-shm found: YES 1.14
Run-time dependency xcb found: YES 1.14
Run-time dependency x11-xcb found: YES 1.7.2
Run-time dependency glproto found: YES 1.4.17
Library sensors found: NO
Compiler for C supports link arguments -Wl,--gc-sections: NO
Program nm found: YES (/opt/local/bin/nm)
Program symbols-check.py found: YES (/usr/bin/env python /Users/franco/build/mesa/bin/symbols-check.py)
Program install_megadrivers.py found: YES (/usr/local/opt/python@3.9/bin/python3.9 /Users/franco/build/mesa/bin/install_megadrivers.py)
WARNING: Library target 'GLESv1_CM' has 'name_prefix' set. Compilers may not find it from its '-lGLESv1_CM' linker flag in the 'glesv1_cm.pc' pkg-config file.
WARNING: Library target 'GLESv1_CM' has 'name_prefix' set. Compilers may not find it from its '-lGLESv1_CM' linker flag in the 'glesv1_cm-uninstalled.pc' pkg-config file.
WARNING: Library target 'GLESv2' has 'name_prefix' set. Compilers may not find it from its '-lGLESv2' linker flag in the 'glesv2.pc' pkg-config file.
WARNING: Library target 'GLESv2' has 'name_prefix' set. Compilers may not find it from its '-lGLESv2' linker flag in the 'glesv2-uninstalled.pc' pkg-config file.
Library Xplugin found: YES
Program /Users/franco/build/mesa/bin/install_megadrivers.py found: YES (/usr/local/opt/python@3.9/bin/python3.9 /Users/franco/build/mesa/bin/install_megadrivers.py)
Message: Configuration summary:
prefix: /usr/local
libdir: lib
includedir: include
OpenGL: yes (ES1: yes ES2: yes)
OSMesa: no
DRI platform: apple
DRI drivers: no
DRI driver dir: /usr/local/lib/dri
GLX: DRI-based
EGL: no
GBM: no
Vulkan drivers: no
llvm: no
Gallium drivers: zink
Gallium st: mesa
HUD lmsensors: no
Shared-glapi: yes
Build targets in project: 112
mesa 21.2.0-devel
Subprojects
llvm: NO Neither a subproject directory nor a llvm.wrap file was found.
Option c_std is: c11 [default: c99]
Found ninja-1.10.2 at /opt/local/bin/ninja
Compilation command for zink_device_info.c
[192/237] Compiling C object src/gallium/drivers...libzink.a.p/meson-generated_.._zink_instance.c.o
FAILED: src/gallium/drivers/zink/libzink.a.p/meson-generated_.._zink_instance.c.o
cc -Isrc/gallium/drivers/zink/libzink.a.p -Isrc/gallium/drivers/zink -I../src/gallium/drivers/zink -Iinclude -I../include -Isrc -I../src -Isrc/mapi -I../src/mapi -Isrc/mesa -I../src/mesa -I../src/gallium/include -Isrc/gallium/auxiliary -I../src/gallium/auxiliary -Isrc/vulkan/wsi -I../src/vulkan/wsi -Isrc/vulkan/util -I../src/vulkan/util -Isrc/compiler/nir -I../src/compiler/nir -Isrc/util -I../src/util -I/opt/local/include -I/usr/local/include -fvisibility=hidden -fcolor-diagnostics -Wall -Winvalid-pch -std=c11 -O2 -g -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="21.2.0-devel"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DBUILDING_MESA -DUSE_ELF_TLS -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL -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_NORETURN -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DHAVE_SYS_SYSCTL_H -DHAVE_XLOCALE_H -DHAVE_DLFCN_H -DHAVE_EXECINFO_H -DHAVE_SYS_SHM_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_TIMESPEC_GET -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_LIBUNWIND -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=empty-body -Werror=incompatible-pointer-types -Werror=int-conversion -Wimplicit-fallthrough -Werror=thread-safety -Wno-missing-field-initializers -fno-math-errno -fno-trapping-math -Qunused-arguments -fno-common -Werror=format -Wformat-security -Wno-microsoft-enum-value -MD -MQ src/gallium/drivers/zink/libzink.a.p/meson-generated_.._zink_instance.c.o -MF src/gallium/drivers/zink/libzink.a.p/meson-generated_.._zink_instance.c.o.d -o src/gallium/drivers/zink/libzink.a.p/meson-generated_.._zink_instance.c.o -c src/gallium/drivers/zink/zink_instance.c
In file included from src/gallium/drivers/zink/zink_instance.c:2:
../src/gallium/drivers/zink/zink_screen.h:146:4: error: unknown type name 'PFN_vkUseIOSurfaceMVK'
PFN_vkUseIOSurfaceMVK vk_UseIOSurfaceMVK;
^
../src/gallium/drivers/zink/zink_screen.h:147:4: error: unknown type name 'PFN_vkGetIOSurfaceMVK'
PFN_vkGetIOSurfaceMVK vk_GetIOSurfaceMVK;
^
2 errors generated.