Bug#1105685: splint: FTBFS with make --shuffle=reverse: Headers/flag_codes.h:22:11: fatal error: flag_codes.gen: No such file or directory

2025-07-01 Thread Richard Lewis
control: tags -1 patch

On Tue, 13 May 2025, 20:23 Lucas Nussbaum,  wrote:

> This package fails to build with make --shuffle=reverse.
> > Headers/flag_codes.h:22:11: fatal error: flag_codes.gen: No such file or
> directory
>

It looks like you can fix this by adding to src/Makefile.am

mapping.o: Headers/flag_codes.gen

(untested, other than it fixes the build)
commit 37233125ca7f0c93c4e82bdff055e80dd7857b07 (HEAD -> master)
Author: Richard Lewis 
Date:   Mon May 19 10:54:34 2025 +0100

Build flag_codes.gen before mapping.o
---
 ...021-Build-flag_codes.gen-before-mapping.o.patch | 25 ++
 debian/patches/series  |  1 +
 2 files changed, 26 insertions(+)

diff --git a/debian/patches/0021-Build-flag_codes.gen-before-mapping.o.patch b/debian/patches/0021-Build-flag_codes.gen-before-mapping.o.patch
new file mode 100644
index 000..2a1da18
--- /dev/null
+++ b/debian/patches/0021-Build-flag_codes.gen-before-mapping.o.patch
@@ -0,0 +1,25 @@
+From: Richard Lewis 
+Date: Mon, 19 May 2025 10:49:55 +0100
+Subject: Build flag_codes.gen before mapping.o
+
+The src/Makefile.am does not declare that src/mapping.o depends on src/Headers/flag_codes.gen
+Adding this fixes a FTBFS when make is given --shuffle=reverse
+
+Closes: #1105685
+---
+ src/Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 119ebef..a90fc45 100644
+--- a/src/Makefile.am
 b/src/Makefile.am
+@@ -371,6 +371,8 @@ Headers/flag_codes.gen: flags.def
+ 	$(MAKE)
+ 	cd ../lib; $(MAKE)
+ 
++mapping.o: Headers/flag_codes.gen
++
+ ## Checking rules
+ 
+ CHECKS = $(subst .c,.check,$(splint_SOURCES))
diff --git a/debian/patches/series b/debian/patches/series
index 2e77f6f..f26c18d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -18,3 +18,4 @@
 18_multiarch_include.patch
 19_fix_timespec_def.patch
 20_cscannerHelp_internal_bug.patch
+0021-Build-flag_codes.gen-before-mapping.o.patch


Bug#1105685: splint: FTBFS with make --shuffle=reverse: Headers/flag_codes.h:22:11: fatal error: flag_codes.gen: No such file or directory

2025-05-13 Thread Lucas Nussbaum
Source: splint
Version: 1:3.1.2+dfsg-5
Severity: minor
Tags: trixie sid ftbfs
User: [email protected]
Usertags: ftbfs-shuffle

Hi,

GNU Make now has a --shuffle option that simulates non-deterministic ordering
of target prerequisites. See
https://trofi.github.io/posts/238-new-make-shuffle-mode.html and also previous
work in Debian by Santiago Vila:
https://people.debian.org/~sanvila/make-shuffle/

This package fails to build with make --shuffle=reverse.
This is likely to be caused by a missing dependency in
debian/rules or an upstream Makefile.

More information about this mass bug filing is available at
https://wiki.debian.org/qa.debian.org/FTBFS/Shuffle

Relevant part (hopefully):
> gcc -DHAVE_CONFIG_H -I. -I..  -IHeaders -Wdate-time -D_FORTIFY_SOURCE=2   -g 
> -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/build/reproducible-path/splint-3.1.2+dfsg=. 
> -fstack-protector-strong -fstack-clash-protection -Wformat 
> -Werror=format-security -fcf-protection -c `test -f mapping.c || echo 
> './'`mapping.c
> In file included from Headers/basic.h:50,
>  from mapping.c:35:
> Headers/flag_codes.h:22:11: fatal error: flag_codes.gen: No such file or 
> directory
>22 | # include "flag_codes.gen"
>   |   ^~~~
> compilation terminated.
> make[3]: *** [Makefile:1742: mapping.o] Error 1 shuffle=reverse


The full build log is available from:
http://qa-logs.debian.net/2025/05/05/shuffle/reverse/splint_3.1.2+dfsg-5_unstable_reverse.log

If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects