Issue in building Tensorboard 1.13.1 from source (cfg must be either 'host' or 'target') - tensorboard

I am trying to build Tensorboard (1.13.1) from source. I am using Bazel version 0.26.0 (built from source) and JDK version 11.0.3. I am getting following error during build:
# bazel build --incompatible_disallow_filetype=false --incompatible_bzl_disallow_load_after_statement=false tensorboard
Starting local Bazel server and connecting to it...
ERROR: /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/compiler/closure_js_library.bzl:343:17: Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/compiler/closure_js_library.bzl", line 335
rule(implementation = _closure_js_lib..., <2 more arguments>)
File "/root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/compiler/closure_js_library.bzl", line 343, in rule
attr.label_list(cfg = "data", allow_files = True)
cfg must be either 'host' or 'target'.
ERROR: error loading package '': in /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/defs.bzl: Extension file 'closure/compiler/closure_js_library.bzl' has errors
ERROR: error loading package '': in /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/defs.bzl: Extension file 'closure/compiler/closure_js_library.bzl' has errors
INFO: Elapsed time: 14.290s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
If I search and replace the word 'data' with 'host' from .bzl files, I start getting another error:
# bazel build --incompatible_disallow_filetype=false --incompatible_bzl_disallow_load_after_statement=false tensorboard
ERROR: error loading package '': in /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/org_tensorflow/tensorflow/workspace.bzl: Label '#org_tensorflow//third_party:nccl/nccl_configure.bzl' crosses boundary of subpackage '#org_tensorflow//third_party/nccl' (perhaps you meant to put the colon here: '#org_tensorflow//third_party/nccl:nccl_configure.bzl'?)
ERROR: error loading package '': in /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/org_tensorflow/tensorflow/workspace.bzl: Label '#org_tensorflow//third_party:nccl/nccl_configure.bzl' crosses boundary of subpackage '#org_tensorflow//third_party/nccl' (perhaps you meant to put the colon here: '#org_tensorflow//third_party/nccl:nccl_configure.bzl'?)
INFO: Elapsed time: 15.377s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
Correcting the error by replacing,
load("//third_party:nccl/nccl_configure.bzl", "nccl_configure")
by
load("//third_party/nccl:nccl_configure.bzl", "nccl_configure")
in the cache file,
/root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/org_tensorflow/tensorflow/workspace.bzl
Solves the error but now getting this error:
# bazel build --incompatible_disallow_filetype=false --incompatible_bzl_disallow_load_after_statement=false tensorboard
ERROR: /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/org_tensorflow/tensorflow/workspace.bzl:18:1: file '#io_bazel_rules_closure//closure:defs.bzl' does not contain symbol 'filegroup_external'
ERROR: error loading package '': Extension file 'tensorflow/workspace.bzl' has errors
ERROR: error loading package '': Extension file 'tensorflow/workspace.bzl' has errors
INFO: Elapsed time: 1.113s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
Now I am stuck. Any pointers highly appreciated!

Related

Mediapipe "The system cannot find the file specified" While Trying to Run the Hello World During Installation

I'm installing Mediapipe on Windows 10 for c++ and I'm %90 sure I've set up everything correctly. I'm following the guide here: https://google.github.io/mediapipe/getting_started/install.html#installing-on-windows
Here's the output I'm getting:
DEBUG: Rule 'rules_foreign_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "c2cdcf55ffaf49366725639e45dedd449b8c3fe22b54e31625eb80ce3a240f1e"
DEBUG: Repository rules_foreign_cc instantiated at:
D:/mediapipe/WORKSPACE:43:13: in <toplevel>
Repository rule http_archive defined at:
C:/users/dillo/_bazel_dillo/hr7sucjp/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in <toplevel>
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'com_google_absl' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'com_google_benchmark' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'pybind11_bazel' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'com_google_protobuf' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'com_google_googletest' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'build_bazel_apple_support' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'xctestrunner' because it already exists.
DEBUG: C:/users/dillo/_bazel_dillo/hr7sucjp/external/org_tensorflow/third_party/repo.bzl:124:14:
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "691a29db9c336349e48e04c5c2f4873f2890af5cbfa6e51f4de87fefe6169294"
DEBUG: Repository rules_cc instantiated at:
D:/mediapipe/WORKSPACE:36:13: in <toplevel>
Repository rule http_archive defined at:
C:/users/dillo/_bazel_dillo/hr7sucjp/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in <toplevel>
WARNING: D:/mediapipe/mediapipe/framework/BUILD:54:24: in cc_library rule //mediapipe/framework:calculator_cc_proto: target '//mediapipe/framework:calculator_cc_proto' depends on deprecated target '#com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
WARNING: D:/mediapipe/mediapipe/framework/tool/BUILD:184:24: in cc_library rule //mediapipe/framework/tool:field_data_cc_proto: target '//mediapipe/framework/tool:field_data_cc_proto' depends on deprecated target '#com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
INFO: Analyzed target //mediapipe/examples/desktop/hello_world:hello_world (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: C:/users/dillo/_bazel_dillo/hr7sucjp/external/com_github_gflags_gflags/BUILD:16:30: Executing genrule #com_github_gflags_gflags//:gflags_completions_h failed: (Exit -1): bash.exe failed: error executing command (from target #com_github_gflags_gflags//:gflags_completions_h) c:\tools\msys64\usr\bin\bash.exe -c ... (remaining 1 argument skipped)
Action failed to execute: java.io.IOException: ERROR: src/main/native/windows/process.cc(202): CreateProcessW("c:\tools\msys64\usr\bin\bash.exe" -c "source external/bazel_tools/tools/genrule/genrule-setup.sh; awk '{ gsub(/#GFLAGS_NAMESPACE#/, \"gflags\"); print; }' external/com_github_gflags_gflags/src/gflags_completions.h.in > bazel-out/x64_windows-opt/bin/external/com_github_gflags_gflags/gflags_completions.h"): The system cannot find the file specified.
(error: 2)
Target //mediapipe/examples/desktop/hello_world:hello_world failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 77.898s, Critical Path: 77.44s
INFO: 209 processes: 128 internal, 81 local.
FAILED: Build did NOT complete successfully
I've completely reinstalled Python and I've made sure to set up my path variables, can anyone tell me what the issue is?
Thanks to #kiner_shah for pointing out what the error was:
If you are getting this error it's because mediapipe is trying to access the msys folder at the wrong location, so all you have to do is make it the right location. I moved my mysys2 folder from D:/mysys2, to the path that was showing the error: "c:\tools\msys64\usr\bin\bash.exe" by making a tools folder in c:, renaming mysys2 to msys64, then moving that folder to the previously created tools folder.

Building gRPC C++ from source

I am trying to build gRPC c++ from source from Build gRPC C++
I have already installed bazel.
Though when I tried to build I am seeing following error.
$ bazel build :all
Starting local Bazel server and connecting to it...
ERROR: /home/bigz/.cache/bazel/_bazel_bigz/a68d37101a3d172c639dd67a1941f719/external/io_bazel_rules_python/python/pip.bzl:39:25: Traceback (most recent
call last):
File "/home/bigz/.cache/bazel/_bazel_bigz/a68d37101a3d172c639dd67a1941f719/external/io_bazel_rules_python/python/pip.bzl", line 37
repository_rule(<2 more arguments>)
File "/home/bigz/.cache/bazel/_bazel_bigz/a68d37101a3d172c639dd67a1941f719/external/io_bazel_rules_python/python/pip.bzl", line 39, in repositor
y_rule
attr.label(allow_files = True, <2 more arguments>)
'single_file' is no longer supported. use allow_single_file instead. You can use --incompatible_disable_deprecated_attr_params=false to temporarily disable th
is check.
ERROR: error loading package '': Extension file 'python/pip.bzl' has errors
ERROR: error loading package '': Extension file 'python/pip.bzl' has errors
INFO: Elapsed time: 7.505s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
Could someone point what I am missing here.
When I tried to run bazel info, I am getting following error.
$ bazel info --incompatible_disable_deprecated_attr_params=false
ERROR: /home/bigz/.cache/bazel/_bazel_bigz/a68d37101a3d172c639dd67a1941f719/external/org_pubref_rules_protobuf/protobuf/internal/proto_compile.bzl:771:21: name 'FileType' is not defined
ERROR: error loading package '': in /home/bigz/.cache/bazel/_bazel_bigz/a68d37101a3d172c639dd67a1941f719/external/org_pubref_rules_protobuf/python/rules.bzl: in /home/bigz/.cache/bazel/_bazel_bigz/a68d37101a3d172c639dd67a1941f719/external/org_pubref_rules_protobuf/cpp/rules.bzl: in /home/bigz/.cache/bazel/_bazel_bigz/a68d37101a3d172c639dd67a1941f719/external/org_pubref_rules_protobuf/protobuf/rules.bzl: Extension 'protobuf/internal/proto_compile.bzl' has errors
Though bazel --version shows as bazel 2.0.0.
$ bazel --version
bazel 2.0.0
The latest commit of gRPC is 9dfbd34f5c0b20bd77658c73c59b9a3e4e8f4e14
$ git log -1
commit 9dfbd34f5c0b20bd77658c73c59b9a3e4e8f4e14 (HEAD, tag: v1.20.0)
Merge: 1b488f8361 ae72bf76b3
Author: Lidi Zheng <scallopsky#gmail.com>
Date: Mon Apr 15 15:38:24 2019 -0700
Merge pull request #18760 from lidizheng/v1.20.x
Bump version to v1.20.0
The commit of grpc you are trying to build is not compatible with the version of bazel you have installed (2.0.0).
The commit 9dfbd34f5c0b20bd77658c73c59b9a3e4e8f4e14 is quite old (15 April 19), where the HEAD of that repo (at the time of writing this) is at eba60d8dbe4099c34b8097b2c89998d4484740ac, which now in BUILDING.md shows you need at least version 1.0.0 (there is a bazel wrapper at tools/bazel that will intercept and use 1.0.0 anyway)
For your specific commit however, trying different versions, I was able to build :all label with bazel version 0.20.0
I'd recommend trying bazelisk. You can add it to your PATH, add a .bazelversion file to the repository and bazelisk will take care of downloading the required bazel version.

Building gcloud api using bazel for windows

I want to add speech to text feature to my c++ application for windows, so I'm trying to build googleapi. I downloaded bazel and typed bazel //... in cmd and got error:
E:/dev/gapi/googleapis-master/WORKSPACE:116:1 ERROR: An error occurred during the fetch of repository
'com_google_api_gax_java_properties': Could not load dependencies
from properties file, error_code %s256 ERROR: no such package
'#com_google_api_gax_java_properties//': Could not load dependencies
from properties file, error_code %s256 ERROR: no such package
'#com_google_api_gax_java_properties//': Could not load dependencies
from properties file, error_code %s256 INFO: Elapsed time: 147.675s
INFO: 0 processes. FAILED: Build did NOT complete successfully (0
packages loaded)

_tkinter.TclError: Can't find a usable init.tcl in the following directories - This probably means that Tcl wasn't installed properly

When trying to run my newly created snap (ubuntu 18.04, snapcraft version 2.42.1+18.4) I get the following error:
(process:26716): Gtk-WARNING **: 12:29:57.640: Locale not supported by C library.
Using the fallback 'C' locale.
Gtk-Message: 12:29:57.673: Failed to load module "gail"
Gtk-Message: 12:29:57.674: Failed to load module "atk-bridge"
Gtk-Message: 12:29:57.703: Failed to load module "canberra-gtk-module"
Traceback (most recent call last):
File "/snap/facebookbuddy/x7/bin/facebookbuddy", line 16, in
root = Tk()
File "/snap/facebookbuddy/x7/usr/lib/python2.7/lib-tk/Tkinter.py", line 1822, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
/usr/share/tcltk/tcl8.6 /snap/facebookbuddy/x7/usr/lib/tcl8.6 /snap/facebookbuddy/x7/lib/tcl8.6 /snap/facebookbuddy/x7/usr/library /snap/facebookbuddy/x7/library /snap/facebookbuddy/x7/tcl8.6.8/library /snap/facebookbuddy/tcl8.6.8/library
This probably means that Tcl wasn't installed properly.
but running locate tells me something different!
$ locate init.tcl
/usr/lib/blt2.5/init.tcl
/usr/share/tcltk/tcl8.6/init.tcl
the relevant part inside my snapcraft.yaml looks like:
parts:
fbuddy:
source: .
plugin: python
python-version: python2
requirements: requirements.txt
stage-packages: [libc6, zlib1g, cron, python-setuptools, python-gobject-2, python-notify, python-pip, python-tk, python-six, python-lxml]
Any help is greatly appreciated!

Error " Exception AttributeError: "'Service' object has no attribute 'process'" " of selenium with Robot framework

I have a Selenium Python test suite. It starts to run show error msg.
unexpected error: Exception AttributeError: "'Service' object has no
attribute 'process'" in del of
selenium.webdriver.chrome.service.Service object at 0x040F20B0
ignored
and
Warning [ WARN ] Keyword 'Capture Page Screenshot' could not be run on
failure: No browser is open
How can I fix it.
The actual error for you is "WebDriverException: Message: 'chromedriver' executable needs to be available in the path"
Download Chrome driver from
https://sites.google.com/a/chromium.org/chromedriver/downloads
Then set the path to chrome driver
*** Settings ***
Library OperatingSystem
*** Keywords ****
Set Environment Variable webdriver.chrome.driver ${PATHTODRIVER}/chromedriver.exe