Issue 1:
I'm running linux x86_64, OpenSuse 13.1

I am trying to compile from the repo master branch 875a67f with Bazel 1.4, installed from bazel-0.1.4-installer-linux-x86_64.sh

I was getting dependency errors and had to make the modifications described in this stack overflow post to my Bazel setup

This got me past my initial dependency errors (described exactly in detail by StackOverflow OP in above post), but now I've got another error when trying to run this command:

bazel build --verbose_failures -c opt //tensorflow/tools/pip_package:build_pip_package

The relevant output:

INFO: From Compiling tensorflow/python/lib/core/py_func.cc:
tensorflow/python/lib/core/py_func.cc:19:31: fatal error: numpy/arrayobject.h: No such file or directory
#include "numpy/arrayobject.h"
^
compilation terminated.
ERROR: /home/personal/files/learning/tensorflow/tensorflow/tensorflow/python/BUILD:75:1: C++ compilation of rule '//tensorflow/python:py_func_lib' failed: gcc failed: error executing command
(cd /root/.cache/bazel/_bazel_root/f202f08f55600b1b30922b1248222df1/tensorflow && \
exec env - \
PATH=/usr/lib64/mpi/gcc/openmpi/bin:/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/cross/bin:/usr/local/go/bin \
/usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -iquote . -iquote bazel-out/local_linux-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local_linux-opt/genfiles/external/bazel_tools -iquote external/jpeg_archive -iquote bazel-out/local_linux-opt/genfiles/external/jpeg_archive -iquote external/png_archive -iquote bazel-out/local_linux-opt/genfiles/external/png_archive -iquote external/re2 -iquote bazel-out/local_linux-opt/genfiles/external/re2 -iquote external/eigen_archive -iquote bazel-out/local_linux-opt/genfiles/external/eigen_archive -isystem google/protobuf/src -isystem bazel-out/local_linux-opt/genfiles/google/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-opt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem external/re2 -isystem bazel-out/local_linux-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local_linux-opt/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-70505a059011 -isystem bazel-out/local_linux-opt/genfiles/external/eigen_archive/eigen-eigen-70505a059011 -isystem third_party/py/numpy/numpy_include -isystem bazel-out/local_linux-opt/genfiles/third_party/py/numpy/numpy_include -isystem util/python/python_include -isystem bazel-out/local_linux-opt/genfiles/util/python/python_include -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_linux-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o' -MD -MF bazel-out/local_linux-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.d -fPIC -c tensorflow/python/lib/core/py_func.cc -o bazel-out/local_linux-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: gcc failed: error executing command
(cd /root/.cache/bazel/_bazel_root/f202f08f55600b1b30922b1248222df1/tensorflow && \
exec env - \

Can anyone offer assistance with building?

Issue 2:
Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):16.04

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:

TensorFlow installed from (source or binary):pip install

TensorFlow version (use command below):1.12

Python version:3.5

Bazel version (if compiling from source):

GCC/Compiler version (if compiling from source):

CUDA/cuDNN version:

GPU model and memory:

TF version = 1.12

tfnightly = 1.13.0.dev20190104

python 3.5

Model ssd_mobilenet_v1_coco_2018_01_28

import tensorflow as tf
import sys
def convert(frozen):
graph_def_file = frozen+"/frozen_inference_graph.pb"
input_arrays = ["image_tensor"]
output_arrays = ["detection_boxes","detection_scores","detection_classes","num_detections"]
converter = tf.contrib.lite.TFLiteConverter.from_frozen_graph(graph_def_file,input_arrays,output_arrays)#,input_shapes={"image_tensor":[None,300,300,3]})
tflite_model = converter.convert()
open(frozen+"/model.tflite", "wb").write(tflite_model)

if __name__=='__main__':
frozen_path = sys.argv[1]
convert(frozen_path)

Error

2019-01-07 09:01:08.263004: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

2019-01-07 09:01:08.268020: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2300030000 Hz

2019-01-07 09:01:08.268185: I tensorflow/compiler/xla/service/service.cc:161] XLA service 0x56b0400 executing computations on platform Host. Devices:

