Addons: macOS build from source fails

Created on 19 Apr 2019  路  2Comments  路  Source: tensorflow/addons

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): macOS Mojave 10.14.4
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): tf-nightly-2.0-preview==2.0.0.dev20190419
  • TensorFlow Addons installed from (source, PyPi): source
  • TensorFlow Addons version: 0.2.1
  • Python version and type (eg. Anaconda Python, Stock Python as in Mac, or homebrew installed Python etc): pyenv Python 3.6.8
  • Bazel version (if compiling from source): 0.24.1
  • GCC/Compiler version (if compiling from source): Apple LLVM version 10.0.1 (clang-1001.0.46.3)
  • Is GPU used? (yes/no): no
  • GPU model (if used): N/A

Describe the bug
During source install bazel build build_pip_pkg returned the following error:

libtensorflow_framework.so.2: No such file or directory

I replaced all instances of libtensorflow_framework.so.2 with libtensorflow_framework.2.dylib in BUILD.tpl and tf_configure.bzl files.

Attempted fresh source install. bazel build build_pip_pkg returned new error:

bazel-out/darwin-fastbuild/genfiles/external/local_config_tf/include/tensorflow/core/framework/op_def.pb.h:10:10: fatal error: 'google/protobuf/port_def.inc' file not found
#include <google/protobuf/port_def.inc>
bug build

All 2 comments

Hi @drewszurko thanks for reporting this.. we are very close to having working macOS builds and I apologize for the inconvenience.

For the first issue I have a branch cut that will lookup the tensorflow shared library name:
https://github.com/seanpmorgan/addons/commit/0fe21efd8a5b52b70fd2e997f0d85b8d8f5b2074

Just waiting on a fix in tensorflow core for your second issue:
https://github.com/tensorflow/tensorflow/issues/27697#event-2289154760

Both issues are now resolved. Addons can be built from source using OSX without the need to modify the source code or download coreutils.

We will hopefully have a packaged 0.3 macos whl in the next couple days.

cc @drewszurko @ageron

Was this page helpful?
0 / 5 - 0 ratings