Source: sane-airscan
Version: 0.99.36-2
Severity: important
Tags: ftbfs upstream
Justification: fails to build from source
User: [email protected]
Usertags: glibc-2.43

Dear maintainer(s),

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

| gcc -c -o objs/airscan-http.o airscan-http.c -Wdate-time -D_FORTIFY_SOURCE=2 
-g -O2 -Werror=implicit-function-declaration 
-ffile-prefix-map=/build/reproducible-path/sane-airscan-0.99.36=. 
-fstack-protector-strong -fstack-clash-protection -Wformat 
-Werror=format-security -mbranch-protection=standard -O2 -g -W -Wall -Werror 
-pthread -Wdate-time -D_FORTIFY_SOURCE=2 -D 
CONFIG_SANE_CONFIG_DIR=\"/etc/sane.d\"  -D_REENTRANT  -I/usr/include/libxml2  
-I/usr/include/p11-kit-1    -I/usr/include/libpng16  
-I/usr/include/aarch64-linux-gnu -I/usr/include/webp -fPIC

...

| airscan-http.c: In function ‘http_uri_str_chr’:
| airscan-http.c:668:12: error: return discards ‘const’ qualifier from pointer 
target type [-Werror=discarded-qualifiers]
|   668 |     return memchr(beg, c, end - beg);
|       |            ^~~~~~
| airscan-http.c: In function ‘http_data_set_content_type’:
| airscan-http.c:1789:11: error: assignment discards ‘const’ qualifier from 
pointer target type [-Werror=discarded-qualifiers]
|  1789 |         s = strchr(content_type, ';');
|       |           ^
| airscan-http.c: In function ‘http_query_set_host’:
| airscan-http.c:2195:10: error: assignment discards ‘const’ qualifier from 
pointer target type [-Werror=discarded-qualifiers]
|  2195 |     host = strstr(http_uri_str(q->uri), "//") + 2;
|       |          ^
| cc1: all warnings being treated as errors
| make[1]: *** [Makefile:99: objs/airscan-http.o] Error 1
| make[1]: *** Waiting for unfinished jobs....
| make[1]: Leaving directory '/build/reproducible-path/sane-airscan-0.99.36'
| dh_auto_build: error: make -j128 INSTALL="install --strip-program=true" 
returned exit code 2
| make: *** [debian/rules:6: binary] Error 25
| 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/sane-airscan_arm64.build
[2] 
https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=e271fb2e4d76903c77a302aaec1ca22ce31027d0;hb=f762ccf84f122d1354f103a151cba8bde797d521#l19

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
[email protected]                     http://aurel32.net

Reply via email to