2019-01-07 09:01:08.268255: I tensorflow/compiler/xla/service/service.cc:168] StreamExecutor device (0): ,

2019-01-07 09:01:09.412404: I tensorflow/core/grappler/devices.cc:53] Number of eligible GPUs (core count >= 8): 0 (Note: TensorFlow was not compiled with CUDA support)

2019-01-07 09:01:09.412562: I tensorflow/core/grappler/clusters/single_machine.cc:359] Starting new session

2019-01-07 09:01:11.571194: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:584] Optimization results for grappler item: graph_to_optimize

2019-01-07 09:01:11.571245: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] model_pruner: Graph size after: 5957 nodes (-3), 10020 edges (-3), time = 68.272ms.

2019-01-07 09:01:11.571253: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] function_optimizer: Graph size after: 5957 nodes (0), 10020 edges (0), time = 13.564ms.

2019-01-07 09:01:11.571259: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] constant folding: Graph size after: 5958 nodes (1), 10022 edges (2), time = 539.625ms.

2019-01-07 09:01:11.571265: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] shape_optimizer: Graph size after: 5958 nodes (0), 10022 edges (0), time = 31.515ms.

2019-01-07 09:01:11.571271: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] arithmetic_optimizer: Graph size after: 4306 nodes (-1652), 8412 edges (-1610), time = 243.152ms.

2019-01-07 09:01:11.571280: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] loop_optimizer: Graph size after: 4289 nodes (-17), 8380 edges (-32), time = 43.908ms.

2019-01-07 09:01:11.571289: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] dependency_optimizer: Graph size after: 4272 nodes (-17), 8358 edges (-22), time = 103.724ms.

2019-01-07 09:01:11.571299: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] layout: Graph size after: 4272 nodes (0), 8358 edges (0), time = 15.684ms.

2019-01-07 09:01:11.571309: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] memory_optimizer: Graph size after: 4272 nodes (0), 8358 edges (0), time = 263.292ms.

2019-01-07 09:01:11.571319: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] model_pruner: Graph size after: 4258 nodes (-14), 8332 edges (-26), time = 43.246ms.

2019-01-07 09:01:11.571329: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] function_optimizer: Graph size after: 4258 nodes (0), 8332 edges (0), time = 11.187ms.

2019-01-07 09:01:11.571338: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] constant folding: Graph size after: 4258 nodes (0), 8332 edges (0), time = 305.64ms.

2019-01-07 09:01:11.571348: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] shape_optimizer: Graph size after: 4258 nodes (0), 8332 edges (0), time = 22.274ms.

2019-01-07 09:01:11.571358: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] arithmetic_optimizer: Graph size after: 4256 nodes (-2), 8328 edges (-4), time = 192.768ms.

2019-01-07 09:01:11.571367: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:586] dependency_optimizer: Graph size after: 4256 nodes (0), 8328 edges (0), time = 100.01ms.

Traceback (most recent call last):

File "export_graph.py", line 15, in

convert(frozen_path)

File "export_graph.py", line 10, in convert

tflite_model = converter.convert()

File "/home/ubuntu/.local/lib/python3.5/site-packages/tensorflow/lite/python/lite.py", line 499, in convert

**converter_kwargs)

File "/home/ubuntu/.local/lib/python3.5/site-packages/tensorflow/lite/python/convert.py", line 445, in toco_convert_impl

input_data.SerializeToString())

File "/home/ubuntu/.local/lib/python3.5/site-packages/tensorflow/lite/python/convert.py", line 208, in toco_convert_protos

"TOCO failed. See console for info.\n%s\n%s\n" % (stdout, stderr))

tensorflow.lite.python.convert.ConverterError: TOCO failed. See console for info.

2019-01-07 09:01:12.809603: F tensorflow/core/framework/function.cc:1640] Check failed: GetOpGradFactory()->insert({op, func}).second Duplicated gradient for ReadVariableOp

Aborted (core dumped)