mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 16:25:58 +03:00
[GH-ISSUE #1733] _add_library cannot create ALIAS target "SPIRV-Headers::SPIRV-Headers" #599
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#599
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nicovil on GitHub (Dec 10, 2024).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/1733
I use to compile ShadPS4 with Visual Studio 2022 and CMake and everything worked well until one of the last updates.
I'm getting this error when processing the CMakeFile.txt:
When I debug the makefile I located that this issue is being triggered when adding subdirectory:
add_subdirectory(sirit)Is there any special flag that must be added to use sirit module?
I noticed sirit makefile has a flag named SIRIT_USE_SYSTEM_SPIRV_HEADERS that defines if SPIRV-Headers are added or not, should I set this flag?
Thanks!
@Hermiten commented on GitHub (Dec 11, 2024):
Maybe for you @abouvier ?
@abouvier commented on GitHub (Dec 12, 2024):
Did you install
spirv-headersviavcpkg? Anyway, you should post the full CMake output.And yes, using
SIRIT_USE_SYSTEM_SPIRV_HEADERSwill probably solve your problem, because headers were found somewhere on your system.@nicovil commented on GitHub (Dec 12, 2024):
Hi abouvier,
spirv-headers external sub module is located under externals/sirit/externals/spirv-headers by git when submodules are installed recursively during checkout under externals folder as usual.
What I copied in my first message was the CMake error I catched in a CMake debug session, now I attached the full CMake output (without debugging) that if you check doesn't have any reference to sirit:
cmake_output.txt
I tried adding adding SIRIT_USE_SYSTEM_SPIRV_HEADERS flag and recreated CMake cache and now it doesn't founds the required cmake files for spirv-headers-config, this is the error:
So I figured out that sirit/externals/spirv-headers has not been built/installed by cmake, then I went to that folder and did it manually:
cmake --build . --target install --config ReleaseAnd together with SIRIT_USE_SYSTEM_SPIRV_HEADERS flag ShadPS4 compiled flawlessly. However this needs the extra step of manual build for spirv-headers and install to program files in windows to work (I guess it's the same for bin folder in linux).
I guess there is some missing step in makelists to allow SPIRV-Headers to be used without installing? or it's a pre-requisite and it was not documented yet in "build instructions" ?
@abouvier commented on GitHub (Dec 13, 2024):
This will be fixed by https://github.com/shadps4-emu/sirit/pull/5.
But I don't know why it didn't affect everyone but just you :$
@nicovil commented on GitHub (Dec 13, 2024):
That's a good question, I guess people workarounded the issue and didn't reported it.
Thanks you very much for your help, looking forward for your pull request to be added to main!
@nicovil commented on GitHub (Dec 13, 2024):
FYI, I uninstalled SPIRV-HEADERS from my system, restored original siri submodule with GIT and added manually the modifications you made in your pull request to siri makelist and now the build works like a charm.
@polybiusproxy commented on GitHub (Dec 13, 2024):
I have gotten this as well, I just resolved it by removing vcpkg, I was not using it anyways.
@abouvier commented on GitHub (Dec 14, 2024):
It's because you use vcpkg and there is something related to cmake_policy in
vcpkg/scripts/buildsystems/vcpkg.cmakethat activate this error.