Building from source in windows10 error


#1

When I build from source in win10 with cmake, it always with following errors:

D:\github\incubator-mxnet\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: 无法打开包括文件: “pthread.h”: No such file or directory [D:\github\incubator-mxnet\build\CMakeFiles\CMakeTmp\cmTC_05d6c.vcxproj]

is the question for no pthread in windows? and how to fix it?

my enviroument is
cmake 3.6.5
vs2015
mxnet latest in master

I add pthread in vc14 folder manually, but still can’t find pthread.h


#2

Disclaimer: I am not a windows build expert

I would suggest that look at the Jenkins CI builds, that successfully build on windows for CPU and GPU. Try to see what you do differently.

For example check this: http://jenkins.mxnet-ci.amazon-ml.com/blue/organizations/jenkins/incubator-mxnet/detail/PR-10959/12/pipeline/66

For the CPU build, it uses this command line for example for generating the build script:
cmake -G "Visual Studio 14 2015 Win64" -DUSE_CUDA=0 -DUSE_CUDNN=0 -DUSE_NVRTC=0 -DUSE_OPENCV=1 -DUSE_OPENMP=1 -DUSE_PROFILER=1 -DUSE_BLAS=open -DUSE_LAPACK=1 -DUSE_DIST_KVSTORE=0 -DUSE_MKL_IF_AVAILABLE=0 C:/jenkins_slave/workspace/build-cpu


#3

Thanks Thomas, compile mxnet in windows is ok, it’s just can’t compile with use_cpp_package.