Opened 5 years ago

Closed 5 years ago

#59607 closed defect (fixed)

py27-tensorflow: Executing genrule //tensorflow:tf_python_api_gen_v2 failed (Exit 1): bash failed: error executing command

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: emcrisostomo (Enrico Maria Crisostomo)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc: cjones051073 (Chris Jones)
Port: py-tensorflow

Description

py27-tensorflow doesn't build on Mojave:

  bazel-out/host/bin/external/com_google_protobuf/protoc '--cpp_out=bazel-out/darwin-opt/bin' -I. -Iexternal/com_google_protobuf/src -Ibazel-out/darwin-opt/bin/external/com_google_protobuf/src tensorflow/compiler/xla/xla_data.proto)
INFO: From ProtoCompile tensorflow/compiler/xla/xla_data.pb.h:
bazel-out/darwin-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
ERROR: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work/tensorflow-tensorflow-64c3d38/tensorflow/BUILD:852:1: Executing genrule //tensorflow:tf_python_api_gen_v2 failed (Exit 1): bash failed: error executing command 
Traceback (most recent call last):
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work/52acacd3081fc791020e86eb1d1f580a/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
    from tensorflow.python.tools.api.generator import doc_srcs
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work/52acacd3081fc791020e86eb1d1f580a/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 83, in <module>
    from tensorflow.python import keras
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work/52acacd3081fc791020e86eb1d1f580a/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/keras/__init__.py", line 26, in <module>
    from tensorflow.python.keras import activations
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work/52acacd3081fc791020e86eb1d1f580a/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/keras/activations.py", line 23, in <module>
    from tensorflow.python.keras.utils.generic_utils import deserialize_keras_object
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work/52acacd3081fc791020e86eb1d1f580a/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/keras/utils/__init__.py", line 38, in <module>
    from tensorflow.python.keras.utils.multi_gpu_utils import multi_gpu_model
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work/52acacd3081fc791020e86eb1d1f580a/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/keras/utils/multi_gpu_utils.py", line 22, in <module>
    from tensorflow.python.keras.engine.training import Model
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work/52acacd3081fc791020e86eb1d1f580a/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/keras/engine/__init__.py", line 23, in <module>
    from tensorflow.python.keras.engine.base_layer import Layer
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work/52acacd3081fc791020e86eb1d1f580a/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/keras/engine/base_layer.py", line 54, in <module>
    from tensorflow.python.keras.mixed_precision.experimental import autocast_variable
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work/52acacd3081fc791020e86eb1d1f580a/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/keras/mixed_precision/experimental/__init__.py", line 20, in <module>
    from tensorflow.python.keras.mixed_precision.experimental.loss_scale_optimizer import LossScaleOptimizer
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work/52acacd3081fc791020e86eb1d1f580a/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/keras/mixed_precision/experimental/loss_scale_optimizer.py", line 23, in <module>
    from tensorflow.python.keras import optimizers
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work/52acacd3081fc791020e86eb1d1f580a/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/keras/optimizers.py", line 27, in <module>
    from tensorflow.python.keras.optimizer_v2 import adadelta as adadelta_v2
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work/52acacd3081fc791020e86eb1d1f580a/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/keras/optimizer_v2/adadelta.py", line 1
    
    ^
SyntaxError: I/O error while reading
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 21713.621s, Critical Path: 2721.01s
INFO: 14045 processes: 14045 local.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
Command failed: CC_OPT_FLAGS=-march=x86-64 bazel --max_idle_secs=60 --output_user_root=/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-tensorflow/py27-tensorflow/work build -s -c opt --verbose_failures --config=opt --conlyopt '-Os' --cxxopt '-Os' --cxxopt '-stdlib=libc++' --linkopt '-L/opt/local/lib' --linkopt '-Wl,-headerpad_max_install_names' --config=mkl --copt=-march=x86-64 //tensorflow/tools/pip_package:build_pip_package
Exit code: 1

The failure did not happen until 6 hours 14 minutes into the build. It is taxing our build infrastructure to repeatedly build this port's failing subports. If you can fix the build failures, great, otherwise please mark them with known_fail yes so that the buildbot will skip them.

Change History (2)

comment:1 Changed 5 years ago by cjones051073 (Chris Jones)

Yes, tensorflow v2 takes a truly silly amount of time to build. I think I might just remove the 27 version entirely, and just keep a few of the more recent py3x versions. If someone really needs tensorflow with python 27, then can use the v1 port.

comment:2 Changed 5 years ago by Chris Jones <jonesc@…>

Resolution: fixed
Status: assignedclosed

In 30ada991d573bb277726425f951d653bae4c5a73/macports-ports (master):

tensor{flow,board}: limit builds to py37 and py38, and macOS10.12 or newer
Closes: #59608
Closes: #59607

Note: See TracTickets for help on using tickets.