AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.73k stars 7.96k forks source link

Windows Installation | pthread.h - not found #4122

Closed xrv0 closed 4 years ago

xrv0 commented 5 years ago

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:

VCPKG found: C:\Users\admin\vcpkg
Using VCPKG integration
The C compiler identification is MSVC 19.23.28105.4
The CXX compiler identification is MSVC 19.23.28105.4
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/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/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/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.1/bin/nvcc.exe
The CUDA compiler identification is NVIDIA 10.1.243
Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/bin/nvcc.exe
Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/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.1 (found version "10.1") 
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)
Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE  
CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find PThreads_windows (missing: PThreads_windows_LIBRARY
  PThreads_windows_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindPThreads_windows.cmake:39 (find_package_handle_standard_args)
  C:/Users/admin/vcpkg/scripts/buildsystems/vcpkg.cmake:263 (_find_package)
  CMakeLists.txt:93 (find_package)

Configuring incomplete, errors occurred!
See also "C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeOutput.log".
See also "C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeError.log".

CMakeError.log:

Determining if the include file pthread.h exists failed with the following output:
Change Dir: C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_f53b6.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R)-Build-Engine, Version 16.3.0+0f4c62fea fr .NET Framework

Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

  Microsoft (R) C/C++ Optimizing Compiler Version 19.23.28105.4 for x64

  CheckIncludeFile.c

  Copyright (C) Microsoft Corporation.  All rights reserved.

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_f53b6.dir\Debug\\" /Fd"cmTC_f53b6.dir\Debug\vc142.pdb" /Gd /TC /errorReport:queue C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\CheckIncludeFile.c

C:\Users\admin\Desktop\darknet\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\CMakeFiles\CMakeTmp\cmTC_f53b6.vcxproj]

CMakeOutput.log:

The system is: Windows - 10.0.18362 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler:  
Build flags: 
Id flags:  

The output was:
0
Microsoft (R)-Build-Engine, Version 16.3.0+0f4c62fea fr .NET Framework
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

Der Buildvorgang wurde am 18.10.2019 15:58:47 gestartet.
Projekt "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdC\CompilerIdC.vcxproj" auf Knoten "1" (Standardziele).
PrepareForBuild:
  Das Verzeichnis "Debug\" wird erstellt.
  Das Verzeichnis "Debug\CompilerIdC.tlog\" wird erstellt.
InitializeBuildStatus:
  "Debug\CompilerIdC.tlog\unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde.
VcpkgTripletSelection:
  Using triplet "x64-windows" from "C:\Users\admin\vcpkg\installed\x64-windows\"
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\CL.exe /c /I"C:\Users\admin\vcpkg\installed\x64-windows\include" /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc142.pdb" /Gd /TC /FC /errorReport:queue CMakeCCompilerId.c
  CMakeCCompilerId.c
Link:
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Users\admin\vcpkg\installed\x64-windows\debug\lib" /LIBPATH:"C:\Users\admin\vcpkg\installed\x64-windows\debug\lib\manual-link" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "C:\Users\admin\vcpkg\installed\x64-windows\debug\lib\*.lib" /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X64 Debug\CMakeCCompilerId.obj
  CompilerIdC.vcxproj -> C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdC\.\CompilerIdC.exe
AppLocalFromInstalled:
  C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -noprofile -File "C:\Users\admin\vcpkg\scripts\buildsystems\msbuild\applocal.ps1" "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdC\.\CompilerIdC.exe" "C:\Users\admin\vcpkg\installed\x64-windows\debug\bin" "Debug\CompilerIdC.tlog\CompilerIdC.write.1u.tlog" "Debug\vcpkg.applocal.log"
PostBuildEvent:
  for %%i in (cl.exe) do @echo CMAKE_C_COMPILER=%%~$PATH:i
  :VCEnd
  CMAKE_C_COMPILER=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\Hostx64\x64\cl.exe
FinalizeBuildStatus:
  Die Datei "Debug\CompilerIdC.tlog\unsuccessfulbuild" wird gel”scht.
  Aktualisieren des Timestamps von "Debug\CompilerIdC.tlog\CompilerIdC.lastbuildstate".
Die Erstellung von Projekt "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdC\CompilerIdC.vcxproj" ist abgeschlossen (Standardziele).

Der Buildvorgang wurde erfolgreich ausgefhrt.
    0 Warnung(en)
    0 Fehler

