Giter VIP home page Giter VIP logo

bazel-on-arm's Introduction

bazel-on-arm's People

Contributors

b-w-wilson avatar bunnie avatar koenvervloesem avatar sourcedufus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bazel-on-arm's Issues

jdk, jre error

I tried to install bazel but it didn't work with

๐Ÿƒ  Building Bazel from scratch......
๐Ÿƒ  Building Bazel with Bazel.
.ERROR: Unrecognized option: --tool_java_runtime_version=local_jdk
ERROR: Could not build Bazel

so i check my javaruntime and jdk version

openjdk-11-jdk-headless/stable,now 11.0.15+10-1~deb11u1 armhf [installed]
openjdk-11-jre-headless/stable,now 11.0.15+10-1~deb11u1 armhf [installed,automatic]

pi@raspberrypi:~/bazel-on-arm $ javac -version
javac 11.0.15

pi@raspberrypi:~/bazel-on-arm $ java -version
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-post-Raspbian-1deb11u1)
OpenJDK Server VM (build 11.0.15+10-post-Raspbian-1deb11u1, mixed mode)

then... what should i have to do?
i try to install bazel on raspberry pi

Thanks for the Repo

Many days trying to install bazel, and your repo did the work in few minutes!!! thanks.

Debian 9 support

Hi! Thank you for making this repo and managing these patches. This isn't a bug report! I am targeting an older version of Debian (9/stretch) than what is currently supported in this project (10/buster). I ran into a few snags but I figured I would share the workarounds I had to do to make it work in case someone else tries to do the same and wants to save some time figuring it out.

Issue 1: No OpenJDK 11 in the default repos
Problem:

$ make requirements
E: Unable to locate package openjdk-11-jdk-headless
./scripts/install_requirements.sh: line 9: update-java-alternatives: command not found

Workaround:
We can use the stretch-backports release channel repo to get OpenJDK 11. I had to change most of the install_requirements.sh script so instead of running make requirements, I had to run the following in its entirety. The path to my JVM may differ from you, if so, you can find out what your options are by running: update-java-alternatives -l.

$ echo "deb http://ftp.de.debian.org/debian stretch-backports main" | tee /etc/apt/sources.list
$ apt-get update
$ apt-get -t stretch-backports install -y openjdk-11-jdk-headless
$ apt-get install -y build-essential zip unzip libatomic1
$ update-java-alternatives -s java-1.11.0-openjdk-arm64

Note: I am targeting arm64, if you are using Raspbian the JVM should be: java-1.11.0-openjdk-armhf instead.

Issue 2: Missing build dependencies
Problem:

$ make bazel
./scripts/build_bazel.sh: line 20: wget: command not found

...

$ make bazel
/usr/bin/env: 'python': No such file or directory
Target //src:bazel_nojdk failed to build

Workaround:
Pretty simple fix, just needed to install wget and python.

$ apt-get install -y wget python3
$ ln -s /usr/bin/python3 /usr/bin/python
$ make bazel

Cannot execute binary file

Hello!
We are trying to install Bazel for Tensorflow 1.0.1 using the info in this repo. We followed the steps and installed Bazel 3.2.0 (earliest available) but when building the package for tensorflow, we receive the following:

Building for the Pi Two/Three, with NEON acceleration
/usr/local/bin/bazel: line 163: /usr/local/lib/bazel/bin/bazel-real: cannot execute binary file: Exec format error
ERROR: The project you're trying to build requires Bazel 3.1.0 (specified in /workspace/.bazelversion), but it wasn't found in /usr/local/lib/bazel/bin.

Bazel binaries for all official releases can be downloaded from here:
https://github.com/bazelbuild/bazel/releases

Please put the downloaded Bazel binary into this location:
/usr/local/lib/bazel/bin/bazel-3.1.0-linux-armv7l

We are hoping that you can help us solve the issue (potentially with Bazel 3.1.0 for arm). We tried to make the directory specified and move the binary file to it but it results in the same thing. Not sure how to proceed.

Thanks for this, it has been quite helpful regardless.

armv8l

build failed every time I try for armv8l
bazel version 3.5.0
all requirements installed successfully

