Questions tagged [bazel]

1

votes
1

answer
306

Views

How to run Bazel container images on OSX?

According to the documentation at bazelbuild/rules_docker, it should be possible to work with these container images on OSX, and it also claims that it's possible to do so without docker. These rules do not require / use Docker for pulling, building, or pushing images. This means: They can be used t...
Yves Junqueira
5

votes
0

answer
191

Views

Aosp does not have tools/vendor/google3 project

When I build Android Studio from source code using: 'bazel build //tools/adt/idea/...' command can't always find 'tools/vendor/google3' module, isn't google no open source project? [email protected]:~/aosp/gradle_3.1.2$ bazel build //tools/adt/idea/... WARNING: ignoring http_proxy in...
yangzaiCN
1

votes
1

answer
907

Views

Bazel error: “No test targets were found, yet testing was requested”

I have a small assignment where I used TensorFlow to create music: https://github.com/tensorflow/magenta When I run the code --- bazel test //magenta:all I get the following error: WARNING: /home/admin/.cache/bazel/_bazel_admin/fb30f33370a5b97d4f9b1dde06f8f344/external/protobuf/protobuf.bzl:90:19: V...
han
1

votes
0

answer
206

Views

Bazel fails to run command, by hand it works. How to debug?

I am trying to compile tensorflow in a bit difficult environment (Centos 6.2 with a load of 'own' compilations). A lot of problems I have solved already, but the one baffling me is a SWIG error. I run with '--verbose_failures' and I can see the command that bazel tries to run: (cd /home/../.cache/ba...
Peter Smit
1

votes
1

answer
180

Views

“exec env -” wrong path when installing bazel

when I compile bazel 0.5.4 from source ./compile.sh meet this problem : error executing shell command: 'cp 'bazel-out/local-opt/bin/src/main/protobuf/command_server_java_grpc_srcs.jar' 'bazel-out/local-opt/bin/src/main/protobuf/command_server_java_grpc_srcs.srcjar'' failed (Exit 127): bash failed:...
user2848932
1

votes
1

answer
76

Views

find current workspace name in bazel query

I want to retrieve current workspace name using bazel info or bazel query or some other smart tool (not cat + grep) What is the best way to do that?
orshachar
1

votes
1

answer
387

Views

How to disable remote cache for specified bazel rules

In my bazelrc, I have the following configuration: build:remote --spawn_strategy=remote build:remote --remote_local_fallback build:remote --genrule_strategy=sandboxed build:remote --remote_rest_cache=http://HOST/PATH This works quite well for all rules with 'bazel build -c opt --config=remote //...'...
steiner
1

votes
0

answer
162

Views

How can know which external dependencies from a java maven project and do its bazel build/compile

I'm trying to do with bazel build, this is java maven project, how can I know which external dependencies and include it in workspace file to a bazel build? there is a migration--tooling: https://github.com/bazelbuild/migration-tooling, what is the maven_project path as following? I tried it as d...
Jamesjin
1

votes
0

answer
230

Views

How to compile tensorflow for avx instructions on windows machine using bazel and msys2?

I am trying to compile tensorflow for avx instructions on a windows 10 machine. I have downloaded the tensorflow-master repository, bazel and msys2. I tried to compile it using the command bazel --batch build -c opt --copt=-mavx -k //tensorflow/tools/pip_package:build_pip_package but could not comp...
Arindam Ghosh
1

votes
0

answer
300

Views

Copy file to the binaries directory using bazel

I am building some C++ using bazel. load('//tensorflow:tensorflow.bzl', 'tf_cc_binary') tf_cc_binary( name = 'model', srcs = [ 'model.cc', 'data_set.h', 'data_set.cc' ], deps = [ '//tensorflow/cc:gradients', '//tensorflow/cc:grad_ops', '//tensorflow/cc:cc_ops', '//tensorflow/cc:client_session', '//t...
Florian Courtial
1

votes
0

answer
178

Views

Bazel crashes compiling tensorflow

I did some customizations to tensorflow and to the included eigen library. When compiling, I get this (and other similar) error: ERROR: /home/retisexp/tensorflow/tensorflow/python/BUILD:1285:1: Executing genrule //tensorflow/python:audio_ops_pygenrule failed (Segmentation fault): bash failed: error...
Dan
1

votes
0

answer
89

Views

bazel rules_nodejs can't be deployed using rules_k8s: wrong platform

I'm building a nodejs app from OSX and trying to deploy it to kubernetes using rules_k8s. It almost works, except that the node doesn't start because of this error: /app/examples/hellohttp/nodejs/nodejs-hellohttp_image.binary: line 147: /app/examples/hellohttp/nodejs/nodejs-hellohttp_image.binary.ru...
Yves Junqueira
1

votes
0

answer
105

Views

Choosing platform-specific default --config from bazelrc

Is there a mechanism to select a default config based on the platform or the environment variable? For example: common --config=$DEFAULT_CONFIG I'm working on a project which uses bazelrc configurations to specify default build and test flags for separate platforms. It looks something like this: bui...
Robin Nabel
1

votes
1

answer
1.1k

Views

Installing tensorflow using bazel on windows

I am trying to install tensorflow on windows 10 and I am following this link: https://www.tensorflow.org/install/install_sources I have successfully installed bazel. The problem is when I use this command $ bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package to install tensorf...
nOp
1

votes
1

answer
135

Views

Add RxCpp to C++ Bazel project

I'm currently trying to compile a trivial c++ example project before including rxcpp to my main project, however, I'm running into difficulties where rxcpp library is not found. All files are within the same directory. Workstation specs: Bazel version: 0.11.1-homebrew MacOs: 10.13.3 Clang: Apple LL...
Darragh
1

votes
0

answer
88

Views

How to alter classpath for Java executable in ctx.actions.run?

In my Java-based Bazel project I use a code generator written in Java. The generator is part of the root project, and used in sub-projects as well. What I want to achieve is to include the output of the root project (a .jar file) as a dependency for the code generation in sub-projects to grant the c...
Marco
1

votes
1

answer
217

Views

How to run test on the source tree in bazel?

I am migrating a project from cmake to bazel. I have a folder contains some python code and some genrules. I had a test script run all the python tests in this folder recursively. So basically I need all py files under this folder as data for the test script. But given there are some genrule I need...
edward_mj
1

votes
0

answer
99

Views

bazel fails to build with stable-status.txt

When building target with linkstamping enabled I am seeing the following error on a remote builder (jenkins) When building locally this works as expected and I am producing the expected output [0 / 21] [-----] BazelWorkspaceStatusAction stable-status.txt ERROR: Couldn't build file stable-status.txt:...
Marcus Hines
1

votes
0

answer
224

Views

When i .pb file transfer to .tflite i get an error

i train a model in python with keras. I save model as .h5 file and after than i use a script for .h5 file to .pb file. You can see my script: from tensorflow.python.framework import graph_util from tensorflow.python.framework import graph_io from keras.models import load_model from keras import back...
Serkan Özaydin
1

votes
0

answer
365

Views

Bazel and Tensorflow Error on Raspberry Pi: Building From Source

I am trying to run a command to install Tensorflow from source, I use Bazel to install from source (This is being done a raspberry pi -- Linux OS software). This what I am trying to do on my raspberry pi (I am trying to model the instruction from here: https://github.com/samjabrahams/tensorflow-on-r...
John
1

votes
0

answer
42

Views

How to get build times of individual targets with bazel?

We have a bunch of targets being built by bazel in our build environment today, targets being cc_binary/cc_test/cc_library etc. Is there some bazel option that dumps build time for each of these into a file so we can analyze it after the build is done. While building bazel dumps some timing informat...
S.K
1

votes
1

answer
199

Views

Create frozen graph from pretrained model

Hi I am newbie to tensorflow. My aim is to convert .pb file to .tflite from pretrain model for my understanding. I have download mobilenet_v1_1.0_224 Model. Below is structure for model mobilenet_v1_1.0_224.ckpt.data-00000-of-00001 - 66312kb mobilenet_v1_1.0_224.ckpt.index - 20kb mobilenet_v1_1.0_...
Prashant Puri
1

votes
2

answer
284

Views

Error when installing bazel on windows

I am trying to install Bazel (version 0.10.0) on windows 7, but i have a problem when i try to excute compile.sh. [email protected] MINGW64 /c/Users/c.kazdghli/Downloads/bazel-0.10.0 $ export BAZEL_SH=c:/tools/msys64/usr/bin/bash.exe [email protected] MINGW64 /c/Users/c.kazdghli/Do...
K.cyrine
1

votes
0

answer
291

Views

Building OpenCV 3.3.0 program with Bazel compiler produces linking errors

I'm trying to use Bazel to compile an OpenCV based C++ program, and I'm facing an issue. I created my project with this WORKSPACE file: new_local_repository( name = 'opencv330', path = '/usr/opencv330', build_file = 'opencv330.BUILD',) and this opencv330.BUILD file: cc_library( name = 'opencv330', s...
Viktor
1

votes
1

answer
179

Views

Cannot Build Gerrit while accessing remote repository through a proxy

I try to build gerrit with bazel (0.13.0rc2 and 0.20) on Ubuntu. My company uses a proxy that requires authentication. The environment variables http_proxy and https_proxy are set (and other tools like wget, maven, ... work) but bazel reports 'HTTP/1.0 407 Proxy Authentication Required' errors: $ ba...
Sonic78
1

votes
0

answer
43

Views

How to know which cpu/platform basel recognizes

I'm trying to build tensorflow on aarch64 linux board computer. But tensorflow's bazel settings use armeabi-v7a config to build libjpeg-turbo. This cause build error gcc: error: unrecognized command line option '-mfloat-abi=softfp' (aarch64 gcc has no softfp option). I think that bazel recognizes my...
Yusuke
1

votes
1

answer
357

Views

Best way to scale up Bazel cache server?

I have set up a Bazel cache server in our company and have been using it quite smoothly. I simply followed the instruction here to set up a Nginx server. The underlying storage is on a solid state disk. However, as our number of users grows, sometimes the cache server got stuck. I don't see any docu...
Zhuo Zhang
1

votes
0

answer
205

Views

Bazel cache over ssl

Hej, Im trying to setup a bazel cache for my CI enviroment and so far all is working with no ssl, but when I enable nginx ssl with my fancy self signed certificate everything explodes... Im using on .bazelrc: build:remote --spawn_strategy=remote build:remote --remote_local_fallback build:remote --ge...
Jose Romero
1

votes
0

answer
99

Views

Non-zero return code '255' from command - Tensorflow Audio Recognition

Trying to get the 'continuous stream of audio' for this thing to run (You can find it under the part of 'Streaming Accuracy'): https://www.tensorflow.org/versions/master/tutorials/audio_recognition However, when I do so by using the suggested command: (Yes I do have a long audio file that is documen...
FreddyGump
1

votes
0

answer
118

Views

Tensorflow install from source: can't find resultant /tmp/tensorflow_pkg

I've been going through the steps to install tensorflow from source (macOS, El Capitan), and I've successfully built a wheel file, it seems, but I can't find the folder that bazel is telling me it built it in (/tmp/tensorflow_pkg). On building the package using the $ bazel-bin/tensorflow/tools/pip_p...
pun_intended
1

votes
1

answer
261

Views

how to build tensorflow lite benchmark_model?

When I build benmark_model of tensorflow lite with bazel to run on Android, it prints following error: $ bazel build -c opt --cxxopt='--std=c++11' \ //tensorflow/contrib/lite/tools:benchmark_model \ --crosstool_top=//external:android/crosstool \ [email protected]_tools//tools/cpp:toolchain...
bin.li
1

votes
0

answer
243

Views

Unable to find libisl.so.15

I ve been trying to install bazel on a Linux system - Red Hat Enterprise Linux 7. While installing, I run into this error : (pls see link below) As seen, it is unable to load libisl.so.15. But that shared file is indeed present on the system and it is a symbolic link. How can I make the bazel build...
Vignesh K
1

votes
1

answer
157

Views

Bazel rules_python fails to copy xgboost into runfiles directory

I have a toy python project containing the following files: requirements.txt: numpy==1.14.3 xgboost==0.71 print_numpy_version.py: from __future__ import print_function import numpy print('numpy version: %s' % numpy.version.version) print_xgboost_version.py: from __future__ import print_function impo...
concentration
1

votes
0

answer
49

Views

Building dynamic .framework libraries for distribution

How do I use Bazel to build a .framework library using swift. Is there any examples on how this can be done. I have a project that successfully builds, but it is missing the modulemap, .swiftmodule directories and bridging header
maninvan
1

votes
0

answer
76

Views

Bazel build from scratch error on resin/raspberry-pi3-debian

I got the following error attempting to build bazel from scratch ( https://docs.bazel.build/versions/master/install-compile-source.html ) on resin/raspberry-pi3-debian Docker image. This was very late in the compile process. Thoughts? ERROR: /usr/local/src/bazel/third_party/ijar/BUILD:10:1: C++ co...
sigstop
1

votes
1

answer
44

Views

How to retrieve fully-qualified names for target's dependencies?

I want to create a tarball of a binary and all libs it depends upon using pkg_tar(). I can retrieve a list of the binary's dependencies with deps = native.existing_rule('my_binary')['deps'] However, the items in the list lack the @repo_name// prefix that was specified in the cc_binary() rule. For ex...
Mark
1

votes
1

answer
36

Views

Can I error if my bazel target generates files that aren't specified in its outs?

Inside a .bzl file, I specify a program to generate some code. It looks something like this: def generate_code(): native.genrule( name = 'foo', outs = ['file.hpp'], tools = ['//path/to:tool'], cmd = $(location path/to:tool) $(@D) ) This works fine, however the problem is that the tool might genera...
Trevor Hickey
1

votes
1

answer
379

Views

Cannot connect to bazel server

I'm new to Bazel, and installed Bazel on CentOS 7. I installed it by using 'yum install bazel' with version of '0.14.0- (@non-git)' When starting bazel, it always hung with following message: 'Starting local Bazel server and connecting to it...' The batch mode however works, but client/server mode a...
Michael Liu
1

votes
1

answer
45

Views

Building Bazel on IBM lsf.conf

I am trying to build Bazel on IBM (Redhat 6.9) that uses LSF for the job submission system. In the middle of build, I get an error: lsb_init: initenv_:fopen(/etc/lsf.conf) The LSF_ENVDIR is correctly set to where the lsf config files are located. However, it still looks in there. Can I change this...
Strongman
1

votes
1

answer
276

Views

How to include contrib op in Tensorflow bazel build

I'm building for Android using selective registration and the //tensorflow/contrib/android:libtensorflow_inference.so target: bazel build -c opt --copt='-DSELECTIVE_REGISTRATION' --copt='-DSUPPORT_SELECTIVE_REGISTRATION' //tensorflow/contrib/android:libtensorflow_inference.so --crosstool_top=//exter...
jsadler

View additional questions