Verstrichene Zeit 00:00:01.21

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.exe"

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.vcxproj"

The C compiler identification is MSVC, found in "C:/Users/admin/Desktop/darknet/CMakeFiles/3.16.0-rc1/CompilerIdC/CompilerIdC.exe"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler:  
Build flags: 
Id flags:  

The output was:
0
Microsoft (R)-Build-Engine, Version 16.3.0+0f4c62fea fr .NET Framework
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

Der Buildvorgang wurde am 18.10.2019 15:58:48 gestartet.
Projekt "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCXX\CompilerIdCXX.vcxproj" auf Knoten "1" (Standardziele).
PrepareForBuild:
  Das Verzeichnis "Debug\" wird erstellt.
  Das Verzeichnis "Debug\CompilerIdCXX.tlog\" wird erstellt.
InitializeBuildStatus:
  "Debug\CompilerIdCXX.tlog\unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde.
VcpkgTripletSelection:
  Using triplet "x64-windows" from "C:\Users\admin\vcpkg\installed\x64-windows\"
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\CL.exe /c /I"C:\Users\admin\vcpkg\installed\x64-windows\include" /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc142.pdb" /Gd /TP /FC /errorReport:queue CMakeCXXCompilerId.cpp
  CMakeCXXCompilerId.cpp
Link:
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdCXX.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Users\admin\vcpkg\installed\x64-windows\debug\lib" /LIBPATH:"C:\Users\admin\vcpkg\installed\x64-windows\debug\lib\manual-link" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "C:\Users\admin\vcpkg\installed\x64-windows\debug\lib\*.lib" /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdCXX.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdCXX.lib" /MACHINE:X64 Debug\CMakeCXXCompilerId.obj
  CompilerIdCXX.vcxproj -> C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCXX\.\CompilerIdCXX.exe
AppLocalFromInstalled:
  C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -noprofile -File "C:\Users\admin\vcpkg\scripts\buildsystems\msbuild\applocal.ps1" "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCXX\.\CompilerIdCXX.exe" "C:\Users\admin\vcpkg\installed\x64-windows\debug\bin" "Debug\CompilerIdCXX.tlog\CompilerIdCXX.write.1u.tlog" "Debug\vcpkg.applocal.log"
PostBuildEvent:
  for %%i in (cl.exe) do @echo CMAKE_CXX_COMPILER=%%~$PATH:i
  :VCEnd
  CMAKE_CXX_COMPILER=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\Hostx64\x64\cl.exe
FinalizeBuildStatus:
  Die Datei "Debug\CompilerIdCXX.tlog\unsuccessfulbuild" wird gel”scht.
  Aktualisieren des Timestamps von "Debug\CompilerIdCXX.tlog\CompilerIdCXX.lastbuildstate".
Die Erstellung von Projekt "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCXX\CompilerIdCXX.vcxproj" ist abgeschlossen (Standardziele).

Der Buildvorgang wurde erfolgreich ausgefhrt.
    0 Warnung(en)
    0 Fehler

Verstrichene Zeit 00:00:01.03

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.exe"

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.vcxproj"

The CXX compiler identification is MSVC, found in "C:/Users/admin/Desktop/darknet/CMakeFiles/3.16.0-rc1/CompilerIdCXX/CompilerIdCXX.exe"

Determining if the C compiler works passed with the following output:
Change Dir: C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_0b546.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R)-Build-Engine, Version 16.3.0+0f4c62fea fr .NET Framework

Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

  Microsoft (R) C/C++ Optimizing Compiler Version 19.23.28105.4 for x64

  testCCompiler.c

  Copyright (C) Microsoft Corporation.  All rights reserved.

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_0b546.dir\Debug\\" /Fd"cmTC_0b546.dir\Debug\vc142.pdb" /Gd /TC /errorReport:queue C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\testCCompiler.c

  cmTC_0b546.vcxproj -> C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\Debug\cmTC_0b546.exe

Detecting C compiler ABI info compiled with the following output:
Change Dir: C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_34875.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R)-Build-Engine, Version 16.3.0+0f4c62fea fr .NET Framework

Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

  Microsoft (R) C/C++ Optimizing Compiler Version 19.23.28105.4 for x64

  CMakeCCompilerABI.c

  Copyright (C) Microsoft Corporation.  All rights reserved.

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_34875.dir\Debug\\" /Fd"cmTC_34875.dir\Debug\vc142.pdb" /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.16\Modules\CMakeCCompilerABI.c"

  cmTC_34875.vcxproj -> C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\Debug\cmTC_34875.exe

