FTBFS 4.13-10ubuntu3 when building with GCC 11

Bug #1939352 reported by Bryce Harrington
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Squid
Fix Released
Medium
Unassigned
squid (Debian)
Fix Released
Unknown
squid (Ubuntu)
Fix Released
Undecided
Sergio Durigan Junior

Bug Description

https://people.canonical.com/~doko/ftbfs-report/test-rebuild-20210805-impish-impish.html#ubuntu-server

https://launchpadlibrarian.net/552666498/buildlog_ubuntu-impish-amd64.squid_4.13-10ubuntu3_BUILDING.txt.gz

ConnMark.cc: In member function ‘nfmark_t Acl::ConnMark::getNumber(Parser::Tokenizer&, const SBuf&) const’:
ConnMark.cc:43:23: error: ‘numeric_limits’ is not a member of ‘std’
   43 | if (number > std::numeric_limits<nfmark_t>::max()) {
      | ^~~~~~~~~~~~~~

ConnMark.cc:43:46: error: expected primary-expression before ‘>’ token
   43 | if (number > std::numeric_limits<nfmark_t>::max()) {
      | ^
ConnMark.cc:43:52: error: no matching function for call to ‘max()’
   43 | if (number > std::numeric_limits<nfmark_t>::max()) {
      | ~~~~~^~
In file included from ../../compat/compat.h:87,
                 from ../../include/squid.h:43,
                 from ConnMark.cc:11:
../../compat/compat_shared.h:142:1: note: candidate: ‘template<class A> const A& max(const A&, const A&)’
  142 | max(A const & lhs, A const & rhs)
      | ^~~
../../compat/compat_shared.h:142:1: note: template argument deduction/substitution failed:
ConnMark.cc:43:52: note: candidate expects 2 arguments, 0 provided
   43 | if (number > std::numeric_limits<nfmark_t>::max()) {
      | ~~~~~^~
make[6]: *** [Makefile:1110: ConnMark.lo] Error 1

Related branches

Bryce Harrington (bryce)
tags: added: ftbfs
Revision history for this message
Amos Jeffries (yadi) wrote :
Changed in squid:
importance: Unknown → Undecided
status: Unknown → New
importance: Undecided → Medium
status: New → Fix Released
Changed in squid (Ubuntu):
status: New → Triaged
Revision history for this message
Paride Legovini (paride) wrote :

I can reproduce the ftbfs locally with sbuild. Tried to cherry-pick the patch linked by Amos, which applies cleanly, but the build still fails:

Icmp4.cc: In member function ‘Icmp4::SendEcho(Ip::Address&, int, char const*, int)’:
Icmp4.cc:116:11: error: array subscript ‘struct icmpEchoData[0]’ is partly outside array bounds of ‘char[282]’ [-Werror=array-bounds]
  116 | echo->opcode = (unsigned char) opcode;
      | ~~~~~~^~~~~~
In file included from ../../include/squid.h:87,
                 from Icmp4.cc:13:
Icmp4.cc:87:23: note: while referencing ‘Icmp4::SendEcho(Ip::Address&, int, char const*, int)::pkt’
   87 | LOCAL_ARRAY(char, pkt, MAX_PKT4_SZ);
      | ^~~
cc1plus: all warnings being treated as errors
make[5]: *** [Makefile:959: Icmp6.o] Error 1
make[5]: *** Waiting for unfinished jobs....
cc1plus: all warnings being treated as errors
make[5]: *** [Makefile:959: Icmp4.o] Error 1

Changed in squid (Debian):
status: Unknown → New
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

It seems there are more gcc fixes in 4.16, maybe time to cherry-pick more here to keep this serviceable on release of Impish. Setting server-next to evaluate upstream git for the further fixed.

On the Debian side 4.16 has all of it and will be uploaded , but no more imported since we are in feature/import-freeze.

tags: added: server-next
Changed in squid (Ubuntu):
assignee: nobody → Sergio Durigan Junior (sergiodj)
status: Triaged → In Progress
summary: - FTBFS 4.13-10ubuntu3 error: ‘numeric_limits’ is not a member of ‘std’
+ FTBFS 4.13-10ubuntu3 when building with GCC 11
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package squid - 4.13-10ubuntu4

---------------
squid (4.13-10ubuntu4) impish; urgency=medium

  * Fix FTBFS with GCC 11 (LP: #1939352)
    - d/p/add-missing-limits-include-connmark.patch: Add missing
      <limits> include to src/acl/ConnMark.cc.
    - d/p/fix-max-pkt-sz-for-icmpEchoData-padding.patch.patch: Expand
      MAX_PKT{4,6}_SZ to accomodate for icmp{,6_}hdr.
    - d/p/replace-cbdata-offset-hack-with-offsetof.patch: Replace
      cbdata::Offset hack with offsetof().
    - d/p/workaround-gcc11-wstringop-overread-bug.patch: Workaround
      GCC 11 -Wstringop-overread bug.

 -- Sergio Durigan Junior <email address hidden> Fri, 20 Aug 2021 00:19:41 -0400

Changed in squid (Ubuntu):
status: In Progress → Fix Released
Changed in squid (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.