[GH-ISSUE #166] Linux compilation errors for gnmdriver & amdgpu #21

Closed
opened 2026-02-27 21:04:10 +03:00 by kerem · 2 comments
Owner

Originally created by @gilcel on GitHub (Jun 6, 2024).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/166

Hi,

FYI: Getting the following errors when trying to compile the latest shadPS4-git source code (3faeba8) on OpenSUSE Tumbleweed (gcc 13.3.0 / clang v18.1.6 / llvm 18.2.2).

shadps4-emu/shadPS4-git/src/video_core/amdgpu/liverpool.h:9,
                 from <edited>/shadPS4-git/src/core/libraries/gnmdriver/gnmdriver.cpp:13:
<edited>/shadPS4-git/src/video_core/amdgpu/resource.h: In member function ‘u32 AmdGpu::Buffer::GetStride() const’:
<edited>/shadPS4-git/src/video_core/amdgpu/resource.h:35:28: error: operands to ‘?:’ have different types ‘unsigned int’ and ‘const BitField<48, 14, long unsigned int>’
   35 |         return stride == 0 ? 1U : stride;
      |                ~~~~~~~~~~~~^~~~~~~~~~~~~
<edited>/shadPS4-git/src/video_core/amdgpu/resource.h:35:28: note:   and each type can be converted to the other
<edited>/shadPS4-git/src/video_core/amdgpu/liverpool.h: In member function ‘AmdGpu::NumberFormat AmdGpu::Liverpool::ColorBuffer::NumFormat() const’:
<edited>/shadPS4-git/src/video_core/amdgpu/liverpool.h:683:70: error: operands to ‘?:’ have different types ‘AmdGpu::NumberFormat’ and ‘const BitField<8, 2, AmdGpu::NumberFormat>’
  683 |             return info.number_type == AmdGpu::NumberFormat::Uscaled ? AmdGpu::NumberFormat::Srgb
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  684 |                                                                      : info.number_type;
      |                                                                      ~~~~~~~~~~~~~~~~~~
<edited>/shadPS4-git/src/video_core/amdgpu/liverpool.h:683:70: note:   and each type can be converted to the other
make[2]: *** [CMakeFiles/shadps4.dir/build.make:510: CMakeFiles/shadps4.dir/src/core/libraries/gnmdriver/gnmdriver.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:494: CMakeFiles/shadps4.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Cheers

Originally created by @gilcel on GitHub (Jun 6, 2024). Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/166 Hi, FYI: Getting the following errors when trying to compile the latest shadPS4-git source code (3faeba8) on OpenSUSE Tumbleweed (gcc 13.3.0 / clang v18.1.6 / llvm 18.2.2). ``` shadps4-emu/shadPS4-git/src/video_core/amdgpu/liverpool.h:9, from <edited>/shadPS4-git/src/core/libraries/gnmdriver/gnmdriver.cpp:13: <edited>/shadPS4-git/src/video_core/amdgpu/resource.h: In member function ‘u32 AmdGpu::Buffer::GetStride() const’: <edited>/shadPS4-git/src/video_core/amdgpu/resource.h:35:28: error: operands to ‘?:’ have different types ‘unsigned int’ and ‘const BitField<48, 14, long unsigned int>’ 35 | return stride == 0 ? 1U : stride; | ~~~~~~~~~~~~^~~~~~~~~~~~~ <edited>/shadPS4-git/src/video_core/amdgpu/resource.h:35:28: note: and each type can be converted to the other <edited>/shadPS4-git/src/video_core/amdgpu/liverpool.h: In member function ‘AmdGpu::NumberFormat AmdGpu::Liverpool::ColorBuffer::NumFormat() const’: <edited>/shadPS4-git/src/video_core/amdgpu/liverpool.h:683:70: error: operands to ‘?:’ have different types ‘AmdGpu::NumberFormat’ and ‘const BitField<8, 2, AmdGpu::NumberFormat>’ 683 | return info.number_type == AmdGpu::NumberFormat::Uscaled ? AmdGpu::NumberFormat::Srgb | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 684 | : info.number_type; | ~~~~~~~~~~~~~~~~~~ <edited>/shadPS4-git/src/video_core/amdgpu/liverpool.h:683:70: note: and each type can be converted to the other make[2]: *** [CMakeFiles/shadps4.dir/build.make:510: CMakeFiles/shadps4.dir/src/core/libraries/gnmdriver/gnmdriver.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:494: CMakeFiles/shadps4.dir/all] Error 2 make: *** [Makefile:156: all] Error 2 ``` Cheers
kerem 2026-02-27 21:04:10 +03:00
  • closed this issue
  • added the
    linux
    label
Author
Owner

@gilcel commented on GitHub (Jun 14, 2024):

Compiles fine now on Linux with commit 31bd502. Thank you very much.

<!-- gh-comment-id:2167903469 --> @gilcel commented on GitHub (Jun 14, 2024): Compiles fine now on Linux with commit 31bd502. Thank you very much.
Author
Owner

@raphaelthegreat commented on GitHub (Jun 15, 2024):

After latest commit linux should now boot games that windows does

<!-- gh-comment-id:2169379565 --> @raphaelthegreat commented on GitHub (Jun 15, 2024): After latest commit linux should now boot games that windows does
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#21
No description provided.