-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[spirv-tools] explicitly deletes DLLs, then aborts when consumed via find_package due to missing DLLs #18612
Comments
Thanks for posting this issue. Could you please help take a look why removing SPIRV-Tools-shared.dll? vcpkg/ports/spirv-tools/portfile.cmake Line 49 in 876e67c
Is there any reason why this port only supports static build? |
I don't think they actually correctly export symbols on windows. I forget the exact reason, however. I think one of vcpkgs lint checks fires if a static library build installs shared libraries, requiring the deletion. If I recall patching the shared build out of the cmakelists was pretty involved as well due to how their cmake is structured. I'll take another look when I have time, maybe things have improved upstream. There's some upstream work in SPIRV-Tools to fix their build options. |
@chrisdjali-wrld3d This issue has been fixed upstream, please update to the latest vcpkg and try building again. :) Successful example:
log:
|
Find the error! |
Describe the bug
The
spirv-tools
package explicitly deletes the output of theSPIRV-Tools-shared
target here: https://github.com/barcharcraz/vcpkg/blob/master/ports/spirv-tools/portfile.cmake#L46-L51The
SPIRV-Tools-shared
target is still created even with-DSPIRV_TOOLS_BUILD_STATIC=ON
(which is set explicitly in the portfile) so the upstream CMake still installs it, and creates a check for its presence in the module importing script.That means if the package is consumed via
find_package
, the check will fail, and aFATAL_ERROR
message is logged. This aborts the build.Environment
To Reproduce
Steps to reproduce the behavior:
./vcpkg install spirv-tools
find_package(SPIRV-Tools REQUIRED)
. ACMakeLists.txt
containing this single line should be enough.Expected behavior
Once
find_package(SPIRV-Tools REQUIRED)
has been called, the configure proceeds and theSPIRV-Tools-static
library is available (also asSPIRV-Tools
with no suffix).Failure logs
find_package
call, so it's got some other warnings about not being a real CMake project: log.logAdditional context
N/A
The text was updated successfully, but these errors were encountered: