https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120187
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Using -Werror -Wno-error=deprecated should solve your problem. Abseil should probably be using __has_include(<version>) instead of depending on C++17 vs C++20.