KomputeProject / kompute

General purpose GPU compute framework built on Vulkan to support 1000s of cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends). Blazing fast, mobile-enabled, asynchronous and optimized for advanced GPU data processing usecases. Backed by the Linux Foundation.
http://kompute.cc/
Apache License 2.0
1.94k stars 146 forks source link

windows building error #321

Closed fzStella closed 10 months ago

fzStella commented 1 year ago

I build kcompute 0.8.1 using cmake(GUI) on Windows, but an error occurred. Steps to reproduce

  $ git clone --branch v0.8.1 --recursive https://github.com/KomputeProject/kompute
  $ cd kompute/examples/array_multiplication/
  $ cmake -Bbuild/ -DCMAKE_BUILD_TYPE=Debug -DKOMPUTE_OPT_INSTALL=0 -DKOMPUTE_OPT_REPO_SUBMODULE_BUILD=1 -DKOMPUTE_OPT_ENABLE_SPDLOG=1

Until now, there's no problem(maybe). Then I open Visual studio 2017, and open komute array mult.sln, try to run Main.cpp, then get some error.It tell me it can't find the file "ALL_ BUILD" in the "C:\kompute\examples\array_multiplication\build" I don't know what steps are missing or what steps are wrong (Solution configuration is "release Win32")

fzStella commented 1 year ago
- C:\VS\example\kompute\examples\array_multiplication>cmake -Bbuild/ -DCMAKE_BUILD_TYPE=Debug -DKOMPUTE_OPT_INSTALL=0 -DKOMPUTE_OPT_REPO_SUBMODULE_BUILD=1 -DKOMPUTE_OPT_ENABLE_SPDLOG=1
-- Building for: Visual Studio 15 2017
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.16.27048.0
-- The CXX compiler identification is MSVC 19.16.27048.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Vulkan: C:/VulkanSDK/1.3.236.0/Lib32/vulkan-1.lib (found version "1.3.236")  missing components: glslc glslangValidator
-- Version: 7.1.3
-- Build type: Debug
-- CXX_STANDARD: 14
-- Performing Test has_std_14_flag
-- Performing Test has_std_14_flag - Success
-- Performing Test has_std_1y_flag
-- Performing Test has_std_1y_flag - Success
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
-- Required features: cxx_variadic_templates
-- Looking for _strtod_l
-- Looking for _strtod_l - found
-- Build spdlog: 1.8.1
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Build type: Debug
-- Configuring done
-- Generating done
-- Build files have been written to: C:/VS/example/kompute/examples/array_multiplication/build

This is the cmake content. I found that the wrong content is the same as this #261 . image

ToKiNoBug commented 10 months ago

This is a bug caused by cmake and VS. ALL_BUILD is a "virtual" target to build all targets, it't not runnable. You need to select another target in VS.

ToKiNoBug commented 10 months ago

I think this issue can be closed because it has nothing to do with kompute. You can draw an issue to cmake, or report it as a bug to VS, or simply select another target, or use another generator like ninja.