fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory

asked 2020-06-30 02:48:43 -0500

updated 2020-06-30 06:05:01 -0500

supra56 gravatar image

I am trying to build OpenCV for ARM64 on Windows 10 machine, I run the cmake GUI and choose ARM64 target, but it failed to generate final project when clicking the generate button. The error is:

 cl /c /Zi /W3 /WX- /diagnostics:column /MP /Od /Ob0 /Oi /Oy- /D WIN32 /D _WINDOWS /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /D "CMAKE_INTDIR=\"Debug\"" /D _ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1 /D _MBCS /Gm- /RTC1 /MDd /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_fe697.dir\Debug\\" /Fd"cmTC_fe697.dir\Debug\vc142.pdb" /Gd /TC /analyze- /errorReport:queue  /bigobj D:\SRC\opencv\ARM64\CMakeFiles\CMakeTmp\CheckIncludeFile.c

D:\SRC\opencv\ARM64\CMakeFiles\CMak eTmp\CheckIncludeFile.c(1,10): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [D:\SRC\opencv\ARM64\CMakeFiles\CMakeTmp\cmTC_fe697.vcxproj]
edit retag flag offensive close merge delete

Comments

Hmm hard to tell anything but the obvious thing is that the header filer "pthread.h" can not be found. As i understand things - cmake will create the visual studio project files and configure them properly.

Please check the configured include directories in you visual studio file. It must include a directory where the file "pthread.h" can be found

holger gravatar imageholger ( 2020-06-30 05:45:33 -0500 )edit

Here is link pthread.h And this too this too

supra56 gravatar imagesupra56 ( 2020-06-30 06:40:33 -0500 )edit

Oh this means you need to install some 3rd party software which will contain the header file? Maybe opencv cannot ship it because of license issues? At least some other people do ship it with the source like here https://github.com/AlexeyAB/darknet/t...

holger gravatar imageholger ( 2020-06-30 08:08:01 -0500 )edit
1

VS usually does not come with pthreads (they got their own concurrency)

also the sourceware link won't work, it's needed for arm64 (cross compiling)

which VS version is it ? (... i mean, there must be a way to do this, no ?)

berak gravatar imageberak ( 2020-06-30 08:54:00 -0500 )edit