[GH-ISSUE #1195] [Linux] shadPS4 no longer builds #378

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

Originally created by @Shoegzer on GitHub (Oct 2, 2024).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/1195

Builds are failing on the latest commits:

In file included from /home/testing/Desktop/shadps4/shadPS4/externals/glslang/SPIRV/GlslangToSpv.h:41,
                 from /home/testing/Desktop/shadps4/shadPS4/src/video_core/renderer_vulkan/vk_shader_util.cpp:7:
/home/testing/Desktop/shadps4/shadPS4/externals/glslang/SPIRV/Logger.h:40:10: fatal error: glslang/Include/visibility.h: No such file or directory
   40 | #include "glslang/Include/visibility.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

System information:

  • OS: Linux Mint 22 / kernel 6.8
  • CPU: Intel i7-10870H
  • GPU: Nvidia GTX 3070
  • Commit tested: 61f750bdd9
  • Last known good commit: 5e12303b06 (I can bisect if necessary)
  • Full build log: build.log
Originally created by @Shoegzer on GitHub (Oct 2, 2024). Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/1195 Builds are failing on the latest commits: ``` In file included from /home/testing/Desktop/shadps4/shadPS4/externals/glslang/SPIRV/GlslangToSpv.h:41, from /home/testing/Desktop/shadps4/shadPS4/src/video_core/renderer_vulkan/vk_shader_util.cpp:7: /home/testing/Desktop/shadps4/shadPS4/externals/glslang/SPIRV/Logger.h:40:10: fatal error: glslang/Include/visibility.h: No such file or directory 40 | #include "glslang/Include/visibility.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` System information: * OS: Linux Mint 22 / kernel 6.8 * CPU: Intel i7-10870H * GPU: Nvidia GTX 3070 * Commit tested: 61f750bdd96f5e456cc2df1a7a8210a75b7d6bfe * Last known good commit: 5e12303b06c1984a06c2ecbeec6983761c4b0c82 (I can bisect if necessary) * Full build log: [build.log](https://github.com/user-attachments/files/17219547/build.log)
kerem closed this issue 2026-02-27 21:06:00 +03:00
Author
Owner

@rupponi commented on GitHub (Oct 2, 2024):

Could have been a temporary bug, I'm on Mint 22 with kernel 6.8 as well and got a successful automated build on commit 75adf7c just now. Could you try building off of that commit?

<!-- gh-comment-id:2387603482 --> @rupponi commented on GitHub (Oct 2, 2024): Could have been a temporary bug, I'm on Mint 22 with kernel 6.8 as well and got a successful automated build on commit `75adf7c` just now. Could you try building off of that commit?
Author
Owner

@Shoegzer commented on GitHub (Oct 2, 2024):

Thanks, though I just tried again against the most current commit and it still fails, so it's unfortunately not temporary. I also compiled against clang, but this too failed for the same reason.

What are your Qt6 and Vulkan SDK versions, out of curiosity? Clearly there's a difference between your build environment and minme. In any event I'll try to bisect to the problem commit.

<!-- gh-comment-id:2389325540 --> @Shoegzer commented on GitHub (Oct 2, 2024): Thanks, though I just tried again against the most current commit and it still fails, so it's unfortunately not temporary. I also compiled against clang, but this too failed for the same reason. What are your Qt6 and Vulkan SDK versions, out of curiosity? Clearly there's a difference between your build environment and minme. In any event I'll try to bisect to the problem commit.
Author
Owner

@Shoegzer commented on GitHub (Oct 2, 2024):

Update: From the log excerpt above it seems to be complaining that glslang/Include/visibility.h doesn't exist - however I can confirm that it does:

~/Desktop/shadPS4$ ls -la externals/glslang/glslang/Include/visibility.h 
-rw-rw-r-- 1 testing testing 2265 Oct  2 14:11 externals/glslang/glslang/Include/visibility.h

Could this be an upstream issue with glslang (thinking a path problem in logger.h?)

@rupponi This confuses me further how you could get the project to compile, if you haven't tried a clean build with a fresh build directory, can you try that and let me know if it works for you?

<!-- gh-comment-id:2389672802 --> @Shoegzer commented on GitHub (Oct 2, 2024): Update: From the log excerpt above it seems to be complaining that `glslang/Include/visibility.h` doesn't exist - however I can confirm that it does: ``` ~/Desktop/shadPS4$ ls -la externals/glslang/glslang/Include/visibility.h -rw-rw-r-- 1 testing testing 2265 Oct 2 14:11 externals/glslang/glslang/Include/visibility.h ``` Could this be an upstream issue with glslang (thinking a path problem in `logger.h`?) @rupponi This confuses me further how you could get the project to compile, if you haven't tried a clean build with a fresh build directory, can you try that and let me know if it works for you?
Author
Owner

@Shoegzer commented on GitHub (Oct 3, 2024):

Update: Okay it seems there IS an upstream error with glslang. Building will succeed if the following files are modified:

shadPS4/externals/glslang/SPIRV/Logger.h
shadPS4/externals/glslang/SPIRV/GlslangToSpv.h

The files must be modified as follows:

FROM: #include "glslang/Include/visibility.h"
TO: #include "../glslang/Include/visibility.h"

<!-- gh-comment-id:2390473138 --> @Shoegzer commented on GitHub (Oct 3, 2024): Update: Okay it seems there IS an upstream error with glslang. Building will succeed if the following files are modified: ``` shadPS4/externals/glslang/SPIRV/Logger.h shadPS4/externals/glslang/SPIRV/GlslangToSpv.h ``` The files must be modified as follows: FROM: `#include "glslang/Include/visibility.h"` TO: `#include "../glslang/Include/visibility.h"`
Author
Owner

@BigTreezZ commented on GitHub (Oct 3, 2024):

Update: Okay it seems there IS an upstream error with glslang. Building will succeed if the following files are modified:

shadPS4/externals/glslang/SPIRV/Logger.h
shadPS4/externals/glslang/SPIRV/GlslangToSpv.h

The files must be modified as follows:

FROM: #include "glslang/Include/visibility.h" TO: #include "../glslang/Include/visibility.h"

I can confirm this fixes the compiling issue. I am now able to compile successfully on Arch Linux.

<!-- gh-comment-id:2391304974 --> @BigTreezZ commented on GitHub (Oct 3, 2024): > Update: Okay it seems there IS an upstream error with glslang. Building will succeed if the following files are modified: > > ``` > shadPS4/externals/glslang/SPIRV/Logger.h > shadPS4/externals/glslang/SPIRV/GlslangToSpv.h > ``` > > The files must be modified as follows: > > FROM: `#include "glslang/Include/visibility.h"` TO: `#include "../glslang/Include/visibility.h"` I can confirm this fixes the compiling issue. I am now able to compile successfully on Arch Linux.
Author
Owner

@qurious-pixel commented on GitHub (Oct 3, 2024):

It seems the included header directory is failing to include SPIRV. I do not see this failure to build in Ubuntu. There may be a hint in the CMakeLists.txt from the externals folder.

# glslang
if (NOT TARGET glslang::glslang)
    set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "")
    set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "")
    set(ENABLE_SPVREMAPPER OFF CACHE BOOL "")
    set(ENABLE_CTEST OFF CACHE BOOL "")
    set(ENABLE_HLSL OFF CACHE BOOL "")
    set(BUILD_EXTERNAL OFF CACHE BOOL "")
    set(ENABLE_OPT OFF CACHE BOOL "")
    add_subdirectory(glslang)
    file(COPY glslang/SPIRV DESTINATION glslang/glslang FILES_MATCHING PATTERN "*.h")
    target_include_directories(SPIRV INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/glslang")
endif()

shadPS4/externals/glslang/SPIRV/Logger.h will be looking for the file in shadPS4/externals/glslang/glslang/Include/visibility.h

<!-- gh-comment-id:2391755888 --> @qurious-pixel commented on GitHub (Oct 3, 2024): It seems the included header directory is failing to include SPIRV. I do not see this failure to build in Ubuntu. There may be a hint in the CMakeLists.txt from the externals folder. ``` # glslang if (NOT TARGET glslang::glslang) set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "") set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "") set(ENABLE_SPVREMAPPER OFF CACHE BOOL "") set(ENABLE_CTEST OFF CACHE BOOL "") set(ENABLE_HLSL OFF CACHE BOOL "") set(BUILD_EXTERNAL OFF CACHE BOOL "") set(ENABLE_OPT OFF CACHE BOOL "") add_subdirectory(glslang) file(COPY glslang/SPIRV DESTINATION glslang/glslang FILES_MATCHING PATTERN "*.h") target_include_directories(SPIRV INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/glslang") endif() ``` `shadPS4/externals/glslang/SPIRV/Logger.h` will be looking for the file in `shadPS4/externals/glslang/glslang/Include/visibility.h`
Author
Owner

@abouvier commented on GitHub (Oct 3, 2024):

It seems the included header directory is failing to include SPIRV. I do not see this failure to build in Ubuntu. There may be a hint in the CMakeLists.txt from the externals folder.

# glslang
if (NOT TARGET glslang::glslang)
    set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "")
    set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "")
    set(ENABLE_SPVREMAPPER OFF CACHE BOOL "")
    set(ENABLE_CTEST OFF CACHE BOOL "")
    set(ENABLE_HLSL OFF CACHE BOOL "")
    set(BUILD_EXTERNAL OFF CACHE BOOL "")
    set(ENABLE_OPT OFF CACHE BOOL "")
    add_subdirectory(glslang)
    file(COPY glslang/SPIRV DESTINATION glslang/glslang FILES_MATCHING PATTERN "*.h")
    target_include_directories(SPIRV INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/glslang")
endif()

shadPS4/externals/glslang/SPIRV/Logger.h will be looking for the file in shadPS4/externals/glslang/glslang/Include/visibility.h

You can try to add file(COPY glslang/glslang DESTINATION glslang FILES_MATCHING PATTERN "*.h") after add_subdirectory.

<!-- gh-comment-id:2392296395 --> @abouvier commented on GitHub (Oct 3, 2024): > It seems the included header directory is failing to include SPIRV. I do not see this failure to build in Ubuntu. There may be a hint in the CMakeLists.txt from the externals folder. > > ``` > # glslang > if (NOT TARGET glslang::glslang) > set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "") > set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "") > set(ENABLE_SPVREMAPPER OFF CACHE BOOL "") > set(ENABLE_CTEST OFF CACHE BOOL "") > set(ENABLE_HLSL OFF CACHE BOOL "") > set(BUILD_EXTERNAL OFF CACHE BOOL "") > set(ENABLE_OPT OFF CACHE BOOL "") > add_subdirectory(glslang) > file(COPY glslang/SPIRV DESTINATION glslang/glslang FILES_MATCHING PATTERN "*.h") > target_include_directories(SPIRV INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/glslang") > endif() > ``` > > `shadPS4/externals/glslang/SPIRV/Logger.h` will be looking for the file in `shadPS4/externals/glslang/glslang/Include/visibility.h` You can try to add `file(COPY glslang/glslang DESTINATION glslang FILES_MATCHING PATTERN "*.h")` after `add_subdirectory`.
Author
Owner

@Shoegzer commented on GitHub (Oct 5, 2024):

Thanks @abouvier. I tried that but I get the same error unfortunately.

Trying to understand why some builds such as the ones performed here with Linux Mint 22 are failing, while others on Mint or Ubuntu (upstream from Mint) succeed. What is the difference in build environments? The one here is pretty much stock. Are you all building with clean source/build directories?

<!-- gh-comment-id:2395144754 --> @Shoegzer commented on GitHub (Oct 5, 2024): Thanks @abouvier. I tried that but I get the same error unfortunately. Trying to understand why some builds such as the ones performed here with Linux Mint 22 are failing, while others on Mint or Ubuntu (upstream from Mint) succeed. What is the difference in build environments? The one here is pretty much stock. Are you all building with clean source/build directories?
Author
Owner

@maxphilippov commented on GitHub (Oct 5, 2024):

Same happens on Windows/MSYS MinGW64. Unsurprisingly manually fixing paths helps, but @abouvier solution doesn't.

<!-- gh-comment-id:2395175569 --> @maxphilippov commented on GitHub (Oct 5, 2024): Same happens on Windows/MSYS MinGW64. Unsurprisingly manually fixing paths helps, but @abouvier solution doesn't.
Author
Owner

@Legislate9214 commented on GitHub (Oct 9, 2024):

Update: Okay it seems there IS an upstream error with glslang. Building will succeed if the following files are modified:

shadPS4/externals/glslang/SPIRV/Logger.h
shadPS4/externals/glslang/SPIRV/GlslangToSpv.h

The files must be modified as follows:

FROM: #include "glslang/Include/visibility.h" TO: #include "../glslang/Include/visibility.h"

This indeed worked for me on Arch Linux, I managed to compile from source and run the executable in the build directory.

<!-- gh-comment-id:2401053892 --> @Legislate9214 commented on GitHub (Oct 9, 2024): > Update: Okay it seems there IS an upstream error with glslang. Building will succeed if the following files are modified: > > ``` > shadPS4/externals/glslang/SPIRV/Logger.h > shadPS4/externals/glslang/SPIRV/GlslangToSpv.h > ``` > > The files must be modified as follows: > > FROM: `#include "glslang/Include/visibility.h"` TO: `#include "../glslang/Include/visibility.h"` This indeed worked for me on Arch Linux, I managed to compile from source and run the executable in the build directory.
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#378
No description provided.