microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.4k stars 6.47k forks source link

[darknet] Build error on x64-windows #41933

Open whynotAC opened 4 weeks ago

whynotAC commented 4 weeks ago

Package: darknet[core,cuda,opencv-cuda]:x64-windows@2022-03-06#4

Host Environment

To Reproduce

vcpkg install darknet[opencv-cuda]

Failure logs

-- Using cached AlexeyAB-darknet-8a0bf84c19e38214219dbd3345f04ce778426c57.tar.gz.
-- Cleaning sources at E:/github/vcpkg/buildtrees/darknet/src/e778426c57-96aa9384e0.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source E:/github/vcpkg/downloads/AlexeyAB-darknet-8a0bf84c19e38214219dbd3345f04ce778426c57.tar.gz
-- Applying patch fix-dependence-getopt.patch
-- Using source at E:/github/vcpkg/buildtrees/darknet/src/e778426c57-96aa9384e0.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: E:/github/vcpkg/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-i386/bin/cmake.exe E:/github/vcpkg/buildtrees/darknet/src/e778426c57-96aa9384e0.clean -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=E:/github/vcpkg/packages/darknet_x64-windows/debug -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DENABLE_CUDA=ON -DENABLE_CUDNN=OFF -DINSTALL_BIN_DIR:STRING=bin -DINSTALL_LIB_DIR:STRING=lib -DENABLE_OPENCV:BOOL=TRUE "-DCMAKE_MAKE_PROGRAM=D:/program files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -DBUILD_SHARED_LIBS=ON -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=E:/github/vcpkg/scripts/toolchains/windows.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DVCPKG_SET_CHARSET_FLAG=ON -DVCPKG_PLATFORM_TOOLSET=v143 -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE -DCMAKE_VERBOSE_MAKEFILE=ON -DVCPKG_APPLOCAL_DEPS=OFF -DCMAKE_TOOLCHAIN_FILE=E:/github/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON -DVCPKG_CXX_FLAGS= -DVCPKG_CXX_FLAGS_RELEASE= -DVCPKG_CXX_FLAGS_DEBUG= -DVCPKG_C_FLAGS= -DVCPKG_C_FLAGS_RELEASE= -DVCPKG_C_FLAGS_DEBUG= -DVCPKG_CRT_LINKAGE=dynamic -DVCPKG_LINKER_FLAGS= -DVCPKG_LINKER_FLAGS_RELEASE= -DVCPKG_LINKER_FLAGS_DEBUG= -DVCPKG_TARGET_ARCHITECTURE=x64 -DCMAKE_INSTALL_LIBDIR:STRING=lib -DCMAKE_INSTALL_BINDIR:STRING=bin -D_VCPKG_ROOT_DIR=E:/github/vcpkg -D_VCPKG_INSTALLED_DIR=E:/github/vcpkg/installed -DVCPKG_MANIFEST_INSTALL=OFF
    Working Directory: E:/github/vcpkg/buildtrees/darknet/x64-windows-dbg
    Error code: 1
    See logs for more information:
      E:\github\vcpkg\buildtrees\darknet\config-x64-windows-dbg-CMakeCache.txt.log
      E:\github\vcpkg\buildtrees\darknet\config-x64-windows-dbg-out.log
      E:\github\vcpkg\buildtrees\darknet\config-x64-windows-dbg-err.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:267 (vcpkg_execute_required_process)
  ports/darknet/portfile.cmake:34 (vcpkg_cmake_configure)
  scripts/ports.cmake:192 (include)
