Source: libtpms
Version: 0.10.2-1
Severity: important
Tags: ftbfs upstream
Justification: fails to build from source
User: [email protected]
Usertags: glibc-2.43

Dear maintainer,

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

| libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time 
-D_FORTIFY_SOURCE=2 -include tpm_library_conf.h -I../include/libtpms 
-I../include/libtpms -g -O2 -Werror=implicit-function-declaration 
-ffile-prefix-map=/build/reproducible-path/libtpms-0.10.2=. 
-fstack-protector-strong -fstack-clash-protection -Wformat 
-Werror=format-security -fcf-protection -DUSE_OPENSSL_FUNCTIONS_SYMMETRIC=1 
-DUSE_OPENSSL_FUNCTIONS_EC=1 -DUSE_OPENSSL_FUNCTIONS_ECDSA=1 
-DUSE_OPENSSL_FUNCTIONS_RSA=1 -DUSE_OPENSSL_FUNCTIONS_SSKDF=1 
-DUSE_EC_POINT_GET_AFFINE_COORDINATES_API=1 -Wall -Werror -Wshadow 
-Wreturn-type -Wsign-compare -Wno-self-assign -Wmissing-prototypes 
-fstack-protector-strong -D_FORTIFY_SOURCE=2 -DOPENSSL_SUPPRESS_DEPRECATED 
-DTPM_LIBTPMS_CALLBACKS -DTPM_NV_DISK -g -O2 
-Werror=implicit-function-declaration 
-ffile-prefix-map=/build/reproducible-path/libtpms-0.10.2=. 
-fstack-protector-strong -fstack-clash-protection -Wformat 
-Werror=format-security -fcf-protection -DUSE_OPENSSL_FUNCTIONS_SYMMETRIC=1 
-DUSE_OPENSSL_FUNCTIONS_EC=1 -DUSE_OPENSSL_FUNCTIONS_ECDSA=1 
-DUSE_OPENSSL_FUNCTIONS_RSA=1 -DUSE_OPENSSL_FUNCTIONS_SSKDF=1 
-DUSE_EC_POINT_GET_AFFINE_COORDINATES_API=1 -c tpm_library.c  -fPIC -DPIC -o 
.libs/libtpms_la-tpm_library.o
| tpm_library.c: In function 'TPMLIB_GetPlaintext':
| tpm_library.c:441:11: error: assignment discards 'const' qualifier from 
pointer target type [-Werror=discarded-qualifiers]
|   441 |     start = strstr(stream, starttag);
|       |           ^
| At top level:
| cc1: note: unrecognized command-line option '-Wno-self-assign' may have been 
intended to silence earlier diagnostics
| cc1: all warnings being treated as errors
| make[3]: *** [Makefile:2221: libtpms_la-tpm_library.lo] Error 1
| make[3]: Leaving directory '/build/reproducible-path/libtpms-0.10.2/src'
| make[2]: *** [Makefile:527: all-recursive] Error 1
| make[2]: Leaving directory '/build/reproducible-path/libtpms-0.10.2'
| make[1]: *** [Makefile:434: all] Error 2
| make[1]: Leaving directory '/build/reproducible-path/libtpms-0.10.2'
| dh_auto_build: error: make -j1 returned exit code 2
| make: *** [debian/rules:9: binary] Error 25
| dpkg-buildpackage: error: debian/rules binary subprocess failed with exit 
status 2

The full build log is attached to this bug report.

The issue is due to ISO C23 declaration of strstr, which now returns a
pointer to a const-qualified type when the input argument is a pointer
to a const-qualified type [1].

Regards
Aurelien

[1] 
https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=e271fb2e4d76903c77a302aaec1ca22ce31027d0;hb=f762ccf84f122d1354f103a151cba8bde797d521#l19

Attachment: libtpms_amd64-2026-01-31T22:51:46Z.build.gz
Description: application/gzip

Reply via email to