2

I am trying to build Bazel from source for Raspberry Pi 3 (Model B). I encounter error

Protobuf compiler not found in third_party/protobuf/protoc-linux-arm32.exe

Earlier I tried downloading the available .deb package which failed to install (even after force architecture, worth noting Pi 3 is a armhf 64 system) as dependency on JDK7 was not resolved. JDK7 is not available through apt-get.

My understanding of Bazel, Protocol Buffer is very limited, Please help me with:

  1. The steps I can take to successfully build Bazel on Raspberry Pi 3
  2. Someone is able to do so or their any repository I can include directly?

I think it is very much possible to build because Tensorflow repository for Raspberry Pi is successfully installed on Pi 3, which I grabbed from here

JC_
  • 45
  • 3
  • 7

3 Answers3

3

There's a guide to building TensorFlow using Bazel on the Pi 3 here that may help: https://github.com/samjabrahams/tensorflow-on-raspberry-pi/blob/master/GUIDE.md

Pete Warden
  • 2,866
  • 1
  • 13
  • 12
  • Yups! its nice guide (In fact linked the repo in question too). However the challenge now is the version of Bazel I require and its dependencies versions, all of them have changed. say e.g. gRPC is required comparing to earlier version. and their is some ambiguity around in general for compile from source (I understand their are so many platforms to be clear for all of them, however Raspberry Pi is emerging big way as household experimental toy, and its getting powerful). – JC_ Sep 20 '16 at 07:38
  • 1
    @JC_ could you kindly please share your success experience in building changed versions and dependencies? I am having continuous problems building Bazel following the guide there. – Lin Song Yang Jul 14 '17 at 10:59
  • 1
    @LinSongYang. I got tensorflow build on raspberry pi after following above guide. I tested on object recognition, it is painfully slow. it takes 6 sec to process one image. – kranthi sai Aug 09 '17 at 17:59
1

You would need to get a version of protobuf compiler 3.0 and put it in third_party/protobuf/protoc-linux-arm32.exe.

  • I have compiled C++ from source with make check results as pass: ` Testsuite summary for Protocol Buffers 3.0.2 # TOTAL: 7 # PASS: 7 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ` what should I do next, what files I need to move, from where to where (in addition to protoc-linux-arm32.exe (which is compiled as protoc)? Why I am asking is my Bazel compile didn't go through when I placed the protoc-linux-arm32.exe in required third_party directory. Surprisingly no error, just returning to batch immediately after ` Building Bazel from scratch` – JC_ Sep 18 '16 at 07:11
  • Same issue here. @JC_. Have you fixed it? – GrizzlyBear May 23 '18 at 15:18
  • I stopped at that moment because dependencies were still maturing in 2016, and compiling on raspberry is painfully slow. @A_C – JC_ May 26 '18 at 03:09
0

I have explained how to build/install Bazel on Raspberry Pi step by step here and for test I have used Raspberry Pi 3B+ 1.4GHz Cortex-A53 Rev. 1.3 with 1GB RAM and 16GB SD card. Thereafter you can use the official TF documentation to build TF on Raspberry Pi.

Keivan
  • 1,300
  • 1
  • 16
  • 29