[GH-ISSUE #1042] Fails to build on Arch Linux #318

Closed
opened 2026-02-27 21:05:41 +03:00 by kerem · 7 comments
Owner

Originally created by @elxkot on GitHub (Sep 23, 2024).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/1042

I tried to build master with official instruction and it fails with message:

> /home/elxkot/shadPS4/src/video_core/renderer_vulkan/vk_instance.cpp:314:9: ошибка: designator order for field «vk::PhysicalDeviceVulkan12Features::samplerMirrorClampToEdge» does not match declaration order in «vk::PhysicalDeviceVulkan12Features»
>   314 |         },
>       |         ^
> /home/elxkot/shadPS4/src/video_core/renderer_vulkan/renderer_vulkan.cpp:16:32: предупреждение: неизвестная опция после «#pragma GCC diagnostic» kind [-Wpragmas]
>    16 | #pragma GCC diagnostic ignored "-Wnullability-completeness"
>       |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> make[2]: *** [CMakeFiles/shadps4.dir/build.make:2442: CMakeFiles/shadps4.dir/src/video_core/renderer_vulkan/vk_instance.cpp.o] Ошибка 1
> make[2]: *** Ожидание завершения заданий…
> make[1]: *** [CMakeFiles/Makefile2:422: CMakeFiles/shadps4.dir/all] Ошибка 2
> make: *** [Makefile:156: all] Ошибка 2 

Fixed it by reordering fields in structure that was mentioned in error corresponding to official Vulkan specification:
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceVulkan12Features.html

(I don't realy know what i'm doing, but now it compiles and launches)

I'm using intel Xeon E5-1650 CPU (6-core Sandy Bridge)
AMD RX580 4GB
16 GB RAM
Kernel: 6.10.10-zen1-1-zen
Mesa Version: 24.2.3

Originally created by @elxkot on GitHub (Sep 23, 2024). Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/1042 I tried to build master with official instruction and it fails with message: ``` > /home/elxkot/shadPS4/src/video_core/renderer_vulkan/vk_instance.cpp:314:9: ошибка: designator order for field «vk::PhysicalDeviceVulkan12Features::samplerMirrorClampToEdge» does not match declaration order in «vk::PhysicalDeviceVulkan12Features» > 314 | }, > | ^ > /home/elxkot/shadPS4/src/video_core/renderer_vulkan/renderer_vulkan.cpp:16:32: предупреждение: неизвестная опция после «#pragma GCC diagnostic» kind [-Wpragmas] > 16 | #pragma GCC diagnostic ignored "-Wnullability-completeness" > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > make[2]: *** [CMakeFiles/shadps4.dir/build.make:2442: CMakeFiles/shadps4.dir/src/video_core/renderer_vulkan/vk_instance.cpp.o] Ошибка 1 > make[2]: *** Ожидание завершения заданий… > make[1]: *** [CMakeFiles/Makefile2:422: CMakeFiles/shadps4.dir/all] Ошибка 2 > make: *** [Makefile:156: all] Ошибка 2 ``` Fixed it by reordering fields in structure that was mentioned in error corresponding to official Vulkan specification: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceVulkan12Features.html (I don't realy know what i'm doing, but now it compiles and launches) I'm using intel Xeon E5-1650 CPU (6-core Sandy Bridge) AMD RX580 4GB 16 GB RAM Kernel: 6.10.10-zen1-1-zen Mesa Version: 24.2.3
kerem closed this issue 2026-02-27 21:05:41 +03:00
Author
Owner

@Ein420 commented on GitHub (Sep 23, 2024):

having the same/similar issue:

[ 97%] Building CXX object CMakeFiles/shadps4.dir/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp.o
/home/ein/Downloads/shadPS4/src/video_core/renderer_vulkan/vk_common.cpp:9:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
    9 | #pragma GCC diagnostic ignored "-Wnullability-completeness"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ein/Downloads/shadPS4/src/video_core/buffer_cache/buffer.cpp:13:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   13 | #pragma GCC diagnostic ignored "-Wnullability-completeness"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 97%] Building CXX object CMakeFiles/shadps4.dir/src/video_core/renderer_vulkan/vk_pipeline_common.cpp.o
[ 97%] Building CXX object CMakeFiles/shadps4.dir/src/video_core/renderer_vulkan/vk_platform.cpp.o
/home/ein/Downloads/shadPS4/src/video_core/renderer_vulkan/vk_instance.cpp:18:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   18 | #pragma GCC diagnostic ignored "-Wnullability-completeness"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ein/Downloads/shadPS4/src/video_core/renderer_vulkan/vk_instance.cpp: In member function ‘bool Vulkan::Instance::CreateDevice()’:
/home/ein/Downloads/shadPS4/src/video_core/renderer_vulkan/vk_instance.cpp:314:9: error: designator order for field ‘vk::PhysicalDeviceVulkan12Features::samplerMirrorClampToEdge’ does not match declaration order in ‘vk::PhysicalDeviceVulkan12Features’
  314 |         },
      |         ^
/home/ein/Downloads/shadPS4/src/video_core/renderer_vulkan/renderer_vulkan.cpp:16:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   16 | #pragma GCC diagnostic ignored "-Wnullability-completeness"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/shadps4.dir/build.make:2865: CMakeFiles/shadps4.dir/src/video_core/renderer_vulkan/vk_instance.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:275: CMakeFiles/shadps4.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Ryzen 5 4600G
RX 6600
16 GB RAM
Kernel 6.10.9-arch1-2
Mesa: 24.3.0

Not exactly sure what that solution is/what to do exactly, but I assume it's to do with editing a specific part of the makefile to resemble what you linked (?)

<!-- gh-comment-id:2369042561 --> @Ein420 commented on GitHub (Sep 23, 2024): having the same/similar issue: ``` [ 97%] Building CXX object CMakeFiles/shadps4.dir/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp.o /home/ein/Downloads/shadPS4/src/video_core/renderer_vulkan/vk_common.cpp:9:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas] 9 | #pragma GCC diagnostic ignored "-Wnullability-completeness" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/ein/Downloads/shadPS4/src/video_core/buffer_cache/buffer.cpp:13:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas] 13 | #pragma GCC diagnostic ignored "-Wnullability-completeness" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 97%] Building CXX object CMakeFiles/shadps4.dir/src/video_core/renderer_vulkan/vk_pipeline_common.cpp.o [ 97%] Building CXX object CMakeFiles/shadps4.dir/src/video_core/renderer_vulkan/vk_platform.cpp.o /home/ein/Downloads/shadPS4/src/video_core/renderer_vulkan/vk_instance.cpp:18:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas] 18 | #pragma GCC diagnostic ignored "-Wnullability-completeness" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/ein/Downloads/shadPS4/src/video_core/renderer_vulkan/vk_instance.cpp: In member function ‘bool Vulkan::Instance::CreateDevice()’: /home/ein/Downloads/shadPS4/src/video_core/renderer_vulkan/vk_instance.cpp:314:9: error: designator order for field ‘vk::PhysicalDeviceVulkan12Features::samplerMirrorClampToEdge’ does not match declaration order in ‘vk::PhysicalDeviceVulkan12Features’ 314 | }, | ^ /home/ein/Downloads/shadPS4/src/video_core/renderer_vulkan/renderer_vulkan.cpp:16:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas] 16 | #pragma GCC diagnostic ignored "-Wnullability-completeness" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[2]: *** [CMakeFiles/shadps4.dir/build.make:2865: CMakeFiles/shadps4.dir/src/video_core/renderer_vulkan/vk_instance.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:275: CMakeFiles/shadps4.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 ``` Ryzen 5 4600G RX 6600 16 GB RAM Kernel 6.10.9-arch1-2 Mesa: 24.3.0 Not exactly sure what that solution is/what to do exactly, but I assume it's to do with editing a specific part of the makefile to resemble what you linked (?)
Author
Owner

@elxkot commented on GitHub (Sep 23, 2024):

Not exactly sure what that solution is/what to do exactly, but I assume it's to do with editing a specific part of the makefile to resemble what you linked (?)

I edited file ~/shadPS4/src/video_core/renderer_vulkan/vk_instance.cpp
Replaced code at line 306 from:

