Control: tag -1 patch On Wed, Jul 03, 2024 at 12:25:59PM +0000, Matthias Klose wrote: > Package: src:epic4 > Version: 1:2.10.10-1.1 > Severity: important > Tags: sid trixie > User: debian-...@lists.debian.org > Usertags: ftbfs-gcc-14
> checking whether the C compiler (gcc ) works... no > configure: error: installation or configuration problem: C compiler cannot > create executables. > make: *** [debian/rules:14: build-stamp] Error 1 Turns out this was recently broken on sid both by GCC 14 and glibc 2.39. The above error is because the generated configure script is outdated and fails with GCC 14 due to implicit int types (-Werror=implicit-int). This is fixed by the first attached patch, which adds a dh_autoreconf call to regenerate the configure script. With that, we see make[2]: Entering directory '/<<PKGBUILDDIR>>/source' gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -I./../include -I../include -c alias.c In file included from ./../include/irc.h:28, from alias.c:39: ./../include/irc_std.h:299:8: error: redefinition of ‘struct sockaddr_storage’ 299 | struct sockaddr_storage { | ^~~~~~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/sys/socket.h:33, from ./../include/irc_std.h:52: /usr/include/x86_64-linux-gnu/bits/socket.h:196:39: note: originally defined here 196 | struct __attribute_struct_may_alias__ sockaddr_storage | ^~~~~~~~~~~~~~~~ make[2]: *** [Makefile:31: alias.o] Error 1 because the configure probe for sockaddr_storage no longer detects it properly on glibc >= 2.39. The socket headers in glibc were changed to include the may_alias attribute, making the tightly specified regex in AC_EGREP_HEADER not match anymore, see https://sourceware.org/git/?p=glibc.git;a=commit;h=26e7005728 The second attached patch relaxes all the AC_EGREP_HEADER regexes to allow for other similar changes in the future. I have tested that the package builds for me with these, and checked that the changed AC_EGREP_HEADER probes get the same result on amd64 as they did in the last successful buildd log. I have not checked the configure results otherwise, and I have not tested the resulting binaries in any way. Hope this helps, -- Niko Tyni nt...@debian.org
>From d05f5406b2fe63b7c351906ce275020c0511239d Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Fri, 2 Aug 2024 09:23:23 +0100 Subject: [PATCH] Run dh_autoreconf before the build The bundled configure script fails with GCC 14 due to implicit int types (-Werror=implicit-int). --- debian/control | 2 +- debian/rules | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 42663e2..e7cfc91 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: net Priority: optional Maintainer: Kurt Roeckx <k...@roeckx.be> Standards-Version: 3.8.3 -Build-depends: debhelper (>= 5), libncurses5-dev, libssl-dev, libperl-dev +Build-depends: debhelper (>= 5), libncurses5-dev, libssl-dev, libperl-dev, dh-autoreconf Homepage: http://www.epicsol.org/ Package: epic4 diff --git a/debian/rules b/debian/rules index 11a502e..f4ffd5a 100755 --- a/debian/rules +++ b/debian/rules @@ -11,6 +11,7 @@ build-arch: build-stamp build-indep: build-stamp build-stamp: dh_testdir + dh_autoreconf ./configure --prefix=/usr --mandir=/usr/share/man \ --with-ssl \ --with-ipv6 \ -- 2.45.2
From: Niko Tyni <nt...@debian.org> Date: Fri, 2 Aug 2024 09:31:19 +0100 X-Dgit-Generated: 1:2.10.10-1.1 0171eb699acbdd8569c31b2a5ebe0ac173571ed3 Subject: Fix configure probes for sockaddr_storage et al on glibc >= 2.39 glibc 2.39 changed the socket headers to include the may_alias attribute in https://sourceware.org/git/?p=glibc.git;a=commit;h=26e7005728 -struct sockaddr +struct __attribute_struct_may_alias__ sockaddr This makes the tightly specified regex in the corresponding AC_EGREP_HEADER probe miss the definition. Pre-emptively loosen other AC_EGREP_HEADER as well. --- diff --git a/configure.in b/configure.in index 50cc684..d1e5fd4 100644 --- a/configure.in +++ b/configure.in @@ -297,7 +297,7 @@ dnl check for struct linger dnl AC_MSG_CHECKING(for struct linger) -AC_EGREP_HEADER([struct( | )*linger], sys/socket.h, +AC_EGREP_HEADER([struct.*linger], sys/socket.h, AC_MSG_RESULT(yes), AC_DEFINE(NO_STRUCT_LINGER) AC_MSG_RESULT(no. ugh.)) @@ -518,19 +518,19 @@ AC_ARG_WITH(ipv6, ],[AC_MSG_RESULT(yes)]) AC_MSG_CHECKING(for struct sockaddr_storage) -AC_EGREP_HEADER([struct( | )*sockaddr_storage], sys/socket.h, +AC_EGREP_HEADER([struct.*sockaddr_storage], sys/socket.h, AC_MSG_RESULT(yes) AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE), AC_MSG_RESULT(no)) AC_MSG_CHECKING(for struct sockaddr_in6) -AC_EGREP_HEADER([struct( | )*sockaddr_in6], netinet/in.h, +AC_EGREP_HEADER([struct.*sockaddr_in6], netinet/in.h, AC_MSG_RESULT(yes) AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6), AC_MSG_RESULT(no)) AC_MSG_CHECKING(for struct addrinfo) -AC_EGREP_HEADER([struct( | )*addrinfo], netdb.h, +AC_EGREP_HEADER([struct.*addrinfo], netdb.h, AC_MSG_RESULT(yes) AC_DEFINE(HAVE_STRUCT_ADDRINFO), AC_MSG_RESULT(no))