Skip to content

Adjust configure.sh to silence another set of protobuf compilation warnings#1043

Open
mhucka wants to merge 3 commits intotensorflow:masterfrom
mhucka:compilation-warnings
Open

Adjust configure.sh to silence another set of protobuf compilation warnings#1043
mhucka wants to merge 3 commits intotensorflow:masterfrom
mhucka:compilation-warnings

Conversation

@mhucka
Copy link
Copy Markdown
Member

@mhucka mhucka commented Apr 10, 2026

Compilation with gcc 15.2 on Debian Linux results in some warnings coming from the Protobuf library:

inlined from 'bool google::protobuf::MessageLite::SerializePartialToZeroCopyStream(google::protobuf::io::ZeroCopyOutputStream*) const' at external/com_google_protobuf/src/google/protobuf/message_lite.cc:411:30:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   30 |                                  __glibc_objsize0 (__dest));
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~

This is difficult to address directly, so this PR adds a narrowly-scoped silencing flag to the compilation arguments.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies configure.sh to add the -Wno-stringop-overflow compiler flag for the protobuf dependency. A review comment correctly identifies that Bazel's per_file_copt option does not support comma-separated flags and will cause compilation errors; the reviewer suggests splitting the flags into multiple configuration lines.

mhucka and others added 2 commits April 10, 2026 14:22
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@mhucka mhucka marked this pull request as ready for review April 10, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant