Subject: Bug#1097928: squidguard: ftbfs with GCC-15

From: Matthias Klose <[email-masked]>
Date: Mon, 17 Feb 2025 17:54:56 +0000

Package: src:squidguard
Version: 1.6.0-6
Severity: important
Tags: sid forky
User: [email-masked]
Usertags: ftbfs-gcc-15

[This bug is NOT targeted to the upcoming trixie release]

Please keep this issue open in the bug tracker for the package it
was filed for.  If a fix in another package is required, please
file a bug for the other package (or clone), and add a block in this
package. Please keep the issue open until the package can be built in
a follow-up test rebuild.

The package fails to build in a test rebuild on at least amd64 with
gcc-15/g++-15, but succeeds to build with gcc-14/g++-14. The
severity of this report will be raised before the forky release.

The full build log can be found at:
http://qa-logs.debian.net/2025/02/16/amd64exp/squidguard_1.6.0-6_unstable_gccexp.log.gz
The last lines of the build log are at the end of this report.

To build with GCC 15, either set CC=gcc-15 CXX=g++-15 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++ 

GCC 15 now defaults to the C23/C++23 standards, exposing many FTBFS.
Other Common build failures are new warnings resulting in build failures
with -Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-15/porting_to.html

[...]
checking for unistd.h... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for db.h... yes
checking for regex.h... yes
checking for unistd.h... (cached) yes
checking for db.h... (cached) yes
checking suppress runtime logging... yes
checking syslog for logging... no
checking squid runtime user ... squid
checking for ldap_init in -lldap... yes
checking for ldap support... yes
checking for mysql support... no
checking for pthread_create in -lpthread... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for regcomp... yes
checking for regerror... yes
checking for regexec... yes
checking for strdup... yes
checking for strerror... yes
checking for vsnprintf... yes
checking for sigaction... yes
checking for signal... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/main.c
config.status: creating src/sgLog.c
config.status: creating src/sgDiv.c
config.status: creating src/sg.h
config.status: creating src/sg.y
config.status: creating test/Makefile
config.status: creating test/test1.conf
config.status: creating test/test2.conf
config.status: creating samples/Makefile
config.status: creating samples/sample.conf
config.status: creating samples/squidGuard.cgi
config.status: creating samples/squidGuard-simple.cgi
config.status: creating samples/squidGuard-simple-de.cgi
config.status: creating contrib/Makefile
config.status: creating contrib/squidGuardRobot/squidGuardRobot
config.status: creating contrib/sgclean/sgclean
config.status: creating contrib/hostbyname/hostbyname
config.status: creating src/config.h
make[1]: Leaving directory '/build/reproducible-path/squidguard-1.6.0'
   dh_auto_build -O--no-parallel
	make -j1
make[1]: Entering directory '/build/reproducible-path/squidguard-1.6.0'
making all in squidguard-1.6.0
make[2]: Entering directory '/build/reproducible-path/squidguard-1.6.0/src'
making all in src
gcc -I.. -I. -I. -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -DHAVE_CONFIG_H -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/squidguard-1.6.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -DLDAP_DEPRECATED -I/usr/include -I/usr/include -c main.c
gcc -I.. -I. -I. -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -DHAVE_CONFIG_H -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/squidguard-1.6.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -DLDAP_DEPRECATED -I/usr/include -I/usr/include -c sgLog.c
gcc -I.. -I. -I. -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include -DHAVE_CONFIG_H -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/squidguard-1.6.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -DLDAP_DEPRECATED -I/usr/include -I/usr/include -c sgDb.c
sgDb.c:30:6: error: conflicting types for ‘sgDbInit’; have ‘void(struct sgDb *, char *)’
   30 | void sgDbInit(struct sgDb *Db, char *file)
      |      ^~~~~~~~
In file included from sgDb.c:19:
sg.h:434:8: note: previous declaration of ‘sgDbInit’ with type ‘void(void)’
  434 | void   sgDbInit __P(());
      |        ^~~~~~~~
make[2]: *** [Makefile:71: sgDb.o] Error 1
make[2]: Leaving directory '/build/reproducible-path/squidguard-1.6.0/src'
make[1]: *** [Makefile:34: all] Error 1
make[1]: Leaving directory '/build/reproducible-path/squidguard-1.6.0'
dh_auto_build: error: make -j1 returned exit code 2
make: *** [debian/rules:11: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

---

From: "Debian Bug Tracking System" <[email-masked]>
Date: Mon, 17 Feb 2025 17:55:50 +0000

Thank you for filing a new Bug report with Debian.

You can follow progress on this Bug here: 1097928: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097928.

This is an automatically generated reply to let you know your message
has been received.

Your message has been forwarded to the package maintainers (but not
other interested parties, as you requested) for their attention; they
will reply in due course.

Your message has been sent to the package maintainer(s):
 Joachim Wiedorn <[email-masked]>

If you wish to submit further information on this problem, please
send it to [email-masked].

Please do not send mail to [email-masked] unless you wish
to report a problem with the Bug-tracking system.

-- 
1097928: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097928
Debian Bug Tracking System
Contact [email-masked] with problems