Bug#1065792: libspf2: FTBFS on arm{el,hf}: spf_utils.c:207:9: error: implicit declaration of function ‘memset’ [-Werror=implicit-function-declaration]

2024-03-19 Thread Michael Hudson-Doyle
Package: libspf2
Followup-For: Bug #1065792
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
X-Debbugs-Cc: michael.hud...@ubuntu.com
Control: tags -1 patch

Dear Maintainer,


In Ubuntu, I just uploaded the following rather than try to be in any
way clever:


  * d/patches/fix-include.patch: Include string.h in spf_utils.c to get a
declaration for memset(). (Closes: #1065792, #1066276)


Thanks for considering the patch.


-- System Information:
Debian Release: trixie/sid
  APT prefers mantic-updates
  APT policy: (500, 'mantic-updates'), (500, 'mantic-security'), (500, 
'mantic'), (100, 'mantic-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-25-generic (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_NZ.UTF-8:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru libspf2-1.2.10/debian/patches/fix-include.patch 
libspf2-1.2.10/debian/patches/fix-include.patch
--- libspf2-1.2.10/debian/patches/fix-include.patch 1970-01-01 
12:00:00.0 +1200
+++ libspf2-1.2.10/debian/patches/fix-include.patch 2024-03-20 
13:27:19.0 +1300
@@ -0,0 +1,10 @@
+--- a/src/libspf2/spf_utils.c
 b/src/libspf2/spf_utils.c
+@@ -19,6 +19,7 @@
+ #ifdef STDC_HEADERS
+ # include  /* malloc / free */
+ # include/* isupper / tolower */
++# include/* memset */
+ #endif
+ 
+ #ifdef HAVE_MEMORY_H
diff -Nru libspf2-1.2.10/debian/patches/series 
libspf2-1.2.10/debian/patches/series
--- libspf2-1.2.10/debian/patches/series2023-10-23 05:33:14.0 
+1300
+++ libspf2-1.2.10/debian/patches/series2024-03-20 13:27:01.0 
+1300
@@ -7,3 +7,4 @@
 Fixed-reverse-macro-modifier.patch
 no-libreplace.patch
 spf_compile.c-more-correct-size-of-ds_avail.patch
+fix-include.patch


Bug#1065792: libspf2: FTBFS on arm{el,hf}: spf_utils.c:207:9: error: implicit declaration of function ‘memset’ [-Werror=implicit-function-declaration]

2024-03-13 Thread Andrey Rakhmatullin
On Sat, Mar 09, 2024 at 10:42:33PM +0100, Sebastian Ramacher wrote:
> /bin/bash ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. 
> -I../.. -I../../src/include -I../../src  -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2  -g 
> -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -Wall -MT 
> spf_utils.lo -MD -MP -MF .deps/spf_utils.Tpo -c -o spf_utils.lo spf_utils.c
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/include 
> -I../../src -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 
> -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -Wall -MT 
> spf_utils.lo -MD -MP -MF .deps/spf_utils.Tpo -c spf_utils.c  -fPIC -DPIC -o 
> .libs/spf_utils.o
> spf_utils.c: In function ‘SPF_recalloc’:
> spf_utils.c:207:9: error: implicit declaration of function ‘memset’ 
> [-Werror=implicit-function-declaration]
>   207 | memset(*bufp, '\0', *buflenp);
>   | ^~
> spf_utils.c:32:1: note: include ‘’ or provide a declaration of 
> ‘memset’
>31 | #include "spf_internal.h"
>   +++ |+#include 
>32 | 
> spf_utils.c:207:9: warning: incompatible implicit declaration of built-in 
> function ‘memset’ [-Wbuiltin-declaration-mismatch]
>   207 | memset(*bufp, '\0', *buflenp);
>   | ^~
> spf_utils.c:207:9: note: include ‘’ or provide a declaration of 
> ‘memset’
I've checked the package and while the file already has #include
 it has it under #ifdef HAVE_MEMORY_H, and configure doesn't
seem to set that define in config.h. So it may be a question of
modernizing (they are from 2012) or fixing the autotools files.

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Bug#1065792: libspf2: FTBFS on arm{el,hf}: spf_utils.c:207:9: error: implicit declaration of function ‘memset’ [-Werror=implicit-function-declaration]

2024-03-09 Thread Sebastian Ramacher
Source: libspf2
Version: 1.2.10-8.1
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: sramac...@debian.org

https://buildd.debian.org/status/fetch.php?pkg=libspf2=armhf=1.2.10-8.1=1709162644=0

/bin/bash ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. 
-I../.. -I../../src/include -I../../src  -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 
-Werror=implicit-function-declaration -ffile-prefix-map=/<>=. 
-fstack-protector-strong -fstack-clash-protection -Wformat 
-Werror=format-security -Wall -MT spf_utils.lo -MD -MP -MF .deps/spf_utils.Tpo 
-c -o spf_utils.lo spf_utils.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/include 
-I../../src -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 
-Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration 
-ffile-prefix-map=/<>=. -fstack-protector-strong 
-fstack-clash-protection -Wformat -Werror=format-security -Wall -MT 
spf_utils.lo -MD -MP -MF .deps/spf_utils.Tpo -c spf_utils.c  -fPIC -DPIC -o 
.libs/spf_utils.o
spf_utils.c: In function ‘SPF_recalloc’:
spf_utils.c:207:9: error: implicit declaration of function ‘memset’ 
[-Werror=implicit-function-declaration]
  207 | memset(*bufp, '\0', *buflenp);
  | ^~
spf_utils.c:32:1: note: include ‘’ or provide a declaration of 
‘memset’
   31 | #include "spf_internal.h"
  +++ |+#include 
   32 | 
spf_utils.c:207:9: warning: incompatible implicit declaration of built-in 
function ‘memset’ [-Wbuiltin-declaration-mismatch]
  207 | memset(*bufp, '\0', *buflenp);
  | ^~
spf_utils.c:207:9: note: include ‘’ or provide a declaration of 
‘memset’
cc1: some warnings being treated as errors
make[5]: *** [Makefile:549: spf_utils.lo] Error 1

Cheers
-- 
Sebastian Ramacher