Bugzilla – Bug 1223674
tensorflow-lite fails to build with GCC 13, keeps gcc12 from being removed
Last modified: 2024-05-14 13:58:53 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.
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
tensorflow-lite is the last gcc12 consumer. Being able to eliminate this dependency would mean we can drop gcc12.