Skip to content
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

FAILED: glslang/SPIRV/SPIRVd.dll glslang/SPIRV/SPIRVd.lib #874

Closed
oroppas opened this issue Jan 30, 2021 · 2 comments
Closed

FAILED: glslang/SPIRV/SPIRVd.dll glslang/SPIRV/SPIRVd.lib #874

oroppas opened this issue Jan 30, 2021 · 2 comments

Comments

@oroppas
Copy link

oroppas commented Jan 30, 2021

I've got the failure while building on Windows as follows:

cmake ^
-G Ninja ^
-B build ^
-S vulkan-hpp ^
-DBUILD_SHARED_LIBS=ON ^
-DSAMPLES_BUILD=ON ^
-DSAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP=ON ^
-DTESTS_BUILD=ON ^
-DTESTS_BUILD_WITH_LOCAL_VULKAN_HPP=ON ^
-DVULKAN_HPP_RUN_GENERATOR=ON

cmake --build build
cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_dll --intdir=glslang\SPIRV\CMakeFiles\SPIRV.dir --rc=C:\PROGRA~2\WINDOW~4\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WINDOW~4\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~4\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe /nologo glslang\SPIRV\CMakeFiles\SPIRV.dir\GlslangToSpv.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\InReadableOrder.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\Logger.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\SpvBuilder.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\SpvPostProcess.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\doc.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\SpvTools.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\disassemble.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\CInterface\spirv_c_interface.cpp.obj  /out:glslang\SPIRV\SPIRVd.dll /implib:glslang\SPIRV\SPIRVd.lib /pdb:glslang\SPIRV\SPIRVd.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL  glslang\glslang\MachineIndependentd.lib  glslang\OGLCompilersDLL\OGLCompilerd.lib  glslang\glslang\OSDependent\Windows\OSDependentd.lib  glslang\glslang\GenericCodeGend.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
LINK Pass 1: command "C:\PROGRA~2\MICROS~4\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe /nologo glslang\SPIRV\CMakeFiles\SPIRV.dir\GlslangToSpv.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\InReadableOrder.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\Logger.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\SpvBuilder.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\SpvPostProcess.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\doc.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\SpvTools.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\disassemble.cpp.obj glslang\SPIRV\CMakeFiles\SPIRV.dir\CInterface\spirv_c_interface.cpp.obj /out:glslang\SPIRV\SPIRVd.dll /implib:glslang\SPIRV\SPIRVd.lib /pdb:glslang\SPIRV\SPIRVd.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL glslang\glslang\MachineIndependentd.lib glslang\OGLCompilersDLL\OGLCompilerd.lib glslang\glslang\OSDependent\Windows\OSDependentd.lib glslang\glslang\GenericCodeGend.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:glslang\SPIRV\CMakeFiles\SPIRV.dir/intermediate.manifest glslang\SPIRV\CMakeFiles\SPIRV.dir/manifest.res" failed (exit code 1120) with the following output:
   Creating library glslang\SPIRV\SPIRVd.lib and object glslang\SPIRV\SPIRVd.exp
GlslangToSpv.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl glslang::GetKhronosToolId(void)" (__imp_?GetKhronosToolId@glslang@@YAHXZ) referenced in function "public: __cdecl `anonymous namespace'::TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int,class glslang::TIntermediate const *,class spv::SpvBuildLogger *,struct glslang::SpvOptions &)" (??0TGlslangToSpvTraverser@?A0x80b054f8@@QEAA@IPEBVTIntermediate@glslang@@PEAVSpvBuildLogger@spv@@AEAUSpvOptions@3@@Z)
glslang\SPIRV\SPIRVd.dll : fatal error LNK1120: 1 unresolved externals
[2/49] Linking CXX shared library glm\glm\glm_shared.dll
ninja: build stopped: subcommand failed.
@mtavenrath
Copy link
Contributor

The issue you are describing is a glslang issue. It looks like glslang does not export symbols when being built as shared library. I have filed KhronosGroup/glslang#2519. In the meantime BUILD_SHARED_LIBS=OFF is the workaround.

Closing since this is not a direct Vulkan-Hpp issue.

@oroppas
Copy link
Author

oroppas commented Feb 2, 2021

@mtavenrath
Thank you for filing a report for glslang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants