Skip to content
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

Tensorflowlite 1.14: bazel windows build is broken #31118

Closed
ElderOrb opened this issue Jul 29, 2019 · 29 comments
Closed

Tensorflowlite 1.14: bazel windows build is broken #31118

ElderOrb opened this issue Jul 29, 2019 · 29 comments
Assignees
Labels
comp:lite TF Lite related issues subtype:bazel Bazel related Build_Installation issues subtype:windows Windows Build/Installation Issues TF 1.14 for issues seen with TF 1.14 type:build/install Build and install issues

Comments

@ElderOrb
Copy link

ElderOrb commented Jul 29, 2019

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Windows 10

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
n/a

TensorFlow installed from (source or binary):
Build from source

TensorFlow version:
r1.14, 456fbc0

Python version:
2.7.15

Installed using virtualenv? pip? conda?:
n/a

Bazel version (if compiling from source):
0.21.0

GCC/Compiler version (if compiling from source):
MSVC 2017

CUDA/cuDNN version:
n/a

GPU model and memory:
n/a

Describe the problem
Windows build of tensorflow lite fails.

Provide the exact sequence of commands / steps that you executed before running into the problem

$ bazel --output_user_root=D:\test\tensorflow_1.14.windows build  --jobs 1 -c opt --cxxopt=--std=c++11 //tensorflow/lite:libtensorflowlite.so

INFO: Repository 'flatbuffers' used the following cache hits instead of downloading the corresponding file.              
* Hash '3f4a286642094f45b1b77228656fbd7ea123964f19502f9ecfd29933fd23a50b' for http://mirror.tensorflow.org/github.com/google/flatbuffers/archive/v1.11.0.tar.gz                                                                                
If the definition of 'flatbuffers' was updated, verify that the hashes were also updated.                               
ERROR: An error occurred during the fetch of repository 'flatbuffers':                                                     
java.io.IOException: Could not create symlink from 
D:/test/tensorflow/third_party/flatbuffers/build_defs.bzl to 
D:/test/tensorflow_1.14.windows/s5ozolul/external/flatbuffers/build_defs.bzl: 
D:/test/tensorflow_1.14.windows/s5ozolul/external/flatbuffers/build_defs.bzl (File exists)                                                                             
ERROR: D:/test/tensorflow/tensorflow/lite/BUILD:149:1: //tensorflow/lite:framework depends on 
//tensorflow/lite/schema:schema_fbs in repository @ which failed to fetch. no such package 
'@flatbuffers//': java.io.IOException: Could not create symlink from 
D:/test/tensorflow/third_party/flatbuffers/build_defs.bzl to 
D:/test/tensorflow_1.14.windows/s5ozolul/external/flatbuffers/build_defs.bzl: 
D:/test/tensorflow_1.14.windows/s5ozolul/external/flatbuffers/build_defs.bzl (File exists)                                                                                                                     
ERROR: Analysis of target '//tensorflow/lite:libtensorflowlite.so' failed; build aborted: no such package 
'@flatbuffers//': java.io.IOException: Could not create symlink from 
D:/test/tensorflow/third_party/flatbuffers/build_defs.bzl to 
D:/test/tensorflow_1.14.windows/s5ozolul/external/flatbuffers/build_defs.bzl: 
D:/test/tensorflow_1.14.windows/s5ozolul/external/flatbuffers/build_defs.bzl (File exists)                                                                            
INFO: Elapsed time: 96.770s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (22 packages loaded, 98 targets configured)                                    
currently loading: tensorflow/lite/schema
@rmothukuru rmothukuru self-assigned this Jul 30, 2019
@rmothukuru rmothukuru added subtype:bazel Bazel related Build_Installation issues TF 1.14 for issues seen with TF 1.14 type:build/install Build and install issues subtype:windows Windows Build/Installation Issues comp:lite TF Lite related issues labels Jul 30, 2019
@rmothukuru
Copy link
Contributor

@ElderOrb ,
Can you please follow the instructions mentioned in this link and let us know if it helps.

@ElderOrb
Copy link
Author

I've tried that but it didn't help. Please note that I'm not doing windows => android cross-compilation. What I'm trying to get is windows build (dll or whatever).

Also, not sure why, maybe due to the latest changes in 1.14 branch now I see this error:

"D:\Test\tensorflow_1.14>bazel-0.20.0-windows-x86_64.exe --output_user_root D:\test\tensorflow_1.14-windows build --jobs 1 -c opt --cxxopt --std WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files: d:\test\tensorflow_1.14/.bazelrc Extracting Bazel installation... Starting local Bazel server and connecting to it... INFO: Invocation ID: 3928ae41-cf2a-4404-8fff-f3faa653acfd ERROR: D:/test/tensorflow_1.14-windows/sricgeud/external/io_bazel_rules_closure/closure/protobuf/closure_proto_library.bzl:66:21: name 'ProtoInfo' is not defined (did you mean 'protos'?) ERROR: error loading package '': in D:/test/tensorflow_1.14-windows/sricgeud/external/io_bazel_rules_closure/closure/defs.bzl: Extension 'closure/protobuf/closure_proto_library.bzl' has errors ERROR: error loading package '': in D:/test/tensorflow_1.14-windows/sricgeud/external/io_bazel_rules_closure/closure/defs.bzl: Extension 'closure/protobuf/closure_proto_library.bzl' has errors
INFO: Elapsed time: 10.338s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded)
"

Is there any working guide on bazel build for tensorflowlite 1.14 for windows?

@rmothukuru rmothukuru assigned aselle and unassigned rmothukuru Aug 1, 2019
@rmothukuru rmothukuru added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Aug 1, 2019
@Huangswust182
Copy link

@ElderOrb Have you implemented. / configure yet?

@ElderOrb
Copy link
Author

ElderOrb commented Aug 8, 2019

No, I stopped wasting time on this and still hope the issue will be fixed.

@mihaimaruseac
Copy link
Collaborator

I think you're using a bazel that is too old

@tensorflowbutler tensorflowbutler removed the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Aug 9, 2019
@Huangswust182
Copy link

@ElderOrb I mean to execute the “. / configure” instruction first and then continue compiling,and I didn't report this mistake after I implemented it.

@ElderOrb
Copy link
Author

ElderOrb commented Aug 9, 2019

@mihaimaruseac
which bazel version is recommended to use with windows?

@Huangswust182
Okay, I'll try with ./configure then (although on linux it builds with no need in configuring)

@mihaimaruseac
Copy link
Collaborator

./configure set-ups several bazel config options as well as checking out that you have a bazel version that is in the range of those we tested with.

See https://www.tensorflow.org/install/source_windows#tested_build_configurations for the exact configurations we have used when building.

@ElderOrb
Copy link
Author

ElderOrb commented Aug 10, 2019

@mihaimaruseac I followed link and found this:

Install Bazel 0.24.1

... and then after couple lines:

Ensure you install Bazel 0.23.0 or lower.

So what is the right version?

@ElderOrb
Copy link
Author

ElderOrb commented Aug 10, 2019

Anyway, just tried with 0.24.1 and 'configure.py':

D:\Test\tf_1.14>bazel --output_user_root=../tf_1.14-windows-build build --jobs 1 -c opt --cxxopt=--std=c++11 //tensorflow/lite:libtensorflowlite.so

Extracting Bazel installation... Starting local Bazel server and connecting to it... INFO: Repository 'flatbuffers' used the following cache hits instead of downloading the corresponding file. * Hash '3f4a286642094f45b1b77228656fbd7ea123964f19502f9ecfd29933fd23a50b' for http://mirror.tensorflow.org/github.com/google/flatbuffers/archive/v1.11.0.tar.gz If the definition of 'flatbuffers' was updated, verify that the hashes were also updated. ERROR: D:/test/tf_1.14/tensorflow/lite/kernels/BUILD:286:1: no such package '@flatbuffers//': java.io.IOException: Could not create symlink from D:/test/tf_1.14/third_party/flatbuffers/build_defs.bzl to D:/test/tf_1.14-windows-build/dutqtkj7/external/flatbuffers/build_defs.bzl: D:/test/tf_1.14-windows-build/dutqtkj7/external/flatbuffers/build_defs.bzl (File exists) and referenced by '//tensorflow/lite/kernels:builtin_op_kernels' ERROR: Analysis of target '//tensorflow/lite:libtensorflowlite.so' failed; build aborted: no such package '@flatbuffers//': java.io.IOException: Could not create symlink from D:/test/tf_1.14/third_party/flatbuffers/build_defs.bzl to D:/test/tf_1.14-windows-build/dutqtkj7/external/flatbuffers/build_defs.bzl: D:/test/tf_1.14-windows-build/dutqtkj7/external/flatbuffers/build_defs.bzl (File exists) INFO: Elapsed time: 43.454s INFO: 0 processes. FAILED: Build did NOT complete successfully (18 packages loaded, 81 targets configured) currently loading: tensorflow/lite/schema

@ElderOrb
Copy link
Author

Also tried with bazel 0.25.2 (latest supported based on configure.py output) and got this:

D:\Test\tf_1.14>configure.py
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
You have bazel 0.25.2 installed.
Please specify the location of python. [Default is C:\Python37\python.exe]:

Found possible Python library paths:
C:\Python37\lib\site-packages
Please input the desired Python library path to use. Default is [C:\Python37\lib\site-packages]

Do you wish to build TensorFlow with XLA JIT support? [y/N]:
No XLA JIT support will be enabled for TensorFlow.

Do you wish to build TensorFlow with ROCm support? [y/N]:
No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]:
No CUDA support will be enabled for TensorFlow.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is /arch:AVX]:

Would you like to override eigen strong inline for some C++ compilation to reduce the compilation time? [Y/n]:
Eigen strong inline overridden.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
--config=mkl # Build with MKL support.
--config=monolithic # Config for mostly static monolithic build.
--config=gdr # Build with GDR support.
--config=verbs # Build with libverbs support.
--config=ngraph # Build with Intel nGraph support.
--config=numa # Build with NUMA support.
--config=dynamic_kernels # (Experimental) Build kernels into separate shared objects.
Preconfigured Bazel build configs to DISABLE default on features:
--config=noaws # Disable AWS S3 filesystem support.
--config=nogcp # Disable GCP support.
--config=nohdfs # Disable HDFS support.
--config=noignite # Disable Apache Ignite support.
--config=nokafka # Disable Apache Kafka support.
--config=nonccl # Disable NVIDIA NCCL support.

D:\Test\tf_1.14>bazel --output_user_root=../tf_1.14-windows-build build --jobs 1 -c opt --cxxopt=--std=c++11 //tensorflow/lite:libtensorflowlite.so
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: An error occurred during the fetch of repository 'local_config_cc'
INFO: Call stack for the definition of repository 'local_config_cc':

  • D:/test/tf_1.14-windows-build/dutqtkj7/external/bazel_tools/tools/cpp/cc_configure.bzl:97:5
  • /DEFAULT.WORKSPACE.SUFFIX:246:1
    ERROR: no such package '@local_config_cc//': Traceback (most recent call last):
    File "D:/test/tf_1.14-windows-build/dutqtkj7/external/bazel_tools/tools/cpp/cc_configure.bzl", line 52
    configure_windows_toolchain(repository_ctx)
    File "D:/test/tf_1.14-windows-build/dutqtkj7/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 349, in configure_windows_toolchain
    _find_missing_vc_tools(repository_ctx, vc_path)
    File "D:/test/tf_1.14-windows-build/dutqtkj7/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 248, in _find_missing_vc_tools
    _find_vcvarsall_bat_script(repository_ctx, vc_path)
    File "D:/test/tf_1.14-windows-build/dutqtkj7/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 191, in _find_vcvarsall_bat_script
    repository_ctx.path(vcvarsall).exists
    Illegal char <> at index 64: D:/test/tf_1.14-windows-build/dutqtkj7/external/local_config_cc/*********************************************************************
    ** Visual Studio 2017 Developer Command Prompt v15.9.12
    ** Copyright (c) 2017 Microsoft Corporation

[ERROR:typescript.bat] TypeScript was not added to PATH since a valid installation was not found
[ERROR:VsDevCmd.bat] *** VsDevCmd.bat encountered errors. Environment may be incomplete and/or incorrect. ***
[ERROR:VsDevCmd.bat] In an uninitialized command prompt, please 'set VSCMD_DEBUG=[value]' and then re-run
[ERROR:VsDevCmd.bat] vsdevcmd.bat [args] for additional details.
[ERROR:VsDevCmd.bat] Where [value] is:
[ERROR:VsDevCmd.bat] 1 : basic debug logging
[ERROR:VsDevCmd.bat] 2 : detailed debug logging
[ERROR:VsDevCmd.bat] 3 : trace level logging. Redirection of output to a file when using this level is recommended.
[ERROR:VsDevCmd.bat] Example: set VSCMD_DEBUG=3
[ERROR:VsDevCmd.bat] vsdevcmd.bat > vsdevcmd.trace.txt 2>&1
C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/VCVARSALL.BAT
ERROR: Analysis of target '//tensorflow/lite:libtensorflowlite.so' failed; build aborted: no such package '@local_config_cc//': Traceback (most recent call last):
File "D:/test/tf_1.14-windows-build/dutqtkj7/external/bazel_tools/tools/cpp/cc_configure.bzl", line 52
configure_windows_toolchain(repository_ctx)
File "D:/test/tf_1.14-windows-build/dutqtkj7/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 349, in configure_windows_toolchain
_find_missing_vc_tools(repository_ctx, vc_path)
File "D:/test/tf_1.14-windows-build/dutqtkj7/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 248, in _find_missing_vc_tools
_find_vcvarsall_bat_script(repository_ctx, vc_path)
File "D:/test/tf_1.14-windows-build/dutqtkj7/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 191, in _find_vcvarsall_bat_script
repository_ctx.path(vcvarsall).exists
Illegal char <> at index 64: D:/test/tf_1.14-windows-build/dutqtkj7/external/local_config_cc/*********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.12
** Copyright (c) 2017 Microsoft Corporation


[ERROR:typescript.bat] TypeScript was not added to PATH since a valid installation was not found
[ERROR:VsDevCmd.bat] *** VsDevCmd.bat encountered errors. Environment may be incomplete and/or incorrect. ***
[ERROR:VsDevCmd.bat] In an uninitialized command prompt, please 'set VSCMD_DEBUG=[value]' and then re-run
[ERROR:VsDevCmd.bat] vsdevcmd.bat [args] for additional details.
[ERROR:VsDevCmd.bat] Where [value] is:
[ERROR:VsDevCmd.bat] 1 : basic debug logging
[ERROR:VsDevCmd.bat] 2 : detailed debug logging
[ERROR:VsDevCmd.bat] 3 : trace level logging. Redirection of output to a file when using this level is recommended.
[ERROR:VsDevCmd.bat] Example: set VSCMD_DEBUG=3
[ERROR:VsDevCmd.bat] vsdevcmd.bat > vsdevcmd.trace.txt 2>&1
C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/VCVARSALL.BAT
INFO: Elapsed time: 37.323s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (7 packages loaded, 25 targets configured)

@ElderOrb
Copy link
Author

any progress here?

@mihaimaruseac
Copy link
Collaborator

Can you try with master instead of 1.14?

Seems 1.14 is badly broken

@ElderOrb
Copy link
Author

On the latest master (c022a58) I see this:

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.12
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>D:

D:\>cd test\tensorflow

D:\test\tensorflow>python configure.py
Cannot find bazel. Please install bazel.

D:\test\tensorflow>bazel version
Starting local Bazel server and connecting to it...
Build label: 0.24.1
Build target: bazel-out/x64_windows-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Apr 2 16:30:30 2019 (1554222630)
Build timestamp: 1554222630
Build timestamp as int: 1554222630

D:\test\tensorflow>python configure.py
WARNING: Running Bazel server needs to be killed, because the startup options are different.
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
You have bazel 0.24.1 installed.
Please specify the location of python. [Default is C:\Python27\python.exe]:


Found possible Python library paths:
  C:\Python27\lib\site-packages
Please input the desired Python library path to use.  Default is [C:\Python27\lib\site-packages]

Do you wish to build TensorFlow with XLA JIT support? [y/N]:
No XLA JIT support will be enabled for TensorFlow.

Do you wish to build TensorFlow with ROCm support? [y/N]:
No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]:
No CUDA support will be enabled for TensorFlow.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is /arch:AVX]:


Would you like to override eigen strong inline for some C++ compilation to reduce the compilation time? [Y/n]:
Eigen strong inline overridden.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
        --config=mkl            # Build with MKL support.
        --config=monolithic     # Config for mostly static monolithic build.
        --config=gdr            # Build with GDR support.
        --config=verbs          # Build with libverbs support.
        --config=ngraph         # Build with Intel nGraph support.
        --config=numa           # Build with NUMA support.
        --config=dynamic_kernels        # (Experimental) Build kernels into separate shared objects.
        --config=v2             # Build TensorFlow 2.x instead of 1.x.
Preconfigured Bazel build configs to DISABLE default on features:
        --config=noaws          # Disable AWS S3 filesystem support.
        --config=nogcp          # Disable GCP support.
        --config=nohdfs         # Disable HDFS support.
        --config=noignite       # Disable Apache Ignite support.
        --config=nokafka        # Disable Apache Kafka support.
        --config=nonccl         # Disable NVIDIA NCCL support.

D:\test\tensorflow>bazel --output_user_root=D:\test\tensorflow.windows build --jobs 1 -c opt --cxxopt=--std=c++11 //tensorflow/lite:libtensorflowlite.so
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=120
INFO: Options provided by the client:
  'build' options: --python_path=C:/Python27/python.exe
INFO: Reading rc options for 'build' from d:\test\tensorflow\.bazelrc:
  'build' options: --apple_platform_type=macos --define framework_shared_object=true --define open_source_build=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone --strategy=Genrule=standalone -c opt --announce_rc --define=grpc_no_ares=true --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include
INFO: Reading rc options for 'build' from d:\test\tensorflow\.tf_configure.bazelrc:
  'build' options: --host_force_python=PY2 --action_env PYTHON_BIN_PATH=C:/Python27/python.exe --action_env PYTHON_LIB_PATH=C:/Python27/lib/site-packages --python_path=C:/Python27/python.exe --config monolithic --copt=-w --host_copt=-w --copt=-DWIN32_LEAN_AND_MEAN --host_copt=-DWIN32_LEAN_AND_MEAN --copt=-DNOGDI --host_copt=-DNOGDI --verbose_failures --distinct_host_configuration=false --define=override_eigen_strong_inline=true --action_env TF_CONFIGURE_IOS=0
INFO: Found applicable config definition build:monolithic in file d:\test\tensorflow\.bazelrc: --define framework_shared_object=false
ERROR: error loading package '': Encountered error while reading extension file 'repositories/repositories.bzl': no such package '@io_bazel_rules_docker//repositories': Traceback (most recent call last):
        File "D:/test/tensorflow.windows/s5ozolul/external/bazel_tools/tools/build_defs/repo/git.bzl", line 164
                _clone_or_update(ctx)
        File "D:/test/tensorflow.windows/s5ozolul/external/bazel_tools/tools/build_defs/repo/git.bzl", line 74, in _clone_or_update
                fail(("error cloning %s:\n%s" % (ctx....)))
error cloning io_bazel_rules_docker:
+ cd D:/test/tensorflow.windows/s5ozolul/external
+ rm -rf D:/test/tensorflow.windows/s5ozolul/external/io_bazel_rules_docker D:/test/tensorflow.windows/s5ozolul/external/io_bazel_rules_docker
/usr/bin/bash: line 5: rm: command not found
ERROR: error loading package '': Encountered error while reading extension file 'repositories/repositories.bzl': no such package '@io_bazel_rules_docker//repositories': Traceback (most recent call last):
        File "D:/test/tensorflow.windows/s5ozolul/external/bazel_tools/tools/build_defs/repo/git.bzl", line 164
                _clone_or_update(ctx)
        File "D:/test/tensorflow.windows/s5ozolul/external/bazel_tools/tools/build_defs/repo/git.bzl", line 74, in _clone_or_update
                fail(("error cloning %s:\n%s" % (ctx....)))
error cloning io_bazel_rules_docker:
+ cd D:/test/tensorflow.windows/s5ozolul/external
+ rm -rf D:/test/tensorflow.windows/s5ozolul/external/io_bazel_rules_docker D:/test/tensorflow.windows/s5ozolul/external/io_bazel_rules_docker
/usr/bin/bash: line 5: rm: command not found
INFO: Elapsed time: 16.367s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

@ElderOrb
Copy link
Author

Is it possible to add tensorflowlite for windows to CI?

@ElderOrb
Copy link
Author

No solution still?

@EricChenC
Copy link

I have same problem!

@mihaimaruseac
Copy link
Collaborator

Please watch #31601, most likely after that PR is merged this issue can be solved.

I estimate one more week at most until solution.

@tigert1998
Copy link
Contributor

I constantly run accross the bug. It's really annoying. It has nothing to do with my code since usually after several docker restarting or code recompiling, it works again.

@ElderOrb
Copy link
Author

ElderOrb commented Dec 4, 2019

@mihaimaruseac I guess the issue still here? Any ETA on fixing it finally?

@daihuidai
Copy link

I have same problem!I'm so tired!!!

@mihaimaruseac
Copy link
Collaborator

As TF 1.14 is in a very bad state, I would recommend trying 1.15 or 2.0 or 2.1

@ElderOrb
Copy link
Author

D:\test\tensorflow-r1.15>bazel --output_user_root=..\tensorflow_1.15.windows build --jobs 1 -c opt --cxxopt=--std=c++11 //tensorflow/lite:libtensorflowlite.so Extracting Bazel installation... Starting local Bazel server and connecting to it... INFO: Options provided by the client: Inherited 'common' options: --isatty=1 --terminal_columns=211 INFO: Options provided by the client: 'build' options: --python_path=C:/Python27/python.exe INFO: Reading rc options for 'build' from d:\test\tensorflow-r1.15.bazelrc: 'build' options: --apple_platform_type=macos --define framework_shared_object=true --define open_source_build=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone --strategy=Genrule=standalone -c opt --announce_rc --define=grpc_no_ares=true --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include ERROR: error loading package '': Encountered error while reading extension file 'repositories/repositories.bzl': no such package '@io_bazel_rules_docker//repositories': Traceback (most recent call last): File "D:/test/tensorflow_1.15.windows/pmsk6zot/external/bazel_tools/tools/build_defs/repo/git.bzl", line 164 _clone_or_update(ctx) File "D:/test/tensorflow_1.15.windows/pmsk6zot/external/bazel_tools/tools/build_defs/repo/git.bzl", line 74, in _clone_or_update fail(("error cloning %s:\n%s" % (ctx....))) error cloning io_bazel_rules_docker: + cd D:/test/tensorflow_1.15.windows/pmsk6zot/external + rm -rf D:/test/tensorflow_1.15.windows/pmsk6zot/external/io_bazel_rules_docker D:/test/tensorflow_1.15.windows/pmsk6zot/external/io_bazel_rules_docker /usr/bin/bash: line 5: rm: command not found ERROR: error loading package '': Encountered error while reading extension file 'repositories/repositories.bzl': no such package '@io_bazel_rules_docker//repositories': Traceback (most recent call last): File "D:/test/tensorflow_1.15.windows/pmsk6zot/external/bazel_tools/tools/build_defs/repo/git.bzl", line 164 _clone_or_update(ctx) File "D:/test/tensorflow_1.15.windows/pmsk6zot/external/bazel_tools/tools/build_defs/repo/git.bzl", line 74, in _clone_or_update fail(("error cloning %s:\n%s" % (ctx....))) error cloning io_bazel_rules_docker: + cd D:/test/tensorflow_1.15.windows/pmsk6zot/external + rm -rf D:/test/tensorflow_1.15.windows/pmsk6zot/external/io_bazel_rules_docker D:/test/tensorflow_1.15.windows/pmsk6zot/external/io_bazel_rules_docker /usr/bin/bash: line 5: rm: command not found INFO: Elapsed time: 16.173s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded)

@mihaimaruseac
Copy link
Collaborator

mihaimaruseac commented Jan 15, 2020

Error is rm: command not found. rm is a Linux command, available under Windows via WSL, MinGW or other similar approaches.

Din you run configure.py?

Also, please use ``` around code blocks and errors so that they are readable.

@ElderOrb
Copy link
Author

ElderOrb commented Jan 15, 2020

Run configure.cmd (which calls configure.py), the error is pretty the same:

Microsoft` Windows [Version 10.0.18363.535]
(c) 2019 Microsoft Corporation. All rights reserved.

D:\test\tensorflow-r1.15>configure
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
You have bazel 0.24.1 installed.
Please specify the location of python. [Default is C:\Python27\python.exe]:


Found possible Python library paths:
  C:\Python27\lib\site-packages
Please input the desired Python library path to use.  Default is [C:\Python27\lib\site-packages]

Do you wish to build TensorFlow with XLA JIT support? [y/N]:
No XLA JIT support will be enabled for TensorFlow.

Do you wish to build TensorFlow with ROCm support? [y/N]:
No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]:
No CUDA support will be enabled for TensorFlow.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is /arch:AVX]:


Would you like to override eigen strong inline for some C++ compilation to reduce the compilation time? [Y/n]:
Eigen strong inline overridden.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
        --config=mkl            # Build with MKL support.
        --config=monolithic     # Config for mostly static monolithic build.
        --config=gdr            # Build with GDR support.
        --config=verbs          # Build with libverbs support.
        --config=ngraph         # Build with Intel nGraph support.
        --config=numa           # Build with NUMA support.
        --config=dynamic_kernels        # (Experimental) Build kernels into separate shared objects.
        --config=v2             # Build TensorFlow 2.x instead of 1.x.
Preconfigured Bazel build configs to DISABLE default on features:
        --config=noaws          # Disable AWS S3 filesystem support.
        --config=nogcp          # Disable GCP support.
        --config=nohdfs         # Disable HDFS support.
        --config=noignite       # Disable Apache Ignite support.
        --config=nokafka        # Disable Apache Kafka support.
        --config=nonccl         # Disable NVIDIA NCCL support.
Configuration finished

D:\test\tensorflow-r1.15>bazel --output_user_root=..\tensorflow_1.15.windows.build build --jobs 1 -c opt --cxxopt=--std=c++11 //tensorflow/lite:libtensorflowlite.so
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=120
INFO: Options provided by the client:
  'build' options: --python_path=C:/Python27/python.exe
INFO: Reading rc options for 'build' from d:\test\tensorflow-r1.15\.bazelrc:
  'build' options: --apple_platform_type=macos --define framework_shared_object=true --define open_source_build=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone --strategy=Genrule=standalone -c opt --announce_rc --define=grpc_no_ares=true --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include
INFO: Reading rc options for 'build' from d:\test\tensorflow-r1.15\.tf_configure.bazelrc:
  'build' options: --host_force_python=PY2 --action_env PYTHON_BIN_PATH=C:/Python27/python.exe --action_env PYTHON_LIB_PATH=C:/Python27/lib/site-packages --python_path=C:/Python27/python.exe --config monolithic --copt=-w --host_copt=-w --copt=-DWIN32_LEAN_AND_MEAN --host_copt=-DWIN32_LEAN_AND_MEAN --copt=-DNOGDI --host_copt=-DNOGDI --verbose_failures --distinct_host_configuration=false --define=override_eigen_strong_inline=true --action_env TF_CONFIGURE_IOS=0
INFO: Found applicable config definition build:monolithic in file d:\test\tensorflow-r1.15\.bazelrc: --define framework_shared_object=false
ERROR: error loading package '': Encountered error while reading extension file 'repositories/repositories.bzl': no such package '@io_bazel_rules_docker//repositories': Traceback (most recent call last):
        File "D:/test/tensorflow_1.15.windows.build/pmsk6zot/external/bazel_tools/tools/build_defs/repo/git.bzl", line 164
                _clone_or_update(ctx)
        File "D:/test/tensorflow_1.15.windows.build/pmsk6zot/external/bazel_tools/tools/build_defs/repo/git.bzl", line 74, in _clone_or_update
                fail(("error cloning %s:\n%s" % (ctx....)))
error cloning io_bazel_rules_docker:
+ cd D:/test/tensorflow_1.15.windows.build/pmsk6zot/external
+ rm -rf D:/test/tensorflow_1.15.windows.build/pmsk6zot/external/io_bazel_rules_docker D:/test/tensorflow_1.15.windows.build/pmsk6zot/external/io_bazel_rules_docker
/usr/bin/bash: line 5: rm: command not found
ERROR: error loading package '': Encountered error while reading extension file 'repositories/repositories.bzl': no such package '@io_bazel_rules_docker//repositories': Traceback (most recent call last):
        File "D:/test/tensorflow_1.15.windows.build/pmsk6zot/external/bazel_tools/tools/build_defs/repo/git.bzl", line 164
                _clone_or_update(ctx)
        File "D:/test/tensorflow_1.15.windows.build/pmsk6zot/external/bazel_tools/tools/build_defs/repo/git.bzl", line 74, in _clone_or_update
                fail(("error cloning %s:\n%s" % (ctx....)))
error cloning io_bazel_rules_docker:
+ cd D:/test/tensorflow_1.15.windows.build/pmsk6zot/external
+ rm -rf D:/test/tensorflow_1.15.windows.build/pmsk6zot/external/io_bazel_rules_docker D:/test/tensorflow_1.15.windows.build/pmsk6zot/external/io_bazel_rules_docker
/usr/bin/bash: line 5: rm: command not found
INFO: Elapsed time: 16.673s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

D:\test\tensorflow-r1.15>

@ElderOrb
Copy link
Author

Does it mean I should you wsl for building for windows?

@mihaimaruseac
Copy link
Collaborator

@tensorflowbutler
Copy link
Member

Hi There,

We are checking to see if you still need help on this, as you are using an older version of tensorflow which is officially considered end of life . We recommend that you upgrade to the latest 2.x version and let us know if the issue still persists in newer versions. Please open a new issue for any help you need against 2.x, and we will get you the right help.

This issue will be closed automatically 7 days from now. If you still need help with this issue, please provide us with more information.

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:lite TF Lite related issues subtype:bazel Bazel related Build_Installation issues subtype:windows Windows Build/Installation Issues TF 1.14 for issues seen with TF 1.14 type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

9 participants