Determining if the CXX compiler works passed with the following output:
Change Dir: C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_9a4c1.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R)-Build-Engine, Version 16.3.0+0f4c62fea fr .NET Framework

Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

  Microsoft (R) C/C++ Optimizing Compiler Version 19.23.28105.4 for x64

  testCXXCompiler.cxx

  Copyright (C) Microsoft Corporation.  All rights reserved.

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_9a4c1.dir\Debug\\" /Fd"cmTC_9a4c1.dir\Debug\vc142.pdb" /Gd /TP /errorReport:queue C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\testCXXCompiler.cxx

  cmTC_9a4c1.vcxproj -> C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\Debug\cmTC_9a4c1.exe

Detecting CXX compiler ABI info compiled with the following output:
Change Dir: C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_7a874.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R)-Build-Engine, Version 16.3.0+0f4c62fea fr .NET Framework

Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

  Microsoft (R) C/C++ Optimizing Compiler Version 19.23.28105.4 for x64

  CMakeCXXCompilerABI.cpp

  Copyright (C) Microsoft Corporation.  All rights reserved.

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_7a874.dir\Debug\\" /Fd"cmTC_7a874.dir\Debug\vc142.pdb" /Gd /TP /errorReport:queue "C:\Program Files\CMake\share\cmake-3.16\Modules\CMakeCXXCompilerABI.cpp"

  cmTC_7a874.vcxproj -> C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\Debug\cmTC_7a874.exe

Looking for a CUDA compiler passed with the following output:
-- The CUDA compiler identification is NVIDIA 10.1.243
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/bin/nvcc.exe
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/bin/nvcc.exe -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/admin/Desktop/darknet/CMakeFiles/CheckCUDA

Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" succeeded.
Compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/bin/nvcc.exe 
Build flags: 
Id flags:  -v;--keep;--keep-dir;tmp

The output was:
0
Microsoft (R)-Build-Engine, Version 16.3.0+0f4c62fea fr .NET Framework
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

Der Buildvorgang wurde am 18.10.2019 15:59:04 gestartet.
Projekt "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCUDA\CompilerIdCUDA.vcxproj" auf Knoten "1" (Standardziele).
PrepareForBuild:
  Das Verzeichnis "Debug\" wird erstellt.
  Das Verzeichnis "Debug\CompilerIdCUDA.tlog\" wird erstellt.
InitializeBuildStatus:
  "Debug\CompilerIdCUDA.tlog\unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde.
AddCudaCompileDeps:
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\cl.exe /E /nologo /showIncludes /TP /D__CUDACC__ /D_MBCS /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" /IC:\Users\admin\vcpkg\installed\x64-windows\include /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin" /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" /I. /FIcuda_runtime.h /c C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCUDA\CMakeCUDACompilerId.cu 
Das Projekt "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCUDA\CompilerIdCUDA.vcxproj" (1) erstellt "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCUDA\CompilerIdCUDA.vcxproj" (1:2) auf Knoten "1", CudaBuildCore Ziel(e).
CudaBuildCore:
  Compiling CUDA source file CMakeCUDACompilerId.cu...
  cmd.exe /C "C:\Users\admin\AppData\Local\Temp\tmp64f1b7dc7d7d4965bb0470878cf4711e.cmd"
  "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64" -x cu  -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Users\admin\vcpkg\installed\x64-windows\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include"  -G   --keep-dir x64\Debug -maxrregcount=0  --machine 64 --compile -cudart static  -g   -D_MBCS -Xcompiler "/EHsc /W0 /nologo /Od /FdDebug\vc142.pdb /FS /Zi /RTC1 /MDd " -o Debug\CMakeCUDACompilerId.cu.obj "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCUDA\CMakeCUDACompilerId.cu"

  C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCUDA>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64" -x cu  -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Users\admin\vcpkg\installed\x64-windows\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include"  -G   --keep-dir x64\Debug -maxrregcount=0  --machine 64 --compile -cudart static  -g   -D_MBCS -Xcompiler "/EHsc /W0 /nologo /Od /FdDebug\vc142.pdb /FS /Zi /RTC1 /MDd " -o Debug\CMakeCUDACompilerId.cu.obj "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCUDA\CMakeCUDACompilerId.cu" 
  CMakeCUDACompilerId.cu
Die Erstellung von Projekt "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCUDA\CompilerIdCUDA.vcxproj" ist abgeschlossen (CudaBuildCore Ziel(e)).
VcpkgTripletSelection:
  Using triplet "x64-windows" from "C:\Users\admin\vcpkg\installed\x64-windows\"
Link:
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdCUDA.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64" /LIBPATH:"C:\Users\admin\vcpkg\installed\x64-windows\debug\lib" /LIBPATH:"C:\Users\admin\vcpkg\installed\x64-windows\debug\lib\manual-link" cudart.lib "C:\Users\admin\vcpkg\installed\x64-windows\debug\lib\*.lib" /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdCUDA.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdCUDA.lib" /MACHINE:X64 Debug\CMakeCUDACompilerId.cu.obj
  CompilerIdCUDA.vcxproj -> C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCUDA\.\CompilerIdCUDA.exe
AppLocalFromInstalled:
  C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -noprofile -File "C:\Users\admin\vcpkg\scripts\buildsystems\msbuild\applocal.ps1" "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCUDA\.\CompilerIdCUDA.exe" "C:\Users\admin\vcpkg\installed\x64-windows\debug\bin" "Debug\CompilerIdCUDA.tlog\CompilerIdCUDA.write.1u.tlog" "Debug\vcpkg.applocal.log"
PostBuildEvent:
  echo CMAKE_CUDA_COMPILER=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe
  :VCEnd
  CMAKE_CUDA_COMPILER=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe
FinalizeBuildStatus:
  Die Datei "Debug\CompilerIdCUDA.tlog\unsuccessfulbuild" wird gel”scht.
  Aktualisieren des Timestamps von "Debug\CompilerIdCUDA.tlog\CompilerIdCUDA.lastbuildstate".
Die Erstellung von Projekt "C:\Users\admin\Desktop\darknet\CMakeFiles\3.16.0-rc1\CompilerIdCUDA\CompilerIdCUDA.vcxproj" ist abgeschlossen (Standardziele).

Der Buildvorgang wurde erfolgreich ausgefhrt.
    0 Warnung(en)
    0 Fehler

Verstrichene Zeit 00:00:02.93

Compilation of the CUDA compiler identification source "CMakeCUDACompilerId.cu" produced "CompilerIdCUDA.exe"

Compilation of the CUDA compiler identification source "CMakeCUDACompilerId.cu" produced "CompilerIdCUDA.vcxproj"

The CUDA compiler identification is NVIDIA, found in "C:/Users/admin/Desktop/darknet/CMakeFiles/3.16.0-rc1/CompilerIdCUDA/CompilerIdCUDA.exe"

Determining if the CUDA compiler works passed with the following output:
Change Dir: C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_704f0.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R)-Build-Engine, Version 16.3.0+0f4c62fea fr .NET Framework

Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

  Compiling CUDA source file main.cu...

  C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64" -x cu   -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include"     --keep-dir x64\Debug -maxrregcount=0  --machine 64 --compile -cudart static -Xcompiler="/EHsc -Zi -Ob0" -g   -D_WINDOWS -D"CMAKE_INTDIR=\"Debug\"" -D"CMAKE_INTDIR=\"Debug\"" -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /FdcmTC_704f0.dir\Debug\vc142.pdb /FS /Zi /RTC1 /MDd /GR" -o cmTC_704f0.dir\Debug\main.obj "C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\main.cu" 

  main.cu

     Creating library C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp/Debug/cmTC_704f0.lib and object C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp/Debug/cmTC_704f0.exp

  cmTC_704f0.vcxproj -> C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\Debug\cmTC_704f0.exe

Detecting CUDA compiler ABI info compiled with the following output:
Change Dir: C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_ac24b.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R)-Build-Engine, Version 16.3.0+0f4c62fea fr .NET Framework

Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

  Compiling CUDA source file ..\..\..\..\..\..\Program Files\CMake\share\cmake-3.16\Modules\CMakeCUDACompilerABI.cu...

  C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64" -x cu   -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include"     --keep-dir x64\Debug -maxrregcount=0  --machine 64 --compile -cudart static -Xcompiler="/EHsc -Zi -Ob0 -v" -g   -D_WINDOWS -D"CMAKE_INTDIR=\"Debug\"" -D"CMAKE_INTDIR=\"Debug\"" -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /FdcmTC_ac24b.dir\Debug\vc142.pdb /FS /Zi /RTC1 /MDd /GR" -o cmTC_ac24b.dir\Debug\CMakeCUDACompilerABI.obj "C:\Program Files\CMake\share\cmake-3.16\Modules\CMakeCUDACompilerABI.cu" 

