Bug 1223674

Summary: tensorflow-lite fails to build with GCC 13, keeps gcc12 from being removed
Product: [openSUSE] openSUSE Tumbleweed Reporter: Richard Biener <rguenther>
Component: OtherAssignee: Guillaume GARDET <guillaume.gardet>
Status: NEW --- QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P2 - High CC: dimstar, guillaume.gardet, guillaume.gardet
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Richard Biener 2024-05-02 08:43:29 UTC
When building tensorflow-lite with GCC 13 (the default compiler), there's a
spurious -Wstringop-overflow diagnostic promoted to an error becuause we
build the package with -Werror.  Adding -Wno-error=stringop-overflow causes
other issues to appear:

[   51s] In file included from /home/abuild/rpmbuild/BUILD/tensorflow-2.10.0/tflite-build/build/abseil-cpp/absl/strings/internal/str_format/extension.cc:16:
[   51s] /home/abuild/rpmbuild/BUILD/tensorflow-2.10.0/tflite-build/build/abseil-cpp/absl/strings/internal/str_format/extension.h:34:6: warning: elaborated-type-specifier for a scoped enum must not use the ‘class’ keyword
[   51s]    34 | enum class FormatConversionChar : uint8_t;
[   51s]       | ~~~~ ^~~~~
[   51s]       |      -----
[   51s] /home/abuild/rpmbuild/BUILD/tensorflow-2.10.0/tflite-build/build/abseil-cpp/absl/strings/internal/str_format/extension.h:34:33: error: found ‘:’ in nested-name-specifier, expected ‘::’
[   51s]    34 | enum class FormatConversionChar : uint8_t;
[   51s]       |                                 ^
[   51s]       |                                 ::
...
[   51s] /home/abuild/rpmbuild/BUILD/tensorflow-2.10.0/tflite-build/build/abseil-cpp/absl/strings/internal/str_format/extension.h:173:8: warning: elaborated-type-specifier for a scoped enum must not use the ‘class’ keyword
[   51s]   173 |   enum class Enum : uint8_t {
[   51s]       |   ~~~~ ^~~~~
[   51s]       |        -----

and more

Likely fixed in newer upstream versions of tensorflow.
Comment 1 Richard Biener 2024-05-02 09:40:16 UTC
It also fails to build with the upcoming GCC 14 like so:

[   11s] /home/abuild/rpmbuild/BUILD/tensorflow-2.10.0/tflite-build/build/flatbuffers/include/flatbuffers/stl_emulation.h: In member function ‘constexpr flatbuffers::span<T, Extent>& flatbuffers::span<T, Extent>::operator=(const flatbuffers::span<T, Extent>&)’:
[   11s] /home/abuild/rpmbuild/BUILD/tensorflow-2.10.0/tflite-build/build/flatbuffers/include/flatbuffers/stl_emulation.h:386:12: error: assignment of read-only member ‘flatbuffers::span<T, Extent>::count_’
[   11s]   386 |     count_ = other.count_;
[   11s]       |     ~~~~~~~^~~~~~~~~~~~~~
[   11s] make[2]: *** [_deps/flatbuffers-build/CMakeFiles/flatbuffers.dir/build.make:79: _deps/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/idl_parser.cpp.o] Error 1
Comment 2 Dominique Leuenberger 2024-05-14 12:08:15 UTC
tensorflow-lite is the last gcc12 consumer. Being able to eliminate this dependency would mean we can drop gcc12.