E:\github\vcpkg\buildtrees\darknet\config-x64-windows-dbg-err.log ``` Darknet_VERSION: 0.2.5.4 CMake Error at CMakeLists.txt:154 (message): CUDA not found, please build explicitly with -DENABLE_CUDA=OFF if you do not want CUDA. ```
E:\github\vcpkg\buildtrees\darknet\config-x64-windows-dbg-out.log ``` -- Using toolchain: E:/github/vcpkg/scripts/buildsystems/vcpkg.cmake -- Toolchain uses VCPKG integration -- VCPKG_MANIFEST_FEATURES: cuda;opencv-cuda -- The C compiler identification is MSVC 19.41.34123.0 -- The CXX compiler identification is MSVC 19.41.34123.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: D:/program files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/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: D:/program files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for a CUDA compiler -- Looking for a CUDA compiler - NOTFOUND -- CUDA_PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 -- CUDACXX: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8/bin/nvcc.exe -- Configuring incomplete, errors occurred! ```
E:\github\vcpkg\buildtrees\darknet\config-x64-windows-dbg-CMakeCache.txt.log ``` # This is the CMakeCache file. # For build in directory: e:/github/vcpkg/buildtrees/darknet/x64-windows-dbg # It was generated by CMake: E:/github/vcpkg/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-i386/bin/cmake.exe # You can edit this file to change values found and used by cmake. # If you do not want to change any of the values, simply exit the editor. # If you do want to change a value, simply edit, save, and exit the editor. # The syntax for the file is as follows: # KEY:TYPE=VALUE # KEY is the name of a variable in the cache. # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. # VALUE is the current value for the KEY. ######################## # EXTERNAL cache entries ######################## //Build Darknet using C++ compiler also for C files BUILD_AS_CPP:BOOL=OFF //Create dark as a shared library BUILD_SHARED_LIBS:BOOL=ON //Build uselib_track BUILD_USELIB_TRACK:BOOL=ON //Path to a program. CMAKE_AR:FILEPATH=D:/program files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/lib.exe //Choose the type of build, options are: None Debug Release RelWithDebInfo // MinSizeRel ... CMAKE_BUILD_TYPE:STRING=Debug CMAKE_CROSSCOMPILING:STRING=OFF //CUDA compiler CMAKE_CUDA_COMPILER:FILEPATH=NOTFOUND //CXX compiler CMAKE_CXX_COMPILER:FILEPATH=D:/program files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe CMAKE_CXX_FLAGS:STRING=' /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP ' CMAKE_CXX_FLAGS_DEBUG:STRING='/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ' //Flags used by the CXX compiler during MINSIZEREL builds. CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/O1 /Ob1 /DNDEBUG CMAKE_CXX_FLAGS_RELEASE:STRING='/MD /O2 /Oi /Gy /DNDEBUG /Z7 ' //Flags used by the CXX compiler during RELWITHDEBINFO builds. CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/Zi /O2 /Ob1 /DNDEBUG //Libraries linked by default with all C++ applications. CMAKE_CXX_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib //C compiler CMAKE_C_COMPILER:FILEPATH=D:/program files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe CMAKE_C_FLAGS:STRING=' /nologo /DWIN32 /D_WINDOWS /utf-8 /MP ' CMAKE_C_FLAGS_DEBUG:STRING='/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ' //Flags used by the C compiler during MINSIZEREL builds. CMAKE_C_FLAGS_MINSIZEREL:STRING=/O1 /Ob1 /DNDEBUG CMAKE_C_FLAGS_RELEASE:STRING='/MD /O2 /Oi /Gy /DNDEBUG /Z7 ' //Flags used by the C compiler during RELWITHDEBINFO builds. CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/Zi /O2 /Ob1 /DNDEBUG //Libraries linked by default with all C applications. CMAKE_C_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib //No help, variable specified on the command line. CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION:UNINITIALIZED=ON //Flags used by the linker during all build types. CMAKE_EXE_LINKER_FLAGS:STRING=/machine:x64 //Flags used by the linker during DEBUG builds. CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/nologo /debug /INCREMENTAL //Flags used by the linker during MINSIZEREL builds. CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING='/nologo /DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ' //Flags used by the linker during RELWITHDEBINFO builds. CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL //Enable/Disable output of compile commands during generation. CMAKE_EXPORT_COMPILE_COMMANDS:BOOL= //No help, variable specified on the command line. CMAKE_EXPORT_NO_PACKAGE_REGISTRY:UNINITIALIZED=ON //No help, variable specified on the command line. CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY:UNINITIALIZED=ON //No help, variable specified on the command line. CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY:UNINITIALIZED=ON //Value Computed by CMake. CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=E:/github/vcpkg/buildtrees/darknet/x64-windows-dbg/CMakeFiles/pkgRedirects //No help, variable specified on the command line. CMAKE_INSTALL_BINDIR:STRING=bin //No help, variable specified on the command line. CMAKE_INSTALL_LIBDIR:STRING=lib //Install path prefix, prepended onto install directories. CMAKE_INSTALL_PREFIX:PATH=E:/github/vcpkg/packages/darknet_x64-windows/debug //No help, variable specified on the command line. CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP:UNINITIALIZED=TRUE //Path to a program. CMAKE_LINKER:FILEPATH=D:/program files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/link.exe //make program CMAKE_MAKE_PROGRAM:FILEPATH=D:/program files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe //Flags used by the linker during the creation of modules during // all build types. CMAKE_MODULE_LINKER_FLAGS:STRING=/machine:x64 //Flags used by the linker during the creation of modules during // DEBUG builds. CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/nologo /debug /INCREMENTAL //Flags used by the linker during the creation of modules during // MINSIZEREL builds. CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING='/nologo /DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ' //Flags used by the linker during the creation of modules during // RELWITHDEBINFO builds. CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL CMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreaded$<$:Debug>$<$:DLL> //Path to a program. CMAKE_MT:FILEPATH=D:/Windows Kits/10/bin/10.0.22621.0/x64/mt.exe //Value Computed by CMake CMAKE_PROJECT_DESCRIPTION:STATIC= //Value Computed by CMake CMAKE_PROJECT_HOMEPAGE_URL:STATIC= //Value Computed by CMake CMAKE_PROJECT_NAME:STATIC=Darknet //Value Computed by CMake CMAKE_PROJECT_VERSION:STATIC=0.2.5.4 //Value Computed by CMake CMAKE_PROJECT_VERSION_MAJOR:STATIC=0 //Value Computed by CMake CMAKE_PROJECT_VERSION_MINOR:STATIC=2 //Value Computed by CMake CMAKE_PROJECT_VERSION_PATCH:STATIC=5 //Value Computed by CMake CMAKE_PROJECT_VERSION_TWEAK:STATIC=4 //RC compiler CMAKE_RC_COMPILER:FILEPATH=D:/Windows Kits/10/bin/10.0.22621.0/x64/rc.exe CMAKE_RC_FLAGS:STRING=-c65001 /DWIN32 //Flags for Windows Resource Compiler during DEBUG builds. CMAKE_RC_FLAGS_DEBUG:STRING=-D_DEBUG //Flags for Windows Resource Compiler during MINSIZEREL builds. CMAKE_RC_FLAGS_MINSIZEREL:STRING= //Flags for Windows Resource Compiler during RELEASE builds. CMAKE_RC_FLAGS_RELEASE:STRING= //Flags for Windows Resource Compiler during RELWITHDEBINFO builds. CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING= //Flags used by the linker during the creation of shared libraries // during all build types. CMAKE_SHARED_LINKER_FLAGS:STRING=/machine:x64 //Flags used by the linker during the creation of shared libraries // during DEBUG builds. CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/nologo /debug /INCREMENTAL //Flags used by the linker during the creation of shared libraries // during MINSIZEREL builds. CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING='/nologo /DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ' //Flags used by the linker during the creation of shared libraries // during RELWITHDEBINFO builds. CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL //If set, runtime paths are not added when installing shared libraries, // but are added when building. CMAKE_SKIP_INSTALL_RPATH:BOOL=NO //If set, runtime paths are not added when using shared libraries. CMAKE_SKIP_RPATH:BOOL=NO //Flags used by the linker during the creation of static libraries // during all build types. CMAKE_STATIC_LINKER_FLAGS:STRING=/machine:x64 //Flags used by the linker during the creation of static libraries // during DEBUG builds. CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=/nologo //Flags used by the linker during the creation of static libraries // during MINSIZEREL builds. CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= //Flags used by the linker during the creation of static libraries // during RELEASE builds. CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=/nologo //Flags used by the linker during the creation of static libraries // during RELWITHDEBINFO builds. CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= CMAKE_SYSTEM_NAME:STRING=Windows CMAKE_SYSTEM_PROCESSOR:STRING=AMD64 CMAKE_SYSTEM_VERSION:STRING=10.0.22631 //The CMake toolchain file CMAKE_TOOLCHAIN_FILE:FILEPATH=E:/github/vcpkg/scripts/buildsystems/vcpkg.cmake //Create verbose makefile CMAKE_VERBOSE_MAKEFILE:BOOL=ON //Create verbose CUDA build CUDA_VERBOSE_BUILD:BOOL=ON //Value Computed by CMake Darknet_BINARY_DIR:STATIC=E:/github/vcpkg/buildtrees/darknet/x64-windows-dbg //Value Computed by CMake Darknet_IS_TOP_LEVEL:STATIC=ON //Value Computed by CMake Darknet_SOURCE_DIR:STATIC=E:/github/vcpkg/buildtrees/darknet/src/e778426c57-96aa9384e0.clean //Enable building a csharp wrapper ENABLE_CSHARP_WRAPPER:BOOL=OFF //Enable CUDA support ENABLE_CUDA:BOOL=ON //Enable CUDNN ENABLE_CUDNN:BOOL=OFF //Enable CUDNN Half precision ENABLE_CUDNN_HALF:BOOL=ON //Copy custom CMake modules for downstream integration ENABLE_DEPLOY_CUSTOM_CMAKE_MODULES:BOOL=OFF //Enable OpenCV integration ENABLE_OPENCV:BOOL=TRUE //Enable VCPKG integration ENABLE_VCPKG_INTEGRATION:BOOL=ON //Enable ZED Camera support ENABLE_ZED_CAMERA:BOOL=ON //No help, variable specified on the command line. FETCHCONTENT_FULLY_DISCONNECTED:UNINITIALIZED=ON //No help, variable specified on the command line. INSTALL_BIN_DIR:STRING=bin //Path where cmake configs will be installed INSTALL_CMAKE_DIR:PATH=share/darknet //Path where headers will be installed INSTALL_INCLUDE_DIR:PATH=include/darknet //No help, variable specified on the command line. INSTALL_LIB_DIR:STRING=lib //Manually export the TRACK_OPTFLOW=1 define MANUALLY_EXPORT_TRACK_OPTFLOW:BOOL=OFF //Use libs distributed with this repo USE_INTEGRATED_LIBS:BOOL=FALSE //Automatically copy dependencies into the output directory for // executables. VCPKG_APPLOCAL_DEPS:BOOL=OFF //Build OpenCV with CUDA extension integration VCPKG_BUILD_OPENCV_WITH_CUDA:BOOL=ON //No help, variable specified on the command line. VCPKG_CHAINLOAD_TOOLCHAIN_FILE:UNINITIALIZED=E:/github/vcpkg/scripts/toolchains/windows.cmake //No help, variable specified on the command line. VCPKG_CRT_LINKAGE:UNINITIALIZED=dynamic //No help, variable specified on the command line. VCPKG_CXX_FLAGS:UNINITIALIZED= //No help, variable specified on the command line. VCPKG_CXX_FLAGS_DEBUG:UNINITIALIZED= //No help, variable specified on the command line. VCPKG_CXX_FLAGS_RELEASE:UNINITIALIZED= //No help, variable specified on the command line. VCPKG_C_FLAGS:UNINITIALIZED= //No help, variable specified on the command line. VCPKG_C_FLAGS_DEBUG:UNINITIALIZED= //No help, variable specified on the command line. VCPKG_C_FLAGS_RELEASE:UNINITIALIZED= //The directory which contains the installed libraries for each // triplet VCPKG_INSTALLED_DIR:PATH=E:/github/vcpkg/installed //No help, variable specified on the command line. VCPKG_LINKER_FLAGS:UNINITIALIZED= //No help, variable specified on the command line. VCPKG_LINKER_FLAGS_DEBUG:UNINITIALIZED= //No help, variable specified on the command line. VCPKG_LINKER_FLAGS_RELEASE:UNINITIALIZED= //The path to the vcpkg manifest directory. VCPKG_MANIFEST_DIR:PATH=E:/github/vcpkg/buildtrees/darknet/src/e778426c57-96aa9384e0.clean //Install the dependencies listed in your manifest: //\n If this is off, you will have to manually install your dependencies. //\n See https://github.com/microsoft/vcpkg/tree/master/docs/specifications/manifests.md // for more info. //\n VCPKG_MANIFEST_INSTALL:BOOL=OFF //Use manifest mode, as opposed to classic mode. VCPKG_MANIFEST_MODE:BOOL=ON //No help, variable specified on the command line. VCPKG_PLATFORM_TOOLSET:UNINITIALIZED=v143 //Appends the vcpkg paths to CMAKE_PREFIX_PATH, CMAKE_LIBRARY_PATH // and CMAKE_FIND_ROOT_PATH so that vcpkg libraries/packages are // found after toolchain/system libraries/packages. VCPKG_PREFER_SYSTEM_LIBS:BOOL=OFF //Enable the setup of CMAKE_PROGRAM_PATH to vcpkg paths VCPKG_SETUP_CMAKE_PROGRAM_PATH:BOOL=ON //No help, variable specified on the command line. VCPKG_SET_CHARSET_FLAG:UNINITIALIZED=ON //No help, variable specified on the command line. VCPKG_TARGET_ARCHITECTURE:UNINITIALIZED=x64 //Vcpkg target triplet (ex. x86-windows) VCPKG_TARGET_TRIPLET:STRING=x64-windows //Trace calls to find_package() VCPKG_TRACE_FIND_PACKAGE:BOOL=OFF //Use legacy OpenCV 2 VCPKG_USE_OPENCV2:BOOL=OFF //Use legacy OpenCV 3 VCPKG_USE_OPENCV3:BOOL=OFF //Use OpenCV 4 VCPKG_USE_OPENCV4:BOOL=ON //Enables messages from the VCPKG toolchain for debugging purposes. VCPKG_VERBOSE:BOOL=OFF //(experimental) Automatically copy dependencies into the install // target directory for executables. Requires CMake 3.14. X_VCPKG_APPLOCAL_DEPS_INSTALL:BOOL=OFF //(experimental) Add USES_TERMINAL to VCPKG_APPLOCAL_DEPS to force // serialization. X_VCPKG_APPLOCAL_DEPS_SERIALIZED:BOOL=OFF //The directory which contains the installed libraries for each // triplet _VCPKG_INSTALLED_DIR:PATH=E:/github/vcpkg/installed //No help, variable specified on the command line. _VCPKG_ROOT_DIR:UNINITIALIZED=E:/github/vcpkg ######################## # INTERNAL cache entries ######################## //ADVANCED property for variable: CMAKE_AR CMAKE_AR-ADVANCED:INTERNAL=1 //This is the directory where this CMakeCache.txt was created CMAKE_CACHEFILE_DIR:INTERNAL=e:/github/vcpkg/buildtrees/darknet/x64-windows-dbg //Major version of cmake used to create the current loaded cache CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 //Minor version of cmake used to create the current loaded cache CMAKE_CACHE_MINOR_VERSION:INTERNAL=30 //Patch version of cmake used to create the current loaded cache CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 //Path to CMake executable. CMAKE_COMMAND:INTERNAL=E:/github/vcpkg/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-i386/bin/cmake.exe //Path to cpack program executable. CMAKE_CPACK_COMMAND:INTERNAL=E:/github/vcpkg/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-i386/bin/cpack.exe //Path to ctest program executable. CMAKE_CTEST_COMMAND:INTERNAL=E:/github/vcpkg/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-i386/bin/ctest.exe //ADVANCED property for variable: CMAKE_CUDA_COMPILER CMAKE_CUDA_COMPILER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_COMPILER CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_STANDARD_LIBRARIES CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_COMPILER CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 //Path to cache edit program executable. CMAKE_EDIT_COMMAND:INTERNAL=E:/github/vcpkg/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-i386/bin/cmake-gui.exe //Executable file format CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 //Name of external makefile project generator. CMAKE_EXTRA_GENERATOR:INTERNAL= //Name of generator. CMAKE_GENERATOR:INTERNAL=Ninja //Generator instance identifier. CMAKE_GENERATOR_INSTANCE:INTERNAL= //Name of generator platform. CMAKE_GENERATOR_PLATFORM:INTERNAL= //Name of generator toolset. CMAKE_GENERATOR_TOOLSET:INTERNAL= //Source directory with the top level CMakeLists.txt file for this // project CMAKE_HOME_DIRECTORY:INTERNAL=E:/github/vcpkg/buildtrees/darknet/src/e778426c57-96aa9384e0.clean //ADVANCED property for variable: CMAKE_LINKER CMAKE_LINKER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MT CMAKE_MT-ADVANCED:INTERNAL=1 //number of local generators CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 //Platform information initialized CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 //noop for ranlib CMAKE_RANLIB:INTERNAL=: //ADVANCED property for variable: CMAKE_RC_COMPILER CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1 CMAKE_RC_COMPILER_WORKS:INTERNAL=1 //ADVANCED property for variable: CMAKE_RC_FLAGS CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //Path to CMake installation. CMAKE_ROOT:INTERNAL=E:/github/vcpkg/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-i386/share/cmake-3.30 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SKIP_RPATH CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_TOOLCHAIN_FILE CMAKE_TOOLCHAIN_FILE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: VCPKG_VERBOSE VCPKG_VERBOSE-ADVANCED:INTERNAL=1 //Making sure VCPKG_MANIFEST_MODE doesn't change Z_VCPKG_CHECK_MANIFEST_MODE:INTERNAL=ON //Vcpkg root directory Z_VCPKG_ROOT_DIR:INTERNAL=E:/github/vcpkg ```
MonicaLiu0311 commented 3 weeks ago
CMake Error at CMakeLists.txt:154 (message):
  CUDA not found, please build explicitly with -DENABLE_CUDA=OFF if you do
  not want CUDA.

