-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows missing unistd.h and getopt.h to build #4
Comments
I tryied adding the two header files from here and here to the root folder of the project, as /I.
/Ibazel-out/x64_windows-opt/bin
/Iexternal/local_config_tf /Ibazel-out/x64_windows-opt/bin/external/local_config_tf
/Iexternal/local_config_cuda /Ibazel-out/x64_windows-opt/bin/external/local_config_cuda
/Ibazel-out/x64_windows-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual
/Iexternal/local_config_tf/include
/Ibazel-out/x64_windows-opt/bin/external/local_config_tf/include
/Iexternal/local_config_cuda/cuda /Ibazel-out/x64_windows-opt/bin/external/local_config_cuda/cuda /Iexternal/local_config_cuda/cuda/cuda/include
/Ibazel-out/x64_windows-opt/bin/external/local_config_cuda/cuda/cuda/include I had to remove all typedefs and the defines for rand. When this is done, the compilation is successful, but bazel throws this error:
Anyone knows how to adapt the BUILD file to allow this? Or is the approach generally set up to fail? |
FIX: Editing this file: Instead, modify the source of the tensorflow library you are building against. For me, this is at: Open this file and remove After that, run bazel clean --expunge
bazel build --enable_runfiles build_pip_pkg --verbose_failures to start a clean rebuild. |
Build Setup:
19.26.28806
)I confirmed here that these fit together.
Preparations:
This repository includes the tensorflow/custom-op code with the two example ops replaced with the pyronn-layers following the steps described here. Additionally the fixes to the problems described in #1 and #2 were fixed. These changes are minimal and should not affect the build.
Running
configure.sh
creates this.bazelrc
for me:The error:
As this looks fine, I run
bazel build build_pip_pkg --verbose_failures
, which failes with this error:Possible origin:
The build process fails while compiling the file from the time_two example
/time_two_kernels.cu.o
. From the errorCannot open include file: 'unistd.h
, I recon that these are not included in the windows C++ standard libraries. A little bit of stackoverflow digging confirms this (see this thread). If I follow the advice from the thread and add a 'dummy'unistd.h
in one of the include folders, a similar error occurs forgetopt.h
.The text was updated successfully, but these errors were encountered: