Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 720102 - sci-libs/tensorflow-1.15.0 compilation errors due to undeclared inclusions in BUILD files
Summary: sci-libs/tensorflow-1.15.0 compilation errors due to undeclared inclusions in...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-30 09:09 UTC by kfm
Modified: 2020-09-03 11:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,12.19 KB, text/plain)
2020-04-30 09:11 UTC, kfm
Details
tensorflow-1.15.0-fix-tensorflow-lite-build-error.patch (tensorflow-1.15.0-fix-tensorflow-lite-build-error.patch,3.04 KB, patch)
2020-04-30 09:12 UTC, kfm
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kfm 2020-04-30 09:09:49 UTC
In trying to build tensorflow-1.15.0, my initial attempt was unsuccessful due to bug 708498. Having attended to that particular bug, further attempts were also unsuccessful due to errors such as these:

ERROR: /var/tmp/portage/sci-libs/tensorflow-1.15.0-r1/work/tensorflow-1.15.0-python3_7/tensorflow/lite/tools/optimize/BUILD:32:1: undeclared inclusion(s) in rule '//tensorflow/lite/tools/optimize:model_utils':
this rule is missing dependency declarations for the following files included by 'tensorflow/lite/tools/optimize/model_utils.cc':
  'external/com_google_absl/absl/strings/string_view.h'
  'external/com_google_absl/absl/base/internal/throw_delegate.h'

This is not the only such error, merely the first that happens to be fatal. The problem is that there are multiple sections in which a dependency ought to be declared upon "@com_google_absl//absl/strings" but is missing instead. The two files affected are:

  tensorflow/lite/python/interpreter_wrapper/BUILD
  tensorflow/lite/tools/optimize/BUILD

I am attaching a patch that covers all of these cases. After applying this patch, I was (finally) able to build tensorflow. Please consider this patch for inclusion.

Please note that the "-r1" revision is to distinguish my copy of the ebuild from the one in gentoo's repo. I did this in order to be able to apply my patch, but commented out the reference to the patch for the purpose of re-generating a build error to include in this report.
Comment 1 kfm 2020-04-30 09:11:40 UTC
Created attachment 635340 [details]
build.log
Comment 2 kfm 2020-04-30 09:12:49 UTC
Created attachment 635342 [details, diff]
tensorflow-1.15.0-fix-tensorflow-lite-build-error.patch
Comment 3 kfm 2020-04-30 09:26:33 UTC
As tensorflow has a complex dependency graph and is rather volatile, allow me to also present the list of ~amd64 packages that I permitted to be installed in order to satisfy tensorflow-1.15.0:

  dev-java/icedtea-3.15.0:8
  dev-python/google-pasta-0.1.7
  dev-python/grpcio-1.24.3-r1::kerframil
  dev-python/grpcio-tools-1.24.3-r1::kerframil
  dev-python/pybind11-2.4.3
  net-libs/google-cloud-cpp-0.10.0-r1
  net-libs/grpc-1.24.3-r1::kerframil
  sci-libs/scipy-1.4.1
  sci-libs/tensorflow-1.15.0-r1::kerframil
  sci-libs/tensorflow-estimator-1.15.1
  sci-visualization/tensorboard-1.15.0
  sys-apps/hwloc-2.0.4:0/15

Any references to my "kerframil" repo are as a result of needing to resurrect dropped packages (bug 708498) or to apply a patch (tensorflow).
Comment 4 kfm 2020-04-30 09:39:20 UTC
I should also add that all build attempts - both successful and unsuccessful - were conducted with dev-util/bazel-0.27.2.
Comment 5 kfm 2020-09-03 11:00:16 UTC
I am closing this bug because Jason has dropped the tensorflow-1.15 series.