Cannot install PCSX2-git - Playstation 2 emulator

Hello.

I tried to build pcsx2-git with yay.

For about 2 months i haven’t been able to build it.

-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building with GNU GCC
-- Cross compilation is disabled.
-- Compiling a x86_64 build on a x86_64 host.
-- Found Git: /usr/bin/git (found version "2.36.1") 
-- Found ALSA: /usr/lib/libasound.so (found version "1.2.6.1") 
-- Found PCAP: /usr/lib/libpcap.so  
-- Performing Test PCAP_LINKS_SOLO
-- Performing Test PCAP_LINKS_SOLO - Success
-- Looking for pcap_get_pfring_id
-- Looking for pcap_get_pfring_id - not found
-- Found Gettext: /usr/bin/msgmerge (found version "0.21") 
-- Looking for lzma_auto_decoder in /usr/lib/liblzma.so
-- Looking for lzma_auto_decoder in /usr/lib/liblzma.so - found
-- Looking for lzma_easy_encoder in /usr/lib/liblzma.so
-- Looking for lzma_easy_encoder in /usr/lib/liblzma.so - found
-- Looking for lzma_lzma_preset in /usr/lib/liblzma.so
-- Looking for lzma_lzma_preset in /usr/lib/liblzma.so - found
-- Found LibLZMA: /usr/lib/liblzma.so (found version "5.2.5") 
-- Found OpenGL: /usr/lib/libOpenGL.so   
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.12") 
-- Found PNG: /usr/lib/libpng.so (found version "1.6.37") 
-- Could NOT find Vtune (missing: VTUNE_LIBRARIES VTUNE_INCLUDE_DIRS) 
-- Found wxWidgets: -pthread;;;-lwx_baseu-3.0;-lwx_gtk3u_core-3.0;-lwx_gtk3u_adv-3.0 (found version "3.0.5") 
-- Found Libc: /usr/lib/librt.a;/usr/lib/libdl.a;/usr/lib/libm.so  
-- Found PulseAudio: /usr/lib/libpulse.so (found version "15.0.0") 
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0") 
-- EGL found pkg
-- X11_XCB found pkg
-- XCB found pkg
-- XRANDR found pkg
-- AIO found
-- LIBUDEV found pkg
-- SOUNDTOUCH found pkg
-- SAMPLERATE found pkg
-- SDL2 found pkg
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- GTK3 found pkg
-- Found the following HarfBuzz libraries:
--  HarfBuzz (required): /usr/lib/libharfbuzz.so
-- Found HarfBuzz: /usr/include/harfbuzz (found version "4.2.1") 
-- Found Wayland: /usr/lib/libwayland-client.so  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found fmt: 8.1.1
-- Found rapidyaml: 
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
CMake Warning (dev) at /usr/share/cmake/Modules/FindOpenSSL.cmake:103 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "Linux" will no longer be dereferenced when the
  policy is set to NEW.  Since the policy is not set the OLD behavior will be
  used.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindOpenSSL.cmake:464 (_OpenSSL_test_and_find_dependencies)
  3rdparty/libzip/libzip/CMakeLists.txt:49 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenSSL: /usr/lib/libcrypto.so (found version "1.1.1o")  