Error building tensorflow

I ran my ./configure

You have bazel 4.2.1- (@non-git) installed.
Please specify the location of python. [Default is /usr/bin/python3]:

Found possible Python library paths:
/usr/lib/python3/dist-packages
/usr/local/lib/python3.7/dist-packages
Please input the desired Python library path to use. Default is [/usr/lib/python3/dist-packages]

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

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

Do you wish to download a fresh release of clang? (Experimental) [y/N]: N
Clang will not be downloaded.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -Wno-sign-compare]:

Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: N
Not configuring the WORKSPACE for Android builds.

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=mkl_aarch64 # Build with oneDNN and Compute Library for the Arm Architecture (ACL).
--config=monolithic # Config for mostly static monolithic build.
--config=numa # Build with NUMA support.
--config=dynamic_kernels # (Experimental) Build kernels into separate shared objects.
--config=v1 # Build with TensorFlow 1 API instead of TF 2 API.
Preconfigured Bazel build configs to DISABLE default on features:
--config=nogcp # Disable GCP support.
--config=nonccl # Disable NVIDIA NCCL support.
Configuration finished

But when I run:
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package --jobs 4

I got these errors
ERROR: /home/pi/tensorflow/tensorflow/compiler/xla/service/llvm_ir/BUILD:64:11: Compiling tensorflow/compiler/xla/service/llvm_ir/llvm_util.cc failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 173 argument(s) skipped) In file included from external/com_google_absl/absl/base/internal/endian.h:29, from external/com_google_absl/absl/strings/cord.h:73, from ./tensorflow/core/platform/default/cord.h:22, from ./tensorflow/core/platform/cord.h:25, from ./tensorflow/core/platform/tstring.h:24, from ./tensorflow/core/platform/types.h:23, from ./tensorflow/core/platform/logging.h:20, from ./tensorflow/core/platform/status.h:27, from ./tensorflow/core/lib/core/status.h:19, from ./tensorflow/compiler/xla/status.h:19, from ./tensorflow/compiler/xla/array.h:33, from ./tensorflow/compiler/xla/array2d.h:29, from ./tensorflow/compiler/xla/literal.h:32, from ./tensorflow/compiler/xla/service/llvm_ir/llvm_util.h:34, from tensorflow/compiler/xla/service/llvm_ir/llvm_util.cc:16: external/com_google_absl/absl/base/casts.h: In instantiation of 'Dest absl::lts_20210324::bit_cast(const Source&) [with Dest = long long int; Source = void (*)(const char*, long long int); typename std::enable_if<(! absl::lts_20210324::internal_casts::is_bitcastable<Dest, Source>::value), int>::type <anonymous> = 0]': tensorflow/compiler/xla/service/llvm_ir/llvm_util.cc:385:78: required from here external/com_google_absl/absl/base/casts.h:176:30: error: static assertion failed: Source and destination types should have equal sizes. static_assert(sizeof(Dest) == sizeof(Source), ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ external/com_google_absl/absl/base/casts.h: In instantiation of 'Dest absl::lts_20210324::bit_cast(const Source&) [with Dest = long long int; Source = const char*; typename std::enable_if<(! absl::lts_20210324::internal_casts::is_bitcastable<Dest, Source>::value), int>::type <anonymous> = 0]': tensorflow/compiler/xla/service/llvm_ir/llvm_util.cc:387:57: required from here external/com_google_absl/absl/base/casts.h:176:30: error: static assertion failed: Source and destination types should have equal sizes. Target //tensorflow/tools/pip_package:build_pip_package failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 22466.499s, Critical Path: 630.59s INFO: 5274 processes: 786 internal, 4488 local. FAILED: Build did NOT complete successfully

I searched a lot and I didn't find anything related to this. Could you help me?

My configurations:

gcc 8.3.0
bazel 4.2.1
python 3.7.3

Thanks for the repo

Thank You for repo . I spent a lot of time to build bazel for Raspberry Pi 4 unfortunatelly without success.
Your code built bazel in first iteration. Good job.

Now it's time to learn how tu build python wheels for Raspberry pi 4 becouse becouse some packages I need probably doesn't exist.

Thanks again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.