custom-op
custom-op copied to clipboard
Build on Windows [fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory]
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
- TensorFlow version: 2.1
- Python version: 3.6
- Bazel version (if compiling from source): 3.7.0
- CUDA/cuDNN version: CUDA: v10.1.243 / cuDNN: 7.6.5
Describe the problem
I encountered 'unistd.h': No such file or directory building custom-op on Windows.
There is a similar post with workaround: @Runinho in https://github.com/tensorflow/custom-op/issues/26#issuecomment-672343209
But I still don't understand how to fix it. Any help or advice?
Provide the exact sequence of commands / steps that you executed before running into the problem
- git clone custom-op from github
- replace python3 with python in configure.sh
- Run
./configure.sh
Do you want to build ops again TensorFlow CPU pip package? Y or enter for CPU (tensorflow-cpu), N for GPU (tensorflow). [Y/n] N
Build with GPU pip package.
On windows, skipping toolchain flags..
Are you building against TensorFlow 2.1(including RCs) or newer?[Y/n] Y
Build against TensorFlow 2.1 or newer.
Using installed tensorflow
2020-11-09 17:19:16.862422: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
2020-11-09 17:19:25.421403: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
- Run
bazel build build_pip_pkg
bazel-out/x64_windows-opt/bin/external/local_config_tf/include\unsupported/Eigen/CXX11/Tensor(74): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
Target //:build_pip_pkg failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 162.913s, Critical Path: 129.03s
INFO: 1101 processes: 1096 internal, 5 local.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
Detailed messages: error_messages_20201109.txt