#1128678 libgadu: FTBFS with glibc 2.43 due to ISO C23 const return types

Package:
src:libgadu
Source:
src:libgadu
Submitter:
Aurelien Jarno
Date:
2026-09-09 18:52:02 UTC
Severity:
normal
Tags:
#1128678#5
Date:
2026-02-22 12:32:18 UTC
From:
To:
Dear maintainer(s),

libgadu fails to build from source with glibc 2.43, currently in
experimental. From the build log:

| libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -I.. -I../include -DGG_IGNORE_DEPRECATED -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/libgadu-1.12.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Werror -c dcc7.c  -fPIC -DPIC -o .libs/libgadu_la-dcc7.o
| libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -I.. -I../include -DGG_IGNORE_DEPRECATED -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/libgadu-1.12.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Werror -c events.c  -fPIC -DPIC -o .libs/libgadu_la-events.o

...

| dcc7.c: In function 'gg_dcc7_handle_info':
| dcc7.c:765:27: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
|   765 |                 if (!(tmp = strchr(p->info, ' ')) || !(dcc->remote_port = atoi(tmp + 1))) {
|       |                           ^
| dcc7.c:785:27: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
|   785 |                 if (!(tmp = strstr(p->info, "GG"))) {
|       |                           ^
| libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -I.. -I../include -DGG_IGNORE_DEPRECATED -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/libgadu-1.12.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Werror -c endian.c -o libgadu_la-endian.o >/dev/null 2>&1
| events.c: In function 'gg_handle_reading_hub_proxy':
| events.c:1098:21: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
|  1098 |                 tmp = strchr(body, '\n');
|       |                     ^

...

| cc1: all warnings being treated as errors
| cc1: all warnings being treated as errors
| make[5]: *** [Makefile:598: libgadu_la-events.lo] Error 1
| make[5]: *** Waiting for unfinished jobs....
| make[5]: *** [Makefile:563: libgadu_la-dcc7.lo] Error 1
| libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -I.. -I../include -DGG_IGNORE_DEPRECATED -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/libgadu-1.12.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Werror -c message.c -o libgadu_la-message.o >/dev/null 2>&1
| libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -I.. -I../include -DGG_IGNORE_DEPRECATED -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/libgadu-1.12.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Werror -c dcc.c -o libgadu_la-dcc.o >/dev/null 2>&1
| libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -I.. -I../include -DGG_IGNORE_DEPRECATED -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/libgadu-1.12.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Werror -c libgadu.c -o libgadu_la-libgadu.o >/dev/null 2>&1
| libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -I.. -I../include -DGG_IGNORE_DEPRECATED -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/libgadu-1.12.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Werror -c handlers.c -o libgadu_la-handlers.o >/dev/null 2>&1
| make[5]: Leaving directory '/build/reproducible-path/libgadu-1.12.2/src'
| make[4]: *** [Makefile:417: all] Error 2
| make[4]: Leaving directory '/build/reproducible-path/libgadu-1.12.2/src'
| make[3]: *** [Makefile:440: all-recursive] Error 1
| make[3]: Leaving directory '/build/reproducible-path/libgadu-1.12.2'
| make[2]: *** [Makefile:372: all] Error 2
| make[2]: Leaving directory '/build/reproducible-path/libgadu-1.12.2'
| dh_auto_build: error: make -j128 CFLAGS="-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/libgadu-1.12.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Werror" returned exit code 2
| make[1]: *** [debian/rules:28: override_dh_auto_build] Error 25
| make[1]: Leaving directory '/build/reproducible-path/libgadu-1.12.2'
| make: *** [debian/rules:10: binary] Error 2
| dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2

The full build log is available here [1].

The issue is due to ISO C23 declaration of bsearch, memchr, strchr,
strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr,
which now returns a pointer to a const-qualified type when the input
argument is a pointer to a const-qualified type [2].

I would like to thanks Emanuele Rocca for doing the archive rebuild on
a fast arm64 server.

Regards
Aurelien

[1] https://people.debian.org/~ema/glibc-2.43-rebuilds/output-1/libgadu_arm64.build
[2] https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=e271fb2e4d76903c77a302aaec1ca22ce31027d0;hb=f762ccf84f122d1354f103a151cba8bde797d521#l19

#1128678#12
Date:
2026-08-10 12:44:53 UTC
From:
To:
control: severity 1127629 serious
control: severity 1128547 serious
control: severity 1128734 serious
control: severity 1128740 serious
control: severity 1128528 serious
control: severity 1128532 serious
control: severity 1128534 serious
control: severity 1128541 serious
control: severity 1128544 serious
control: severity 1128545 serious
control: severity 1128548 serious
control: severity 1128549 serious
control: severity 1128551 serious
control: severity 1128615 serious
control: severity 1128678 serious
control: severity 1128680 serious
control: severity 1128681 serious
control: severity 1128697 serious
control: severity 1128736 serious
control: severity 1128737 serious
control: severity 1128738 serious
control: severity 1128741 serious
control: severity 1128742 serious
control: severity 1128743 serious
control: severity 1128750 serious
control: severity 1128757 serious
control: severity 1128761 serious
control: severity 1128763 serious
control: severity 1128764 serious
control: severity 1128875 serious
control: severity 1128952 serious
control: severity 1128542 serious
control: severity 1128679 serious
control: severity 1128682 serious
control: severity 1128744 serious
control: severity 1128748 serious
control: severity 1128867 serious

Hi,

With the upload of glibc 2.43 to unstable, the packages now FTBFS in
unstable, hence upgrading the severity to serious.

Note that as a quick workaround, it is possible to roll back to C/C++17
standard using -std=c17, -std=gnu17, std=c++17 or std=gnu++17. This was
the default up to GCC 14, and GCC 15 changed it to C/C23.

Regards
Aurelien

#1128678#19
Date:
2026-09-09 18:50:36 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
libgadu, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1128678@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Adrian Bunk <bunk@debian.org> (supplier of updated libgadu package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 09 Sep 2026 21:35:06 +0300
Source: libgadu
Architecture: source
Version: 1:1.12.2-8
Distribution: unstable
Urgency: medium
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Adrian Bunk <bunk@debian.org>
Closes: 1128678
Changes:
 libgadu (1:1.12.2-8) unstable; urgency=medium
 .
   * QA upload.
   * Don;t build with -Werror. (Closes: #1128678)
Checksums-Sha1:
 7447585653ef0f3afcb90570c34e7a7e63a287c6 2194 libgadu_1.12.2-8.dsc
 c80dea038f1a7f0c815eef75f4dff7cfa63b4c2e 9972 libgadu_1.12.2-8.debian.tar.xz
Checksums-Sha256:
 5f0ae4f54d6d550ed9477a6190c76854100762f25d15e8bdb8153f5f3786d381 2194 libgadu_1.12.2-8.dsc
 6380a2cdde5f0c98f7bf6176999eded5700335d69678ebf6bee8e78968992223 9972 libgadu_1.12.2-8.debian.tar.xz
Files:
 3df3366ab804fb58f671aa9bc19a876d 2194 libs optional libgadu_1.12.2-8.dsc
 bc3d311aa0c3c68653f77b7f8608d4f9 9972 libs optional libgadu_1.12.2-8.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEOvp1f6xuoR0v9F3wiNJCh6LYmLEFAmqhp2YACgkQiNJCh6LY
mLF+yxAAt3pnICjB9KRHcF2DDUTK2ZqB1YVumM8v0rPDR84UYcUnn77AXPuNK8pH
Mm1E+85BzMzIOJ4tJMVtfnplkUf2wzdTp4mWbHapMVA4LE0Qf9bzN97KTJzjUAPN
wVhk9pnf68dZgCLV+Sbn4M1Sm/dUp8dNauufj4q747iKVesuni04j/xsAhgfqHPl
TAJeqSQUz8XvAVsKUSpO9NS6D5XnKWYA85epdpwWciU0RvYBRd1dPTbablCYEpin
pfqM0qqhlRW0dCCVZhoVt1keEvguAWkHHX1FUwMY4xChmJfZe369WAcdlA97MNdU
U4b4Oo3RbedzDXKuUIxFtMVCI34o360Ne9Bn6oB1x0IJBFbKp/M5u148XjfDg1ma
QtBuwXymcql97/4PRsx2Z1pqjZGScSRhOfz2OzcvN9PeZtsETaUTr13uBOWaHjjx
2AZUYAY3uhHMDUNWyavcKJXd0WVGZg6OaIS6bXfZdu2030KmYXrzrfKovlKgW1n6
keYHVqjYao24bkMGqP0SXl+xn2YkRYDfL1mFwpTR6rJQLzZcbe4xp0UNjtzgG+Fa
Yy8eIKsARRsq98exXVRX1MJbKj+p941ti8s61msL4XB8Zr24Dk5QSGJwaI7z0Xia
iIZifTJB+nC5jXWLCqNkAtKLL8BqRzW4SqaZr2fSX3kh3z4Pu5M=
=0s3g
-----END PGP SIGNATURE-----