cl : Command line warning D9002: ignoring unknown option '-v' [C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\cmTC_ac24b.vcxproj]

cl : Command line warning D9002: ignoring unknown option '-v' [C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\cmTC_ac24b.vcxproj]

  CMakeCUDACompilerABI.cu

cl : Command line warning D9002: ignoring unknown option '-v' [C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\cmTC_ac24b.vcxproj]

LINK : warning LNK4044: unrecognized option '/v'; ignored [C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\cmTC_ac24b.vcxproj]

     Creating library C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp/Debug/cmTC_ac24b.lib and object C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp/Debug/cmTC_ac24b.exp

  cmTC_ac24b.vcxproj -> C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\Debug\cmTC_ac24b.exe

Parsed CUDA implicit include dir info from above output: rv=start
  warn: unable to parse implicit include dirs!

Parsed CUDA implicit link information from above output:
  link line regex: [^( *|.*[/\])(link\.exe|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_ac24b.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R)-Build-Engine  Version 16.3.0+0f4c62fea fr .NET Framework]
  ignore line: [Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.]
  ignore line: []
  ignore line: [  Compiling CUDA source file ..\..\..\..\..\..\Program Files\CMake\share\cmake-3.16\Modules\CMakeCUDACompilerABI.cu...]
  ignore line: [  ]
  ignore line: [  C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_35 code=\"sm_35 compute_35\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64" -x cu   -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include"     --keep-dir x64\Debug -maxrregcount=0  --machine 64 --compile -cudart static -Xcompiler="/EHsc -Zi -Ob0 -v" -g   -D_WINDOWS -D"CMAKE_INTDIR=\"Debug\"" -D"CMAKE_INTDIR=\"Debug\"" -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /FdcmTC_ac24b.dir\Debug\vc142.pdb /FS /Zi /RTC1 /MDd /GR" -o cmTC_ac24b.dir\Debug\CMakeCUDACompilerABI.obj "C:\Program Files\CMake\share\cmake-3.16\Modules\CMakeCUDACompilerABI.cu" ]
  ignore line: [cl : Command line warning D9002: ignoring unknown option '-v' [C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\cmTC_ac24b.vcxproj]]
  ignore line: [cl : Command line warning D9002: ignoring unknown option '-v' [C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\cmTC_ac24b.vcxproj]]
  ignore line: [  CMakeCUDACompilerABI.cu]
  ignore line: [cl : Command line warning D9002: ignoring unknown option '-v' [C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\cmTC_ac24b.vcxproj]]
  ignore line: [LINK : warning LNK4044: unrecognized option '/v']
  ignore line: [ ignored [C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\cmTC_ac24b.vcxproj]]
  ignore line: [     Creating library C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp/Debug/cmTC_ac24b.lib and object C:/Users/admin/Desktop/darknet/CMakeFiles/CMakeTmp/Debug/cmTC_ac24b.exp]
  ignore line: [  cmTC_ac24b.vcxproj -> C:\Users\admin\Desktop\darknet\CMakeFiles\CMakeTmp\Debug\cmTC_ac24b.exe]
  ignore line: []
  ignore line: []
  implicit libs: []
  implicit dirs: []
  implicit fwks: []
SurionAndrew commented 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".

LeeYongchao commented 4 years ago

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)

AlexeyAB commented 4 years ago

@cenit Hi, what could be the reason?

cenit commented 4 years ago

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 ;)

SurionAndrew commented 4 years ago

Sorry

I actually did update my cmake to 3.12 and it does in fact solve the problem

LeeYongchao commented 4 years ago

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.

cenit commented 4 years ago

Please post CMakeCache.txt, CMakError.log and shell log. Please also get them from a fresh build from latest commit

LeeYongchao commented 4 years ago

I have got it done,the problem is caused by vcpkg which is not installed correctly。 thank you for your time。

MindSightTH commented 4 years ago

@LeeYongchao Could you please explain more details of how you fix the problem? I reinstall vcpkg and still got the same result.

cenit commented 4 years ago

As always, @MindSightTH , “ Please post CMakeCache.txt, CMakError.log and shell log. Please also get them from a fresh build from latest commit”