Closed xrv0 closed 4 years ago
Has there been any progress on this? VS2019 v142 Cuda 10.2 Opencv 4.2.0
I have a similar problem, cmake configure fails "Cannot open include file: 'pthread.h':"
Contents of CMakeError.log:
C:\Users\admin\Desktop\darknet-master\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1,10): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\Users\admin\Desktop\darknet-master\CMakeFiles\CMakeTmp\cmTC_dcff0.vcxproj]
Cmake-GUI: Autodetected CUDA architecture(s): 6.1 Building with CUDA flags: -gencode;arch=compute_61,code=sm_61 Your setup does not supports half precision (it requires CC >= 7.5) CMake Error at cmake/Modules/FindPThreads_windows.cmake:43 (list): list does not recognize sub-command TRANSFORM Call Stack (most recent call first): CMakeLists.txt:93 (find_package)
PThreads_windows_DLL_DIR: C:/Users/MegaWATT/Desktop/darknet-master/3rdparty/pthreads/include
OpenCV ARCH: x64
OpenCV RUNTIME: vc16
OpenCV STATIC: OFF
Found OpenCV 4.2.0 in F:/Master/Programming/Resources/C++/OpenCV/opencv_4_2_0_cuda_10_2_cudnn_python_3_7/install/x64/vc16/lib
You might need to add F:\Master\Programming\Resources\C++\OpenCV\opencv_4_2_0_cuda_10_2_cudnn_python_3_7\install\x64\vc16\bin to your PATH to be able to run your applications.
Found OpenMP_C: -openmp
Found OpenMP_CXX: -openmp
Found OpenMP: TRUE
CMake Error at cmake/Modules/FindCUDNN.cmake:69 (list):
list does not recognize sub-command TRANSFORM
Call Stack (most recent call first):
CMakeLists.txt:181 (find_package)
CMAKE_CUDA_FLAGS: -gencode arch=compute_61,code=sm_61 -Wno-deprecated-declarations -Xcompiler="/wd4013,/wd4018,/wd4028,/wd4047,/wd4068,/wd4090,/wd4101,/wd4113,/wd4133,/wd4190,/wd4244,/wd4267,/wd4305,/wd4477,/wd4996,/wd4819,/fp:fast,/DGPU,/DCUDNN,/DOPENCV" -D_WINDOWS -Xcompiler="/W3 /GR /EHsc" Configuring incomplete, errors occurred! See also "C:/Users/MegaWATT/Desktop/darknet-master/CMakeFiles/CMakeOutput.log". See also "C:/Users/MegaWATT/Desktop/darknet-master/CMakeFiles/CMakeError.log".
same problem : Could NOT find PThreads_windows (missing: PThreads_windows_LIBRARY PThreads_windows_INCLUDE_DIR)
I run the command .\build.ps1
Found vcpkg in VCPKG_ROOT: C:\Users\lyc\Desktop\darknet-yolov4\vcpkg No default triplet has been set-up for vcpkg. Defaulting to x64-windows Setting up environment to use CMake generator: Visual Studio 15 2017 目录: C:\Users\lyc\Desktop\darknet-yolov4\darknet-master -- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363. -- The C compiler identification is MSVC 19.16.27040.0 -- The CXX compiler identification is MSVC 19.16.27040.0 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for a CUDA compiler -- Looking for a CUDA compiler - C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/bin/nvcc.exe -- The CUDA compiler identification is NVIDIA 10.0.130 -- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/bin/nvcc.exe -- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/bin/nvcc.exe -- works -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0 (found version "10.0") -- Autodetected CUDA architecture(s): 7.5 -- Building with CUDA flags: -gencode;arch=compute_75,code=sm_75 -- Your setup supports half precision (it requires CC >= 7.0) -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE CMake Error at C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find PThreads_windows (missing: PThreads_windows_LIBRARY PThreads_windows_INCLUDE_DIR)
@cenit Hi, what could be the reason?
Not detecting pthread.h is perfectly fine on Windows. In fact, it is an expected failure triggered by cmake itself and not depending on us. What is concerning is the failure of finding PThreads_windows. For example @SurionAndrew, which posted the full log, makes clear the problem:
list does not recognize sub-command TRANSFORM
which means that he is not using CMake 3.12 or newer. We need to use CMake at least version 3.12, otherwise TRANSFORM command does not exist (it is used inside PThreads_windows module)!
CMake 3.12 is also necessary for CUDA and, due to a severe bug with static/shared CUDA libraries (which we helped discovering since we are avid users of new functionalities), we will soon upgrade to CMake 3.17
Did you pull latest changes? It should fail right at the beginning, since we put a cmake_minimum_required(VERSION 3.12)
...
If you edit it lowering requirements, then it can fail anywhere ;)
Sorry
I actually did update my cmake to 3.12 and it does in fact solve the problem
I use cmake 3.17.2 , and i still got this , do not know how to get this done.
------------------ 原始邮件 ------------------ 发件人: "SurionAndrew"<notifications@github.com>; 发送时间: 2020年5月26日(星期二) 凌晨0:04 收件人: "AlexeyAB/darknet"<darknet@noreply.github.com>; 抄送: "AIME"<317879145@qq.com>; "Comment"<comment@noreply.github.com>; 主题: Re: [AlexeyAB/darknet] Windows Installation | pthread.h - not found (#4122)
Sorry
I actually did update my cmake to 3.12 and it does in fact solve the problem
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Please post CMakeCache.txt, CMakError.log and shell log. Please also get them from a fresh build from latest commit
I have got it done,the problem is caused by vcpkg which is not installed correctly。 thank you for your time。
@LeeYongchao Could you please explain more details of how you fix the problem? I reinstall vcpkg and still got the same result.
As always, @MindSightTH , “ Please post CMakeCache.txt, CMakError.log and shell log. Please also get them from a fresh build from latest commit”
I have Visual Studio Code 2019 and OpenCV installed. When I try to compile darknet using Cmake I have cuda 10.1 and cuddn > 7 installed. I get the following errors:
CMakeError.log:
CMakeOutput.log: