samjabrahams / tensorflow-on-raspberry-pi

TensorFlow for Raspberry Pi
Other
2.24k stars 496 forks source link

Error at ./compile.sh #132

Open tahayazici95 opened 6 years ago

tahayazici95 commented 6 years ago

Describe the Issue

Hi,

I am attemting to install TensorFlow on a Raspberry Pie 3 for a university project using your guide: https://github.com/samjabrahams/tensorflow-on-raspberry-pi/blob/master/GUIDE.md

Following all the steps, it went smoothly UNTIL the ./compile.sh part! It gave me an error within a few minutes with Java. After trying different approaches I used another guide to build a newer version of bazel (0.5.1): http://tuatini.me/building-tensorflow-as-a-standalone-project/#build-bazel

This removed the Java error but it still gave me an error after an hour 1.

Any ideas on how to tackle this please?

Steps to Reproduce / Error Code:

pi@raspberrypi:~/tf/bazel $ ./compile.sh INFO: You can skip this first step by providing a path to the bazel binary as second argument: INFO: ./compile.sh compile /path/to/bazel 🍃 Building Bazel from scratch....... 🍃 Building Bazel with Bazel. .WARNING: /tmp/bazel_MmKiepRf/out/external/bazel_tools/WORKSPACE:1: Workspace name in /tmp/bazel_MmKiepRf/out/external/bazel_tools/WORKSPACE (@io_bazel) does not match the name given in the repository's definition (@bazel_tools); this will cause a build error in future versions. INFO: Found 1 target... ERROR: /home/pi/tf/bazel/third_party/protobuf/3.2.0/BUILD:310:1: C++ compilation of rule '//third_party/protobuf/3.2.0:protoc_lib' failed: gcc failed: error executing command (cd /tmp/bazel_MmKiepRf/out/execroot/bazel && \ exec env - \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games \ PWD=/proc/self/cwd \ /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections -g0 '-std=c++0x' -g0 -MD -MF bazel-out/host/bin/third_party/protobuf/3.2.0/_objs/protoc_lib/third_party/protobuf/3.2.0/src/google/protobuf/compiler/java/java_map_field.d '-frandom-seed=bazel-out/host/bin/third_party/protobuf/3.2.0/_objs/protoc_lib/third_party/protobuf/3.2.0/src/google/protobuf/compiler/java/java_map_field.o' -iquote . -iquote bazel-out/host/genfiles -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -isystem third_party/protobuf/3.2.0/src -isystem bazel-out/host/genfiles/third_party/protobuf/3.2.0/src -isystem external/bazel_tools/tools/cpp/gcc3 -DHAVE_PTHREAD -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -Wno-unused-function -fno-canonical-system-headers -Wno-builtin-macro-redefined '-DDATE="redacted"' '-DTIMESTAMP="redacted"' '-DTIME="redacted"' -c third_party/protobuf/3.2.0/src/google/protobuf/compiler/java/java_map_field.cc -o bazel-out/host/bin/third_party/protobuf/3.2.0/_objs/protoc_lib/third_party/protobuf/3.2.0/src/google/protobuf/compiler/java/java_map_field.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. third_party/protobuf/3.2.0/src/google/protobuf/compiler/java/java_map_field.cc: In function 'void google::protobuf::compiler::java::{anonymous}::_ZN6google8protobuf8compiler4java12_GLOBAL__N_119SetMessageVariablesEPKNS0_15FieldDescriptorEiiPKNS2_18FieldGeneratorInfoEPNS2_7ContextEPSt3mapISsSsSt4lessISsESaISt4pairIKSsSsEEE.isra.28(const google::protobuf::FieldDescriptor, int, const google::protobuf::compiler::java::FieldGeneratorInfo, google::protobuf::compiler::java::Context, std::map<std::basic_string, std::basic_string >)': third_party/protobuf/3.2.0/src/google/protobuf/compiler/java/java_map_field.cc:155:1: internal compiler error: Segmentation fault } ^ Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.8/README.Bugs for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. Target //src:bazel failed to build INFO: Elapsed time: 688.582s, Critical Path: 182.18s

ERROR: Could not build Bazel

Hardware/Software Info

RASPBERRY PI 3 MODEL B

RASPBIAN STRETCH WITH DESKTOP Version:November 2017 Release date:2017-11-29 Kernel version:4.9

Python 3.5.3

Size of SD card: 16GB

Size of USB used as swap: 8GB