Issue 1:
when I run :

bazel build --config=opt --config=cuda --verbose_failures //tensorflow/tools/pip_package:build_pip_package

INFO: Found 1 target...

ERROR: /home/qs/.cache/bazel/bazel_qs/081cd1dbca77dcff65c775e7e860e873/external/farmhash_archive/BUILD.bazel:12:1: C++ compilation of rule '@farmhash_archive//:farmhash' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command

(cd /home/qs/.cache/bazel/bazel_qs/081cd1dbca77dcff65c775e7e860e873/execroot/tensorflow &&

exec env -

LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64/:/usr/lib32/:/usr/lib/x86_64-linux-gnu/::/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64

PATH=/bin:/usr/bin:/home/qs/mysoft/jdk1.8/bin

external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections -g0 '-std=c++11' -MD -MF bazel-out/host/bin/external/farmhash_archive/objs/farmhash/external/farmhash_archive/src/farmhash.d '-frandom-seed=bazel-out/host/bin/external/farmhash_archive/objs/farmhash/external/farmhash_archive/src/farmhash.o' -iquote external/farmhash_archive -iquote bazel-out/host/genfiles/external/farmhash_archive -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -isystem external/farmhash_archive/src -isystem bazel-out/host/genfiles/external/farmhash_archive/src -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE="redacted"' '-D__TIMESTAMP="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers -c external/farmhash_archive/src/farmhash.cc -o bazel-out/host/bin/external/farmhash_archive/_objs/farmhash/external/farmhash_archive/src/farmhash.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.

gcc: error: unrecognized command line option '-fno-canonical-system-headers'

Target //tensorflow/tools/pip_package:build_pip_package failed to build

INFO: Elapsed time: 1.003s, Critical Path: 0.49s

How to solve this problem?

Issue 2:
System information

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

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

TensorFlow installed from (source or binary): from pip install

TensorFlow version (use command below): v2.0.0-beta0-16-g1d91213fe7 2.0.0-beta1

Python version: v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14

Describe the current behavior

Assume that I have already made a previous call of tf.concat. When calling again tf.concat with a values argument which is either a list of Tensor objects of length 1 or a single Tensor object, I get the following error:

Duplicate node name in graph: 'concat'

It seems to be a naming conflict.

Describe the expected behavior

From tf.concat documentation:

values: A list of Tensor objects or a single Tensor.

tf.concat should not throw an error when values is a list of length 1 or a single Tensor object and no naming conflict should rise.

Code to reproduce the issue

import tensorflow as tf
from tensorflow.keras import Input

print('Using Tensorflow version {} (git version {})'.format(tf.version.VERSION, tf.version.GIT_VERSION))

i = Input(shape=3)
j = Input(shape=4)
try:
print(tf.concat([i, j], axis=-1))
except Exception as e:
print(type(e))
print(e)
try:
print(tf.concat([i, j], axis=-1))
except Exception as e:
print(type(e))
print(e)
try:
print(tf.concat([i], axis=-1))
except Exception as e:
print(type(e))
print(e)
try:
print(tf.concat(i, axis=-1))
except Exception as e:
print(type(e))
print(e)

which outputs:

Using Tensorflow version 2.0.0-beta1 (git version v2.0.0-beta0-16-g1d91213fe7)
Tensor("concat:0", shape=(None, 7), dtype=float32)
Tensor("concat_1:0", shape=(None, 7), dtype=float32)
<class 'ValueError'>
Duplicate node name in graph: 'concat'
<class 'ValueError'>
Duplicate node name in graph: 'concat'

If I comment both print(tf.concat([i, j], axis=-1)) lines then print(tf.concat([i], axis=-1)) does not fail, but print(tf.concat(i, axis=-1)) do. If I also comment print(tf.concat([i], axis=-1)) then print(tf.concat(i, axis=-1)) resolves without error.

Other info / logs

Full error log:

---------------------------------------------------------------------------
InvalidArgumentError Traceback (most recent call last)
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in _create_c_op(graph, node_def, inputs, control_inputs)
1550 try:
-> 1551 c_op = c_api.TF_FinishOperation(op_desc)
1552 except errors.InvalidArgumentError as e:

InvalidArgumentError: Duplicate node name in graph: 'concat'

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last)
<ipython-input-2-bd15a2b20363> in <module>
----> 1 print(tf.concat(i, axis=-1))

~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/util/dispatch.py in wrapper(*args, **kwargs)
178 """Call target, and fall back on dispatchers if there is a TypeError."""
179 try:
--> 180 return target(*args, **kwargs)
181 except (TypeError, ValueError):
182 # Note: convert_to_eager_tensor currently raises a ValueError, not a

~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py in concat(values, axis, name)
1282 dtype=dtypes.int32).get_shape().assert_is_compatible_with(
1283 tensor_shape.scalar())
-> 1284 return identity(values[0], name=scope)
1285 return gen_array_ops.concat_v2(values=values, axis=axis, name=name)
1286

~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/util/dispatch.py in wrapper(*args, **kwargs)
178 """Call target, and fall back on dispatchers if there is a TypeError."""
179 try:
--> 180 return target(*args, **kwargs)
181 except (TypeError, ValueError):
182 # Note: convert_to_eager_tensor currently raises a ValueError, not a

~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py in identity(input, name)
84 return copied
85 else:
---> 86 ret = gen_array_ops.identity(input, name=name)
87 # Propagate handle data for happier shape inference for resource variables.
88 if hasattr(input, "_handle_data"):

~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py in identity(input, name)
4251 # Add nodes to the TensorFlow graph.
4252 _, _, _op = _op_def_lib._apply_op_helper(
-> 4253 "Identity", input=input, name=name)
4254 _result = _op.outputs[:]
4255 _inputs_flat = _op.inputs

~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py in _apply_op_helper(self, op_type_name, name, **keywords)
786 op = g.create_op(op_type_name, inputs, dtypes=None, name=scope,
787 input_types=input_types, attrs=attr_protos,
--> 788 op_def=op_def)
789 return output_structure, op_def.is_stateful, op
790

~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/func_graph.py in create_op(***failed resolving arguments***)
463 return super(FuncGraph, self).create_op(
464 op_type, inputs, dtypes, input_types, name, attrs, op_def,
--> 465 compute_device=compute_device)
466
467 def capture(self, tensor, name=None):

~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py in new_func(*args, **kwargs)
505 'in a future version' if date is None else ('after %s' % date),
506 instructions)
--> 507 return func(*args, **kwargs)
508
509 doc = _add_deprecated_arg_notice_to_docstring(

~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in create_op(***failed resolving arguments***)
3294 input_types=input_types,
3295 original_op=self._default_original_op,
-> 3296 op_def=op_def)
3297 self._create_op_helper(ret, compute_device=compute_device)
3298 return ret

~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in __init__(self, node_def, g, inputs, output_types, control_inputs, input_types, original_op, op_def)
1712 op_def, inputs, node_def.attr)
1713 self._c_op = _create_c_op(self._graph, node_def, grouped_inputs,
-> 1714 control_input_ops)
1715
1716 # Initialize self._outputs.

~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in _create_c_op(graph, node_def, inputs, control_inputs)
1552 except errors.InvalidArgumentError as e:
1553 # Convert to ValueError for backwards compatibility.
-> 1554 raise ValueError(str(e))
1555
1556 return c_op

ValueError: Duplicate node name in graph: 'concat'