-- Looking for _close
-- Looking for _close - not found
-- Looking for _dup
-- Looking for _dup - not found
-- Looking for _fdopen
-- Looking for _fdopen - not found
-- Looking for _fileno
-- Looking for _fileno - not found
-- Looking for _setmode
-- Looking for _setmode - not found
-- Looking for _snprintf
-- Looking for _snprintf - not found
-- Looking for _strdup
-- Looking for _strdup - not found
-- Looking for _stricmp
-- Looking for _stricmp - not found
-- Looking for _strtoi64
-- Looking for _strtoi64 - not found
-- Looking for _strtoui64
-- Looking for _strtoui64 - not found
-- Looking for _unlink
-- Looking for _unlink - not found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for clonefile
-- Looking for clonefile - not found
-- Looking for explicit_bzero
-- Looking for explicit_bzero - found
-- Looking for explicit_memset
-- Looking for explicit_memset - not found
-- Looking for fchmod
-- Looking for fchmod - found
-- Looking for fileno
-- Looking for fileno - found
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for ftello
-- Looking for ftello - found
-- Looking for getprogname
-- Looking for getprogname - not found
-- Looking for localtime_r
-- Looking for localtime_r - found
-- Looking for setmode
-- Looking for setmode - not found
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for strdup
-- Looking for strdup - found
-- Looking for stricmp
-- Looking for stricmp - not found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoull
-- Looking for strtoull - found
-- Looking for 3 include files sys/types.h, ..., fts.h
-- Looking for 3 include files sys/types.h, ..., fts.h - found
-- Looking for fts_open
-- Looking for fts_open - found
-- Looking for include file stdbool.h
-- Looking for include file stdbool.h - found
-- Looking for include file strings.h
-- Looking for include file strings.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of __int8
-- Check size of __int8 - failed
-- Check size of int8_t
-- Check size of int8_t - done
-- Check size of uint8_t
-- Check size of uint8_t - done
-- Check size of __int16
-- Check size of __int16 - failed
-- Check size of int16_t
-- Check size of int16_t - done
-- Check size of uint16_t
-- Check size of uint16_t - done
-- Check size of __int32
-- Check size of __int32 - failed
-- Check size of int32_t
-- Check size of int32_t - done
-- Check size of uint32_t
-- Check size of uint32_t - done
-- Check size of __int64
-- Check size of __int64 - failed
-- Check size of int64_t
-- Check size of int64_t - done
-- Check size of uint64_t
-- Check size of uint64_t - done
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- Check size of long long
-- Check size of long long - done
-- Check size of off_t
-- Check size of off_t - done
-- Check size of size_t
-- Check size of size_t - done
-- Performing Test HAVE_FICLONERANGE
-- Performing Test HAVE_FICLONERANGE - Success
-- Performing Test HAVE_NULLABLE
-- Performing Test HAVE_NULLABLE - Failed
-- Found ZLIB: /usr/lib/libz.so (found suitable version "1.2.12", minimum required is "1.1.2") 
-- Found Zstd: $<TARGET_FILE:pcsx2-zstd> (found suitable version "1.5.2", minimum required is "1.3.6") 
-- Found Perl: /usr/bin/perl (found version "5.34.1") 
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Looking for include file pulse/pulseaudio.h
-- Looking for include file pulse/pulseaudio.h - found
-- Looking for include file alsa/asoundlib.h
-- Looking for include file alsa/asoundlib.h - found
-- Looking for include file jack/jack.h
-- Looking for include file jack/jack.h - found
-- Looking for include file sndio.h
-- Looking for include file sndio.h - found
-- Looking for include file aaudio/AAudio.h
-- Looking for include file aaudio/AAudio.h - not found
-- Looking for include file AudioUnit/AudioUnit.h
-- Looking for include file AudioUnit/AudioUnit.h - not found
-- Looking for include file audioclient.h
-- Looking for include file audioclient.h - not found
-- Looking for include files windows.h, mmsystem.h
-- Looking for include files windows.h, mmsystem.h - not found
-- Looking for include file SLES/OpenSLES.h
-- Looking for include file SLES/OpenSLES.h - not found
-- Looking for include file sys/soundcard.h
-- Looking for include file sys/soundcard.h - found
-- Looking for include file android/log.h
-- Looking for include file android/log.h - not found
-- Looking for include file sys/audioio.h
-- Looking for include file sys/audioio.h - not found
-- Looking for include file kai.h
-- Looking for include file kai.h - not found
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.3") found components: doxygen dot 
Using precompiled headers.
-- Found Python: /usr/bin/python3.10 (found version "3.10.4") found components: Interpreter 
-- Configuring done
CMake Warning (dev) at 3rdparty/libzip/libzip/lib/CMakeLists.txt:5 (add_library):
  Policy CMP0069 is not set: INTERPROCEDURAL_OPTIMIZATION is enforced when
  enabled.  Run "cmake --help-policy CMP0069" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  INTERPROCEDURAL_OPTIMIZATION property will be ignored for target 'zip'.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at 3rdparty/libzip/libzip/lib/CMakeLists.txt:5 (add_library):
  Policy CMP0063 is not set: Honor visibility properties for all target
  types.  Run "cmake --help-policy CMP0063" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  Target "zip" of type "STATIC_LIBRARY" has the following visibility
  properties set for C:

    C_VISIBILITY_PRESET

  For compatibility CMake is not honoring them for this target.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at 3rdparty/gtest/googletest/cmake/internal_utils.cmake:152 (add_library):
  Policy CMP0069 is not set: INTERPROCEDURAL_OPTIMIZATION is enforced when
  enabled.  Run "cmake --help-policy CMP0069" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  INTERPROCEDURAL_OPTIMIZATION property will be ignored for target 'gmock'.
Call Stack (most recent call first):
  3rdparty/gtest/googletest/cmake/internal_utils.cmake:209 (cxx_library_with_type)
  3rdparty/gtest/googlemock/CMakeLists.txt:101 (cxx_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at 3rdparty/gtest/googletest/cmake/internal_utils.cmake:152 (add_library):
  Policy CMP0069 is not set: INTERPROCEDURAL_OPTIMIZATION is enforced when
  enabled.  Run "cmake --help-policy CMP0069" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  INTERPROCEDURAL_OPTIMIZATION property will be ignored for target
  'gmock_main'.
Call Stack (most recent call first):
  3rdparty/gtest/googletest/cmake/internal_utils.cmake:209 (cxx_library_with_type)
  3rdparty/gtest/googlemock/CMakeLists.txt:104 (cxx_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at 3rdparty/gtest/googletest/cmake/internal_utils.cmake:152 (add_library):
  Policy CMP0069 is not set: INTERPROCEDURAL_OPTIMIZATION is enforced when
  enabled.  Run "cmake --help-policy CMP0069" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  INTERPROCEDURAL_OPTIMIZATION property will be ignored for target 'gtest'.
Call Stack (most recent call first):
  3rdparty/gtest/googletest/cmake/internal_utils.cmake:209 (cxx_library_with_type)
  3rdparty/gtest/googletest/CMakeLists.txt:131 (cxx_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at 3rdparty/gtest/googletest/cmake/internal_utils.cmake:152 (add_library):
  Policy CMP0069 is not set: INTERPROCEDURAL_OPTIMIZATION is enforced when
  enabled.  Run "cmake --help-policy CMP0069" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  INTERPROCEDURAL_OPTIMIZATION property will be ignored for target
  'gtest_main'.
Call Stack (most recent call first):
  3rdparty/gtest/googletest/cmake/internal_utils.cmake:209 (cxx_library_with_type)
  3rdparty/gtest/googletest/CMakeLists.txt:133 (cxx_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/tomek/.cache/yay/pcsx2-git/src/build
[348/830] Building CXX object common/CMakeFiles/common.dir/Vulkan/vk_mem_alloc.cpp.o
In file included from /home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../common/Vulkan/Loader.h:107,
                 from /home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/Vulkan/vk_mem_alloc.cpp:20:
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h: In member function ‘virtual bool VmaBlockMetadata_Generic::Validate() const’:
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h:7558:40: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
 7558 |             VMA_VALIDATE(subAlloc.size >= VMA_DEBUG_MARGIN);
      |                                        ^
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h:4935:38: note: in definition of macro ‘VMA_VALIDATE’
 4935 | #define VMA_VALIDATE(cond) do { if(!(cond)) { \
      |                                      ^~~~
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h: In member function ‘bool VmaBlockMetadata_Linear::CreateAllocationRequest_UpperAddress(uint32_t, uint32_t, VkDeviceSize, VkDeviceSize, VkDeviceSize, VmaSuballocationType, bool, uint32_t, VmaAllocationRequest*)’:
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h:9433:25: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
 9433 |         if(resultOffset < VMA_DEBUG_MARGIN)
      |                         ^
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h: In member function ‘virtual void VmaBlockMetadata_Linear::Alloc(const VmaAllocationRequest&, VmaSuballocationType, VkDeviceSize, VmaAllocation)’:
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h:9965:38: warning: unused variable ‘suballocations1st’ [-Wunused-variable]
 9965 |             SuballocationVectorType& suballocations1st = AccessSuballocations1st();
      |                                      ^~~~~~~~~~~~~~~~~
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h: In member function ‘VkResult VmaBlockVector::AllocatePage(uint32_t, VkDeviceSize, VkDeviceSize, const VmaAllocationCreateInfo&, VmaSuballocationType, VmaAllocation_T**)’:
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h:11578:34: warning: unused variable ‘res’ [-Wunused-variable]
11578 |                         VkResult res = pBestRequestBlock->WriteMagicValueAroundAllocation(m_hAllocator, bestRequest.offset, size);
      |                                  ^~~
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h: In member function ‘void VmaBlockVector::Free(VmaAllocation)’:
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h:11624:22: warning: unused variable ‘res’ [-Wunused-variable]
11624 |             VkResult res = pBlock->ValidateMagicValueAroundAllocation(m_hAllocator, hAllocation->GetOffset(), hAllocation->GetSize());
      |                      ^~~
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h: In member function ‘VkResult VmaBlockVector::AllocateFromBlock(VmaDeviceMemoryBlock*, uint32_t, VkDeviceSize, VkDeviceSize, VmaAllocationCreateFlags, void*, VmaSuballocationType, uint32_t, VmaAllocation_T**)’:
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h:11781:22: warning: unused variable ‘res’ [-Wunused-variable]
11781 |             VkResult res = pBlock->WriteMagicValueAroundAllocation(m_hAllocator, currRequest.offset, size);
      |                      ^~~
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h: In member function ‘VkResult VmaAllocator_T::AllocateVulkanMemory(const VkMemoryAllocateInfo*, VkDeviceMemory_T**)’:
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include/vk_mem_alloc.h:15674:20: warning: unused variable ‘prevDeviceMemoryCount’ [-Wunused-variable]
15674 |     const uint64_t prevDeviceMemoryCount = deviceMemoryCountIncrement.Increment(&m_DeviceMemoryCount);
      |                    ^~~~~~~~~~~~~~~~~~~~~
[423/830] Building CXX object pcsx2/CMakeFiles/PCSX2.dir/GameDatabase.cpp.o
FAILED: pcsx2/CMakeFiles/PCSX2.dir/GameDatabase.cpp.o 
/usr/bin/c++ -DENABLE_OPENGL -DENABLE_VULKAN -DFMT_LOCALE -DFMT_SHARED -DPCSX2_APP_DATADIR=\"../share/PCSX2\" -DPCSX2_APP_DOCDIR=\"../share/doc/Pcsx2\" -DSDL_BUILD -DSPU2X_CUBEB -DSPU2X_PULSEAUDIO -DVULKAN_USE_WAYLAND=1 -DVULKAN_USE_X11=1 -DWAYLAND_API -DWXUSINGDLL -DX11_API -DXDG_STD -D_ARCH_64=1 -D_FILE_OFFSET_BITS=64 -D_M_X86=1 -D__WXGTK__ -I/home/tomek/.cache/yay/pcsx2-git/src/build/pcsx2/PAD/Linux -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/pcsx2/. -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/pcsx2/x86 -I/home/tomek/.cache/yay/pcsx2-git/src/build/pcsx2 -I/home/tomek/.cache/yay/pcsx2-git/src/build/common/include -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/3rdparty/jpgd -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/3rdparty/xbyak -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/3rdparty/cubeb/cubeb/include -I/home/tomek/.cache/yay/pcsx2-git/src/build/exports -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/3rdparty/glad/include -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/../3rdparty/include -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/common/.. -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/3rdparty/vulkan-headers/include -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/3rdparty/glslang/glslang -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/3rdparty/glslang/include -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/3rdparty/imgui/imgui -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/3rdparty/imgui/include -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/3rdparty/libchdr/libchdr/include -I/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/3rdparty/libzip/libzip/lib -I/home/tomek/.cache/yay/pcsx2-git/src/build/3rdparty/libzip/libzip -isystem /usr/lib/wx/include/gtk3-unicode-3.0 -isystem /usr/include/wx-3.0 -isystem /usr/include/SDL2 -isystem /usr/include/soundtouch -isystem /usr/include/gtk-3.0 -isystem /usr/include/pango-1.0 -isystem /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -isystem /usr/include/sysprof-4 -isystem /usr/include/harfbuzz -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/fribidi -isystem /usr/include/cairo -isystem /usr/include/lzo -isystem /usr/include/pixman-1 -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/cloudproviders -isystem /usr/include/atk-1.0 -isystem /usr/include/at-spi2-atk/2.0 -isystem /usr/include/dbus-1.0 -isystem /usr/lib/dbus-1.0/include -isystem /usr/include/at-spi-2.0 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -pthread -O3 -DNDEBUG -flto -fno-fat-lto-objects -fPIE -march=native -pipe -fvisibility=hidden -pthread -fno-builtin-strcmp -fno-builtin-memcmp -mfpmath=sse -fno-operator-names -Wall -Wextra -Wno-attributes -Wno-unused-function -Wno-unused-parameter -Wno-missing-field-initializers -Wno-deprecated-declarations -Wno-format -Wno-format-security -Wno-overloaded-virtual -Wno-unused-value -Wno-stringop-truncation -Wno-stringop-overflow -Wstrict-aliasing -Wstrict-overflow=1 -fno-strict-aliasing -Wno-parentheses -Wno-missing-braces -Wno-unknown-pragmas -DWX_PRECOMP -Wno-packed-not-aligned -Wno-class-memaccess -D_REENTRANT -Winvalid-pch -include /home/tomek/.cache/yay/pcsx2-git/src/build/pcsx2/CMakeFiles/PCSX2.dir/cmake_pch.hxx -MD -MT pcsx2/CMakeFiles/PCSX2.dir/GameDatabase.cpp.o -MF pcsx2/CMakeFiles/PCSX2.dir/GameDatabase.cpp.o.d -o pcsx2/CMakeFiles/PCSX2.dir/GameDatabase.cpp.o -c /home/tomek/.cache/yay/pcsx2-git/src/pcsx2/pcsx2/GameDatabase.cpp
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/pcsx2/GameDatabase.cpp: In function ‘void GameDatabase::initDatabase()’:
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/pcsx2/GameDatabase.cpp:603:41: error: ‘parse_in_arena’ is not a member of ‘ryml’
  603 |                 ryml::Tree tree = ryml::parse_in_arena(c4::to_csubstr(buf.value()));
      |                                         ^~~~~~~~~~~~~~
[424/830] Building CXX object pcsx2/CMakeFiles/PCSX2.dir/Elfheader.cpp.o
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/pcsx2/Elfheader.cpp: In member function ‘void ElfObject::initElfHeaders(bool)’:
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/pcsx2/Elfheader.cpp:67:56: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘int’ [-Wsign-compare]
   67 |                 if ((header.e_phoff + sizeof(ELF_PHR)) <= data.GetSizeInBytes())
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/tomek/.cache/yay/pcsx2-git/src/pcsx2/pcsx2/Elfheader.cpp:75:56: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘int’ [-Wsign-compare]
   75 |                 if ((header.e_shoff + sizeof(ELF_SHR)) <= data.GetSizeInBytes())
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
[434/830] Building CXX object pcsx2/CMakeFiles/PCSX2.dir/Gif.cpp.o
ninja: build stopped: subcommand failed.
==> ERROR: Error occured in build().
    Aborting...
 -> error building: pcsx2-git

Will someone help?

why dont you use pacman and official repositories:
sudo pacman -S pcsx2

Well, this emu is very often updated. I was wondering what the reason for not building is because I used to use git package for a long time.

This seems to be the reason. Seems like a source issue to me.

Then Sir, any advice how to fix it?