vk::PhysicalDeviceVulkan12Features{
            .shaderFloat16 = vk12_features.shaderFloat16,
            .scalarBlockLayout = vk12_features.scalarBlockLayout,
            .uniformBufferStandardLayout = vk12_features.uniformBufferStandardLayout,
            .separateDepthStencilLayouts = vk12_features.separateDepthStencilLayouts,
            .hostQueryReset = vk12_features.hostQueryReset,
            .timelineSemaphore = vk12_features.timelineSemaphore,
            .samplerMirrorClampToEdge = vk12_features.samplerMirrorClampToEdge,
        },

To:

vk::PhysicalDeviceVulkan12Features{
            .samplerMirrorClampToEdge = vk12_features.samplerMirrorClampToEdge,
            .shaderFloat16 = vk12_features.shaderFloat16,
            .scalarBlockLayout = vk12_features.scalarBlockLayout,
            .uniformBufferStandardLayout = vk12_features.uniformBufferStandardLayout,
            .separateDepthStencilLayouts = vk12_features.separateDepthStencilLayouts,
            .hostQueryReset = vk12_features.hostQueryReset,
            .timelineSemaphore = vk12_features.timelineSemaphore,
        },

PS: It compiled, but BB crashes right after launch with some errors in log about unsupported instructions though. Sad. Apparently my CPU is too old :(

<!-- gh-comment-id:2369084219 --> @elxkot commented on GitHub (Sep 23, 2024): > Not exactly sure what that solution is/what to do exactly, but I assume it's to do with editing a specific part of the makefile to resemble what you linked (?) I edited file ~/shadPS4/src/video_core/renderer_vulkan/vk_instance.cpp Replaced code at line 306 from: ``` vk::PhysicalDeviceVulkan12Features{ .shaderFloat16 = vk12_features.shaderFloat16, .scalarBlockLayout = vk12_features.scalarBlockLayout, .uniformBufferStandardLayout = vk12_features.uniformBufferStandardLayout, .separateDepthStencilLayouts = vk12_features.separateDepthStencilLayouts, .hostQueryReset = vk12_features.hostQueryReset, .timelineSemaphore = vk12_features.timelineSemaphore, .samplerMirrorClampToEdge = vk12_features.samplerMirrorClampToEdge, }, ``` To: ``` vk::PhysicalDeviceVulkan12Features{ .samplerMirrorClampToEdge = vk12_features.samplerMirrorClampToEdge, .shaderFloat16 = vk12_features.shaderFloat16, .scalarBlockLayout = vk12_features.scalarBlockLayout, .uniformBufferStandardLayout = vk12_features.uniformBufferStandardLayout, .separateDepthStencilLayouts = vk12_features.separateDepthStencilLayouts, .hostQueryReset = vk12_features.hostQueryReset, .timelineSemaphore = vk12_features.timelineSemaphore, }, ``` PS: It compiled, but BB crashes right after launch with some errors in log about unsupported instructions though. Sad. Apparently my CPU is too old :(
Author
Owner

@Ein420 commented on GitHub (Sep 23, 2024):

Did exactly as you said, it compiles successfully.
Thx

<!-- gh-comment-id:2369135166 --> @Ein420 commented on GitHub (Sep 23, 2024): Did exactly as you said, it compiles successfully. Thx
Author
Owner

@ngoquang2708 commented on GitHub (Sep 24, 2024):

This PR fix this https://github.com/shadps4-emu/shadPS4/pull/1039.

<!-- gh-comment-id:2370037252 --> @ngoquang2708 commented on GitHub (Sep 24, 2024): This PR fix this https://github.com/shadps4-emu/shadPS4/pull/1039.
Author
Owner

@OFFTKP commented on GitHub (Sep 24, 2024):

PR was merged, see if it fixes your problem

<!-- gh-comment-id:2371475388 --> @OFFTKP commented on GitHub (Sep 24, 2024): PR was merged, see if it fixes your problem
Author
Owner

@elxkot commented on GitHub (Sep 24, 2024):

Now it compiles without manual changes

<!-- gh-comment-id:2371755574 --> @elxkot commented on GitHub (Sep 24, 2024): Now it compiles without manual changes
Author
Owner

@Ein420 commented on GitHub (Sep 24, 2024):

ig this can be closed now, it builds.

<!-- gh-comment-id:2371952617 --> @Ein420 commented on GitHub (Sep 24, 2024): ig this can be closed now, it builds.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#318
No description provided.