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

can not link the spirv-tools #121

Open
ahzahzahz opened this issue Dec 5, 2024 · 5 comments
Open

can not link the spirv-tools #121

ahzahzahz opened this issue Dec 5, 2024 · 5 comments

Comments

@ahzahzahz
Copy link

Generating 64-bit Glslang Release CMake files for Visual Studio 17 0 -DCMAKE_INSTALL_PREFIX=install ..
CMake Warning (dev) at CMakeLists.txt:34 (project):
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19044.
CMake Deprecation Warning at CMakeLists.txt:39 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- Using Debug VC++ CRT: MDd
-- Using Release VC++ CRT: MD
-- Using MinSizeRel VC++ CRT: MD
-- Using RelWithDebInfo VC++ CRT: MD
-- Using Release VC++ CRT: MD
CMake Warning (dev) at CMakeLists.txt:233 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
CMakeLists.txt:239 (find_host_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Google Mock was not found - tests based on that will not build
-- spirv-tools not linked - illegal SPIRV may be generated for HLSL
-- Configuring done (1.3s)
-- Generating done (0.1s)

@ahzahzahz
Copy link
Author

when build shaderc, it will use spirv-tools

Updating "E:\demo\git\vk_video_samples\vk_video_decoder\external"\shaderc
HEAD is now at 3fe94c6 Complete moving io.* to io_shaderc.*
E:\demo\git\vk_video_samples\vk_v... @ 2ec8f8738118cc483b67c04a759fee53496c5659
E:\demo\git\vk_video_samples\vk_v... @ a3fdfe81465d57efc97cfd28ac6c8190fb31a6c8
E:\demo\git\vk_video_samples\vk_v... @ 389cb68b87193358358ae87cc56d257fd0d80189
E:\demo\git\vk_video_samples\vk_v... @ 7107ebc4fbf7205151d8d2a57b2fc6e7853125d4
E:\demo\git\vk_video_samples\vk_v... @ ef3290bbea35935ba8fd623970511ed9f045bbd7
E:\demo\git\vk_video_samples\vk_v... @ e56beaee736863ce48455955158f1839e6e4c1a1

Building "E:\demo\git\vk_video_samples\vk_video_decoder\external"\shaderc
Making 64-bit shaderc Debug
CMake Deprecation Warning at CMakeLists.txt:15 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19044.
-- Shaderc: build type is "Debug".
-- Configuring Shaderc to avoid building tests.
-- Configuring Shaderc to build examples.
-- asciidoctor was not found - no documentation will be generated
CMake Warning (dev) at cmake/setup_build.cmake:52 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
CMakeLists.txt:58 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/setup_build.cmake:17 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
CMakeLists.txt:83 (find_host_package)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at third_party/CMakeLists.txt:62 (message):
SPIRV-Tools was not found - required for compilation

@zlatinski
Copy link
Contributor

Can you please try reverting 75a9ddd and try to fetch?

@nathalie-raffray
Copy link

i have the same issue and fetching and reverting 75a9ddd did not fix it

@nathalie-raffray
Copy link

What fixed this particular issue for me was going in update_externals_sources.bat and changing:

-DSHADERC_SPIRV_TOOLS_DIR=%GLSLANG_DIR%\External\spirv-tools 
-DSHADERC_SPIRV_HEADERS_DIR=%GLSLANG_DIR%\External\spirv-tools\external\spirv-headers

to

-DSHADERC_SPIRV_TOOLS_DIR=%SHADERC_DIR%\third_party\spirv-tools 
-DSHADERC_SPIRV_HEADERS_DIR=%SHADERC_DIR%\third_party\spirv-headers

in :build_shaderc

@nathalie-raffray
Copy link

but then my build generates this error so idk

C:\3dverse\github\vk_video_samples\vk_video_decoder\build>cmake --build . --parallel 16 --config Release
MSBuild version 17.9.8+b34f75857 for .NET Framework

  1>Checking Build System
  Building Custom Rule C:/3dverse/github/vk_video_samples/vk_video_decoder/libs/NvVideoParser/CMakeLists.txt
  Building Custom Rule C:/3dverse/github/vk_video_samples/vk_video_decoder/libs/NvVideoParser/CMakeLists.txt
  Building Custom Rule C:/3dverse/github/vk_video_samples/vk_video_decoder/libs/NvVideoParser/CMakeLists.txt
  Building Custom Rule C:/3dverse/github/vk_video_samples/vk_video_decoder/libs/NvVideoParser/CMakeLists.txt
  NextStartCodeAVX512.cpp
  NextStartCodeC.cpp
  NextStartCodeAVX2.cpp
  next_start_code_c.vcxproj -> C:\3dverse\github\vk_video_samples\vk_video_decoder\build\libs\NvVideoParser\next_start_code_c.dir\Release\next_start_code_c.lib
  next_start_code_avx512.vcxproj -> C:\3dverse\github\vk_video_samples\vk_video_decoder\build\libs\NvVideoParser\next_start_code_avx512.dir\Release\next_start_code_avx512.lib
  next_start_code_avx2.vcxproj -> C:\3dverse\github\vk_video_samples\vk_video_decoder\build\libs\NvVideoParser\next_start_code_avx2.dir\Release\next_start_code_avx2.lib
cl : command line  warning D9002: ignoring unknown option '/arch:SSE2' [C:\3dverse\github\vk_video_samples\vk_video_decoder\build\libs\NvVideoParser\next_start_code_ssse3.vcxproj
]
  NextStartCodeSSSE3.cpp
  next_start_code_ssse3.vcxproj -> C:\3dverse\github\vk_video_samples\vk_video_decoder\build\libs\NvVideoParser\next_start_code_ssse3.dir\Release\next_start_code_ssse3.lib
  Building Custom Rule C:/3dverse/github/vk_video_samples/vk_video_decoder/libs/NvVideoParser/CMakeLists.txt
  Generating spirv_tools_commit_id.h
  Traceback (most recent call last):
    File "C:\3dverse\github\vk_video_samples\scripts\external_revision_generator.py", line 100, in main
      commit_id = get_commit_id_from_git('git', args.git_dir)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\3dverse\github\vk_video_samples\scripts\external_revision_generator.py", line 67, in get_commit_id_from_git
      return subprocess.check_output([git_binary, "rev-parse", "HEAD"], cwd=source_dir).decode('utf-8').strip()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\natha\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 466, in check_output
  VulkanH264Parser.cpp
  Building Custom Rule C:/3dverse/github/vk_video_samples/vk_video_decoder/libs/NvVideoParser/CMakeLists.txt
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\natha\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 548, in run
      with Popen(*popenargs, **kwargs) as process:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\natha\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "C:\Users\natha\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1538, in _execute_child
      hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  NotADirectoryError: [WinError 267] The directory name is invalid

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "C:\3dverse\github\vk_video_samples\scripts\external_revision_generator.py", line 114, in <module>
      main()
    File "C:\3dverse\github\vk_video_samples\scripts\external_revision_generator.py", line 103, in main
      commit_id = get_commit_id_from_git('git.bat', args.git_dir)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\3dverse\github\vk_video_samples\scripts\external_revision_generator.py", line 67, in get_commit_id_from_git
      return subprocess.check_output([git_binary, "rev-parse", "HEAD"], cwd=source_dir).decode('utf-8').strip()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\natha\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 466, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\natha\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 548, in run
      with Popen(*popenargs, **kwargs) as process:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\natha\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "C:\Users\natha\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1538, in _execute_child
      hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  FileNotFoundError: [WinError 2] The system cannot find the file specified
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\3dverse\github\vk_video_
samples\vk_video_decoder\build\CMakeFiles\f90322cd44ddd286f60982d4cfd5ff5d\spirv_tools_commit_id.h.rule;C:\3dverse\github\vk_video_samples\vk_video_decoder\build\CMakeFiles\f9032
2cd44ddd286f60982d4cfd5ff5d\vk_dispatch_table_helper.h.rule;C:\3dverse\github\vk_video_samples\vk_video_decoder\build\CMakeFiles\f90322cd44ddd286f60982d4cfd5ff5d\vk_enum_string_h
elper.h.rule;C:\3dverse\github\vk_video_samples\vk_video_decoder\build\CMakeFiles\f90322cd44ddd286f60982d4cfd5ff5d\vk_extension_helper.h.rule;C:\3dverse\github\vk_video_samples\v
k_video_decoder\build\CMakeFiles\f90322cd44ddd286f60982d4cfd5ff5d\vk_layer_dispatch_table.h.rule;C:\3dverse\github\vk_video_samples\vk_video_decoder\build\CMakeFiles\f90322cd44dd
d286f60982d4cfd5ff5d\vk_object_types.h.rule;C:\3dverse\github\vk_video_samples\vk_video_decoder\build\CMakeFiles\f90322cd44ddd286f60982d4cfd5ff5d\vk_safe_struct.cpp.rule;C:\3dver
se\github\vk_video_samples\vk_video_decoder\build\CMakeFiles\f90322cd44ddd286f60982d4cfd5ff5d\vk_safe_struct.h.rule;C:\3dverse\github\vk_video_samples\vk_video_decoder\build\CMak
eFiles\f90322cd44ddd286f60982d4cfd5ff5d\vk_typemap_helper.h.rule;C:\3dverse\github\vk_video_samples\vk_video_decoder\build\CMakeFiles\01c5cf1f3fc14886731635c20028dcbe\generate_he
lper_files.rule;C:\3dverse\github\vk_video_samples\vk_video_decoder\CMakeLists.txt' exited with code 1. [C:\3dverse\github\vk_video_samples\vk_video_decoder\build\generate_helper
_files.vcxproj]
  VulkanH264Parser.cpp
  VulkanH265Parser.cpp
  VulkanH265Parser.cpp
  VulkanAV1Decoder.cpp
  VulkanAV1Decoder.cpp
  VulkanVP9Decoder.cpp
  VulkanVP9Decoder.cpp
  VulkanAV1GlobalMotionDec.cpp
  VulkanAV1GlobalMotionDec.cpp
  VulkanVideoDecoder.cpp
  VulkanVideoDecoder.cpp
  nvVulkanh264ScalingList.cpp
  nvVulkanh264ScalingList.cpp
  cpudetect.cpp
  cpudetect.cpp
  Generating Code...
  Generating Code...
  nvidia-vkvideo-parser-static.vcxproj -> C:\3dverse\github\vk_video_samples\vk_video_decoder\build\libs\NvVideoParser\Release\nvidia-vkvideo-parser-static.lib
     Creating library C:/3dverse/github/vk_video_samples/vk_video_decoder/build/libs/NvVideoParser/Release/nvidia-vkvideo-parser.lib and object C:/3dverse/github/vk_video_samples
  /vk_video_decoder/build/libs/NvVideoParser/Release/nvidia-vkvideo-parser.exp
  nvidia-vkvideo-parser.vcxproj -> C:\3dverse\github\vk_video_samples\vk_video_decoder\build\libs\NvVideoParser\Release\nvidia-vkvideo-parser.dll

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

3 participants