bazel

when i use bazel to bulid libtensorflow_inference.so

ⅰ亾dé卋堺 提交于 2020-01-25 22:05:15
问题 system:ubuntu 16.04 bazel:0.4.5 tensorflow: cpu version r1.0 gcc version:(Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 bazel build -c opt //tensorflow/contrib/android:libtensorflow_inference.so \ --crosstool_top=//external:android/crosstool \ --host_crosstool_top=@bazel_tools//tools/cpp:toolchain \ --cpu=armeabi-v7a the error is: tensorflow/core/kernels/BUILD:3749:1: C++ compilation of rule '//tensorflow/core/kernels:android_tensorflow_kernels' failed: Process exited with status 1 [sandboxed

when i use bazel to bulid libtensorflow_inference.so

若如初见. 提交于 2020-01-25 22:04:14
问题 system:ubuntu 16.04 bazel:0.4.5 tensorflow: cpu version r1.0 gcc version:(Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 bazel build -c opt //tensorflow/contrib/android:libtensorflow_inference.so \ --crosstool_top=//external:android/crosstool \ --host_crosstool_top=@bazel_tools//tools/cpp:toolchain \ --cpu=armeabi-v7a the error is: tensorflow/core/kernels/BUILD:3749:1: C++ compilation of rule '//tensorflow/core/kernels:android_tensorflow_kernels' failed: Process exited with status 1 [sandboxed

Error Compiling Tensorflow From Source - No module named 'keras_applications'

我怕爱的太早我们不能终老 提交于 2020-01-24 10:00:46
问题 I am attempting to build tensorflow from source with MKL optimizations on an Intel CPU setup. I have followed the official instructions here up until the command bazel build --config=mkl --config=opt //tensorflow/tools/pip_package:build_pip_package . Unfortunately, the compilation runs for some period of time and then fails. I'd appreciate any help with this matter. Updated Output log (using bazel --verbose_failures): ERROR: /home/jok/build/tensorflow/tensorflow/BUILD:584:1: Executing genrule

Call llvm-config --prefix and use it in a BUILD rule

懵懂的女人 提交于 2020-01-20 05:29:44
问题 I have a following rule in WORKSPACE : new_local_repository( name = "llvm", path = "/opt/local/libexec/llvm-4.0", build_file= "llvm.BUILD") I would like to now use hardcoded path for llvm. llvm-config --prefix can give me the directory for llvm. What is the correct way to get this? Can I just use standard python commands (e.g. subprocess package)? 回答1: As @abergmeier said, you can create a custom repository rule, run the command, create a symlink pointing to its output, and create a BUILD

Call llvm-config --prefix and use it in a BUILD rule

大憨熊 提交于 2020-01-20 05:29:04
问题 I have a following rule in WORKSPACE : new_local_repository( name = "llvm", path = "/opt/local/libexec/llvm-4.0", build_file= "llvm.BUILD") I would like to now use hardcoded path for llvm. llvm-config --prefix can give me the directory for llvm. What is the correct way to get this? Can I just use standard python commands (e.g. subprocess package)? 回答1: As @abergmeier said, you can create a custom repository rule, run the command, create a symlink pointing to its output, and create a BUILD

Bazel Error After Upgrading Nodejs Rules - ERROR: defs.bzl has been removed from build_bazel_rules_nodejs

半世苍凉 提交于 2020-01-16 08:37:08
问题 After upgrading build_bazel_rules_nodejs from 0.42.2 to 1.0.1 I get this error: ERROR: /home/flolu/.cache/bazel/_bazel_flolu/698f7adad10ea020bcdb85216703ce08/external/build_bazel_rules_nodejs/defs.bzl:19:5: Traceback (most recent call last): File "/home/flolu/Desktop/minimal-bazel-monorepo/services/server/src/BUILD", line 76 nodejs_image(name = "server", <2 more arguments>) File "/home/flolu/.cache/bazel/_bazel_flolu/698f7adad10ea020bcdb85216703ce08/external/io_bazel_rules_docker/nodejs/image

Bazel: set runtime environment variable and configuration file location for cc_binary/cc_test

别等时光非礼了梦想. 提交于 2020-01-15 06:01:18
问题 I am trying to use odbc++ in a C++ application on linux. The following build file is used to include the library as an external dependency licenses(["notice"]) cc_library( name = "lib", srcs=["lib/libodbc.so","lib64/libodbc++-mt.so"], hdrs=glob(["include/**/*.h","include/*.h"]), includes = ["include"], visibility = ["//visibility:public"], linkstatic = 1, data = [ "odbc.ini", "odbcinst.ini" ] ) My bash profile has ODBCINI and OBCDINST set so running the binary directly from command line is

Bazel: set runtime environment variable and configuration file location for cc_binary/cc_test

旧巷老猫 提交于 2020-01-15 06:01:13
问题 I am trying to use odbc++ in a C++ application on linux. The following build file is used to include the library as an external dependency licenses(["notice"]) cc_library( name = "lib", srcs=["lib/libodbc.so","lib64/libodbc++-mt.so"], hdrs=glob(["include/**/*.h","include/*.h"]), includes = ["include"], visibility = ["//visibility:public"], linkstatic = 1, data = [ "odbc.ini", "odbcinst.ini" ] ) My bash profile has ODBCINI and OBCDINST set so running the binary directly from command line is

Runfiles location substitution

徘徊边缘 提交于 2020-01-15 05:13:10
问题 I'm trying to run qemu on the output of a cc_binary rule. For that I have created a custom rule, which is pretty similiar to this example, but instead of the cat command on the txt-file, I want to invoke qemu on the output elf-file (":test_portos.elf") of the cc_binary rule. My files are the following: run_tests.bzl def _impl(ctx): # The path of ctx.file.target.path is: 'bazel-out/cortex-a9-fastbuild/bin/test/test_portos.elf' target = ctx.file.target.path command = "qemu-system-arm -M xilinx

running bazel remote executor test on separate machines

牧云@^-^@ 提交于 2020-01-13 04:15:17
问题 The remote worker guide of bazel (here) explains how to start the remote-worker locally and then run bazel against it. I tried it and indeed that worked (with bugs that reported in GH) Another attempt was to create run the remote worker on a virtual separate machine, by running it inside docker container and running bazel against it. But it failed in a different way - and I think this time I'm using it wrong. Here's my docker file: FROM openjdk:8 # install release bazel from apt RUN echo "deb