Bug#1066490: motif: FTBFS: XpmCrBufFrI.c:155:5: error: implicit declaration of function ‘strcpy’ [-Werror=implicit-function-declaration]
Hello, Lucas Nussbaum, le mer. 13 mars 2024 12:53:39 +0100, a ecrit: > > XpmCrBufFrI.c:155:5: error: implicit declaration of function ‘strcpy’ > > [-Werror=implicit-function-declaration] > > 155 | strcpy(ptr, buf); > > | ^~ Given the severity, the importance of the package, the time_t rebuild issues, and the simplicity of a fix, I have uploaded the attached changes to DELAYED/0. Samuel diff -Nru motif-2.3.8/debian/changelog motif-2.3.8/debian/changelog --- motif-2.3.8/debian/changelog2020-07-02 11:30:19.0 +0200 +++ motif-2.3.8/debian/changelog2024-03-21 23:42:09.0 +0100 @@ -1,3 +1,10 @@ +motif (2.3.8-3.1) unstable; urgency=medium + + * Non-maintainer upload + * patches/implicit: Fix build with qa=+bug-implicit-func (Closes: #1066490) + + -- Samuel Thibault Thu, 21 Mar 2024 23:42:09 +0100 + motif (2.3.8-3) unstable; urgency=medium [ Graham Inggs ] diff -Nru motif-2.3.8/debian/patches/implicit motif-2.3.8/debian/patches/implicit --- motif-2.3.8/debian/patches/implicit 1970-01-01 01:00:00.0 +0100 +++ motif-2.3.8/debian/patches/implicit 2024-03-21 23:38:08.0 +0100 @@ -0,0 +1,26 @@ +--- + demos/unsupported/xmform/xmform.c |1 + + lib/Xm/XpmI.h |2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +--- a/lib/Xm/XpmI.h b/lib/Xm/XpmI.h +@@ -129,7 +129,7 @@ extern "C" { + extern FILE *popen(); + #endif + +-#if defined(SYSV) || defined(SVR4) || defined(VMS) || defined(WIN32) || defined (_SVID_SOURCE) ++#if defined(SYSV) || defined(SVR4) || defined(VMS) || defined(WIN32) || defined (_SVID_SOURCE) || defined (_POSIX_SOURCE) + #include + + #ifndef index +--- a/demos/unsupported/xmform/xmform.c b/demos/unsupported/xmform/xmform.c +@@ -50,6 +50,7 @@ xmform*topShadowColor: white + xmform*bottomShadowColor:black + ***---*/ + ++#include + #include + #include + #include diff -Nru motif-2.3.8/debian/patches/series motif-2.3.8/debian/patches/series --- motif-2.3.8/debian/patches/series 2020-07-02 10:59:29.0 +0200 +++ motif-2.3.8/debian/patches/series 2024-03-21 23:37:12.0 +0100 @@ -17,3 +17,4 @@ pass-hardening-flags.patch revert-fix-1617.patch cross.patch +implicit
Bug#1066490: motif: FTBFS: XpmCrBufFrI.c:155:5: error: implicit declaration of function ‘strcpy’ [-Werror=implicit-function-declaration]
Source: motif Version: 2.3.8-3 Severity: serious Justification: FTBFS Tags: trixie sid ftbfs User: lu...@debian.org Usertags: ftbfs-20240313 ftbfs-trixie ftbfs-impfuncdef Hi, During a rebuild of all packages in sid, your package failed to build on amd64. This is most likely caused by a change in dpkg 1.22.6, that enabled -Werror=implicit-function-declaration. For more information, see https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration Relevant part (hopefully): > /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > -I../../include -I.. -I./.. -DXMBINDDIR_FALLBACK=\"/usr/share/X11/bindings\" > -DINCDIR=\"/usr/include/X11\" -DLIBDIR=\"/usr/lib/x86_64-linux-gnu/X11\" > -DX11RGBPATH=\"/etc/X11/rgb.txt\" -Wdate-time -D_FORTIFY_SOURCE=2 > -I/usr/include/freetype2 -I/usr/include/libpng16 -g -O2 > -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. > -fstack-protector-strong -fstack-clash-protection -Wformat > -Werror=format-security -fcf-protection -D_FILE_OFFSET_BITS=64 -Wall -g > -fno-strict-aliasing -Wno-unused -Wno-comment -I/usr/include/freetype2 > -I/usr/include/libpng16-c -o XpmCrBufFrP.lo XpmCrBufFrP.c > XpmCrBufFrI.c: In function ‘XmeXpmCreateBufferFromXpmImage’: > XpmCrBufFrI.c:155:5: error: implicit declaration of function ‘strcpy’ > [-Werror=implicit-function-declaration] > 155 | strcpy(ptr, buf); > | ^~ > XpmCrBufFrI.c:47:1: note: include ‘’ or provide a declaration of > ‘strcpy’ >46 | #include "XpmI.h" > +++ |+#include >47 | > XpmCrBufFrI.c:155:5: warning: incompatible implicit declaration of built-in > function ‘strcpy’ [-Wbuiltin-declaration-mismatch] > 155 | strcpy(ptr, buf); > | ^~ > XpmCrBufFrI.c:155:5: note: include ‘’ or provide a declaration of > ‘strcpy’ > XpmCrBufFrI.c: In function ‘WriteColors’: > XpmCrBufFrI.c:292:9: error: implicit declaration of function ‘strncpy’ > [-Werror=implicit-function-declaration] > 292 | strncpy(s, *defaults++, cpp); > | ^~~ > XpmCrBufFrI.c:292:9: note: include ‘’ or provide a declaration of > ‘strncpy’ > XpmCrBufFrI.c:292:9: warning: incompatible implicit declaration of built-in > function ‘strncpy’ [-Wbuiltin-declaration-mismatch] > XpmCrBufFrI.c:292:9: note: include ‘’ or provide a declaration of > ‘strncpy’ > XpmCrBufFrI.c:312:9: warning: incompatible implicit declaration of built-in > function ‘strcpy’ [-Wbuiltin-declaration-mismatch] > 312 | strcpy(s, "\",\n"); > | ^~ > XpmCrBufFrI.c:312:9: note: include ‘’ or provide a declaration of > ‘strcpy’ > XpmCrBufFrI.c:316:45: error: implicit declaration of function ‘strlen’ > [-Werror=implicit-function-declaration] > 316 |(*data_size + l - *used_size) <= strlen(buf)) > | ^~ > XpmCrBufFrI.c:316:45: note: include ‘’ or provide a declaration of > ‘strlen’ > XpmCrBufFrI.c:316:45: warning: incompatible implicit declaration of built-in > function ‘strlen’ [-Wbuiltin-declaration-mismatch] > XpmCrBufFrI.c:316:45: note: include ‘’ or provide a declaration of > ‘strlen’ > XpmCrBufFrI.c: In function ‘WritePixels’: > XpmCrBufFrI.c:352:13: warning: incompatible implicit declaration of built-in > function ‘strncpy’ [-Wbuiltin-declaration-mismatch] > 352 | strncpy(s, colors[*pixels].string, cpp); /* how can we > trust *pixels? :-\ */ > | ^~~ > XpmCrBufFrI.c:352:13: note: include ‘’ or provide a declaration of > ‘strncpy’ > XpmCrBufFrI.c:357:9: warning: incompatible implicit declaration of built-in > function ‘strcpy’ [-Wbuiltin-declaration-mismatch] > 357 | strcpy(s, "\",\n"); > | ^~ > XpmCrBufFrI.c:357:9: note: include ‘’ or provide a declaration of > ‘strcpy’ > XpmCrBufFrI.c:365:9: warning: incompatible implicit declaration of built-in > function ‘strncpy’ [-Wbuiltin-declaration-mismatch] > 365 | strncpy(s, colors[*pixels].string, cpp); /* how can we trust > *pixels? */ > | ^~~ > XpmCrBufFrI.c:365:9: note: include ‘’ or provide a declaration of > ‘strncpy’ > XpmCrBufFrI.c: In function ‘ExtensionsSize’: > XpmCrBufFrI.c:385:17: warning: incompatible implicit declaration of built-in > function ‘strlen’ [-Wbuiltin-declaration-mismatch] > 385 | size += strlen(ext->name) + 11; > | ^~ > XpmCrBufFrI.c:385:17: note: include ‘’ or provide a declaration of > ‘strlen’ > XpmCrBufFrI.c: In function ‘WriteExtensions’: > XpmCrBufFrI.c:428:5: warning: incompatible implicit declaration of built-in > function ‘strncpy’ [-Wbuiltin-declaration-mismatch] > 428 | strncpy(s, ",\n\"XPMENDEXT\"", data_size - (s-dataptr)-1); > | ^~~ > XpmCrBufFrI.c:428:5: note: include ‘’ or provide a declaration of > ‘strncpy’ > XpmCrBufFrI.c: In function ‘CommentsSize’: > XpmCrBufFrI.c:441:21: warning: incompatible