sci-libs/tensorflow fails to build a external dependency that doesn't define <limits> This blocks gcc-11. Reproducible: Always
Created attachment 705774 [details] Build Log
I have committed versions 1.15.5-r2 and 2.5.0-r2 to my repo:- https://codeberg.org/kerframil/portage-overlay/src/commit/e2bf96c/sci-libs/tensorflow Both should build successfully with gcc-11, though I have only tested 1.15.5-r2 so far (2.5.0-r2 testing is presently underway).
As far as 2.5.0 is concerned, bazel also requires patching. So far, I've only fixed bazel-0.27.2 but will work on the other versions soon.
(In reply to Kerin Millar from comment #2) > I have committed versions 1.15.5-r2 and 2.5.0-r2 to my repo:- > > https://codeberg.org/kerframil/portage-overlay/src/commit/e2bf96c/sci-libs/ > tensorflow > > Both should build successfully with gcc-11, though I have only tested > 1.15.5-r2 so far (2.5.0-r2 testing is presently underway). Can I tempt you into offering a patch for ::gentoo for TF now Bazel is fixed (thanks to you)?
(In reply to Sam James from comment #4) > Can I tempt you into offering a patch for ::gentoo for TF now Bazel is fixed > (thanks to you)? Yes, though 2.5.0-r2 still doesn't built yet. It shouldn't be too difficult to resolve, though. I'll report back in due course.
Created attachment 740430 [details, diff] tensorflow-2.5.0-r1-build-with-std-c-14.patch Note that I don't use CUDA and have only tested with the python USE flag enabled.
Created attachment 740454 [details, diff] tensorflow-2.5.0-r1-build-with-std-c-14.patch (amended) Re-attaching the patch. It's the same, only this bug is now referenced by the commit message.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fb980be2673097805afdd00aeeb2babd46753d7 commit 7fb980be2673097805afdd00aeeb2babd46753d7 Author: Kerin Millar <kfm@plushkava.net> AuthorDate: 2021-09-21 06:55:42 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-09-21 22:27:01 +0000 sci-libs/tensorflow: build with -std=c++14 in 2.5.0-r1 TensorFlow is not yet compatible with the C++17 dialect. Allow it to build with gcc:11 by appending -std=c++14 to CXXFLAGS, prior to composing bazelrc. The flag doesn't encompass the building of the ruy library, so this is accompanied by a patch to include the <limits> header in the one place that ruy needs it. Filter out the -fvtable-verify=@(std|preinit) flag, if present. While ostensibly useful for hardening, it prevents TensorFlow from building successfully. Note that, while the pattern is in the form of an extglob, the accompanying shopt does _not_ need to be enabled. Have src_install localise "l", rather than "j", because the function in question never employs the latter. Closes: https://bugs.gentoo.org/787938 Signed-off-by: Kerin Millar <kfm@plushkava.net> Signed-off-by: Sam James <sam@gentoo.org> .../files/0008-patch-ruy-for-gcc-11.patch | 37 ++++++++++++++++++++++ sci-libs/tensorflow/tensorflow-2.5.0-r1.ebuild | 7 +++- 2 files changed, 43 insertions(+), 1 deletion(-)
Bug predates dev-libs/boost-1.77.0 version bump.