sci-libs/tensorflow fails to build a external dependency that doesn't define <limits>
This blocks gcc-11.
Created attachment 705774 [details]
I have committed versions 1.15.5-r2 and 2.5.0-r2 to my repo:-
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:-
> 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]
Note that I don't use CUDA and have only tested with the python USE flag enabled.
Created attachment 740454 [details, diff]
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):
Author: Kerin Millar <email@example.com>
AuthorDate: 2021-09-21 06:55:42 +0000
Commit: Sam James <firstname.lastname@example.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.
Signed-off-by: Kerin Millar <email@example.com>
Signed-off-by: Sam James <firstname.lastname@example.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(-)