Please install CUDA first.

cenit commented 3 weeks ago

your cuda version is too old for the msvc compiler in use. The cmake error is a little bit criptic but that's my first suspicion

whynotAC commented 2 weeks ago

your cuda version is too old for the msvc compiler in use. The cmake error is a little bit criptic but that's my first suspicion

nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:41:10_Pacific_Daylight_Time_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0

whynotAC commented 2 weeks ago

I have installed the package before, but I couldn't do it again.

whynotAC commented 2 weeks ago

I closed this issue by accident, could you please reopen it for me?

cenit commented 2 weeks ago

MSVC 19.40 requires CUDA 12.4 or newer; you can try using _ALLOW_COMPILER_AND_STL_VERSION_MISMATCH define but it's totally unsupported

cenit commented 2 weeks ago

the fact that the issue is closed is ok, you have to upgrade cuda, that's it. If you were able to install the package before, maybe it was with an older version of MSVC

whynotAC commented 2 weeks ago

Thanks a lot, I will try it.

whynotAC commented 2 weeks ago

bad news, opencv will rebuild again.

whynotAC commented 2 weeks ago

I have installed "darknet" successfully, however, I can't find the library know as "PThreads4W" while using "darknet".

code as follow: find_package(Darknet CONFIG REQUIRED)

error as follow:

[CMake] CMake Error at D:/program files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
[CMake]   Could NOT find PThreads4W (missing: PThreads4W_LIBRARY
[CMake]   PThreads4W_CXXEXC_LIBRARY PThreads4W_STRUCTEXC_LIBRARY
[CMake]   PThreads4W_INCLUDE_DIR)
[CMake] Call Stack (most recent call first):
[CMake]   D:/program files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
[CMake]   E:/github/newvcpkg/vcpkg/installed/x64-windows/share/PThreads4W/PThreads4WConfig.cmake:77 (find_package_handle_standard_args)
[CMake]   D:/program files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.29/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
[CMake]   E:/github/newvcpkg/vcpkg/installed/x64-windows/share/darknet/DarknetConfig.cmake:27 (find_dependency)
[CMake]   src/CMakeLists.txt:7 (find_package)

if you add

set(_VCPKG_INSTALLED_DIR "E:/github/newvcpkg/vcpkg/installed")
set(VCPKG_TARGET_TRIPLET "x64-windows")

into this file(vcpkg\installed\x64-windows\share\PThreads4W\PThreads4WConfig.cmake), I think it will work.

Also, there's a problem. It's the darknet that has been compiled and installed, and the corresponding function can't be found when it's linked. For example:

error LNK2019: An external symbol load_network_custom that cannot be resolved

Due to my limited abilities, I haven't found the problem yet.

dg0yt commented 2 weeks ago

if you add ... into this file(vcpkg\installed\x64-windows\share\PThreads4W\PThreads4WConfig.cmake), I think it will work.

The "Call Stack" shows that you are not using the vcpkg.cmake toolchain file (correctly).