1

When installing the retrainer in the TensorFlow following this on OSX(10.9.5) , Bazel:0.2.2-b, CUDA:7.5, cuDNN:v5 python:2.7

$bazel build tensorflow/examples/image_retraining:retrain

I encountered the following error. Any ideas?

ERROR: /Users/hoshinotoshihiko/tensorflow/google/protobuf/BUILD:272:1: C++ compilation of rule '//google/protobuf:protoc' failed: osx_cc_wrapper.sh failed:

error executing command (cd/private/var/tmp/_bazel_hoshinotoshihiko/ff5db7423b3afa0d045a736d77207f89/tensorflow && \exec env - \PATH='/usr/local/lib:/usr/lib:/Users/hoshinotoshihiko/exec -l /bin/bash/google-cloud-sdk/bin:/usr/local/cuda/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/hoshinotoshihiko/bin'TMPDIR=/var/folders/y6/78v3zz4j1bj6nq7bl82c3cj80000gn/T/ \external/local_config_cc/osx_cc_wrapper.sh -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections -g0 '-std=c++0x' -iquote . -iquote bazel-out/host/genfiles -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -isystem google/protobuf/src -isystem bazel-out/host/genfiles/google/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/host/bin/google/protobuf/_objs/protoc/google/protobuf/src/google/protobuf/compiler/main.o' -MD -MF bazel-out/host/bin/google/protobuf/_objs/protoc/google/protobuf/src/google/protobuf/compiler/main.d -c google/protobuf/src/google/protobuf/compiler/main.cc -o bazel-out/host/bin/google/protobuf/_objs/protoc/google/protobuf/src/google/protobuf/compiler/main.o):

com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 126.

external/local_config_cc/osx_cc_wrapper.sh: line 56: /usr/local/lib/gcc: is a directory

Target //tensorflow/examples/image_retraining:retrain failed to build

INFO: Elapsed time: 20.672s, Critical Path: 20.22s

3
  • What does which gcc returns? and echo "x$CCx"? Commented May 3, 2016 at 20:42
  • which gcc returns /usr/bin/gcc, echo "x$CCx" returns x . Commented May 3, 2016 at 22:16
  • It was because of the performance of the machine. Thank you for your replay! Commented May 14, 2016 at 1:36

2 Answers 2

1

It was because of the performance of the machine.
By changing the machine(MacBook Air(Mid2012)(4GB memory)→MacBook Pro(Mid2014)(16GB memory), I was able to build.

0

Try starting with google's dockerfile for tensor flow:

https://tensorflow.googlesource.com/tensorflow/+/master/tensorflow/tools/docker/Dockerfile.devel

If you have trouble in that environment, re-post.

1
  • I did not know how to do this, but I will try later by referring to this Thank you for your reply! Commented May 14, 2016 at 1:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.