summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2025-10-22 12:34:42 +0900
committerAndreas Enge <andreas@enge.fr>2026-07-18 10:40:38 +0200
commitc4c2e39fd3602aba48d7d211f75277470b192401 (patch)
tree647be8527c1ab80b23ca9d51624e5759dd752872
parentba0434e7342a48e063a40dc9119a6e402577bee8 (diff)
gnu: flex: Apply a patch fixing a non-deterministic build failure.
* gnu/packages/patches/flex-fix-make-dependencies.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/compiler-tools (flex)[source]: Apply it. * gnu/packages/commencement.scm (flex-boot0)[source]: Wrap in ‘bootstrap-origin’ to avoid circular dependency. Change-Id: I7b9994a9239bdafa5c7768b9f954870716c76ad7 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/commencement.scm1
-rw-r--r--gnu/packages/compiler-tools.scm3
-rw-r--r--gnu/packages/patches/flex-fix-make-dependencies.patch54
4 files changed, 58 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index c8352c83cc5..c4a8e4780ed 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1337,6 +1337,7 @@ dist_patch_DATA = \
1337 %D%/packages/patches/flann-pc-file.patch \ 1337 %D%/packages/patches/flann-pc-file.patch \
1338 %D%/packages/patches/flatpak-fix-icon-validation.patch \ 1338 %D%/packages/patches/flatpak-fix-icon-validation.patch \
1339 %D%/packages/patches/flatpak-unset-gdk-pixbuf-for-sandbox.patch \ 1339 %D%/packages/patches/flatpak-unset-gdk-pixbuf-for-sandbox.patch \
1340 %D%/packages/patches/flex-fix-make-dependencies.patch \
1340 %D%/packages/patches/fluxbox-1.3.7-no-dynamic-cursor.patch \ 1341 %D%/packages/patches/fluxbox-1.3.7-no-dynamic-cursor.patch \
1341 %D%/packages/patches/fluxbox-1.3.7-gcc.patch \ 1342 %D%/packages/patches/fluxbox-1.3.7-gcc.patch \
1342 %D%/packages/patches/fmt-9-overspecified-tests.patch \ 1343 %D%/packages/patches/fmt-9-overspecified-tests.patch \
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 969b5c394b2..8d51094e25a 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2666,6 +2666,7 @@ exec " gcc-bin "/" program
2666 ;; This Flex is needed to build MiG as well as Linux-Libre headers. 2666 ;; This Flex is needed to build MiG as well as Linux-Libre headers.
2667 (package 2667 (package
2668 (inherit flex) 2668 (inherit flex)
2669 (source (bootstrap-origin (package-source flex)))
2669 (native-inputs (list bison-boot0)) 2670 (native-inputs (list bison-boot0))
2670 (propagated-inputs (list m4-boot0)) 2671 (propagated-inputs (list m4-boot0))
2671 (inputs (%boot0-inputs)) 2672 (inputs (%boot0-inputs))
diff --git a/gnu/packages/compiler-tools.scm b/gnu/packages/compiler-tools.scm
index 97baa467729..1db796f76f9 100644
--- a/gnu/packages/compiler-tools.scm
+++ b/gnu/packages/compiler-tools.scm
@@ -129,7 +129,8 @@ prefixes of other terminals.")
129 "flex-" version ".tar.gz")) 129 "flex-" version ".tar.gz"))
130 (sha256 130 (sha256
131 (base32 131 (base32
132 "15g9bv236nzi665p9ggqjlfn4dwck5835vf0bbw2cz7h5c1swyp8")))) 132 "15g9bv236nzi665p9ggqjlfn4dwck5835vf0bbw2cz7h5c1swyp8"))
133 (patches (search-patches "flex-fix-make-dependencies.patch"))))
133 (build-system gnu-build-system) 134 (build-system gnu-build-system)
134 (arguments 135 (arguments
135 (if (%current-target-system) 136 (if (%current-target-system)
diff --git a/gnu/packages/patches/flex-fix-make-dependencies.patch b/gnu/packages/patches/flex-fix-make-dependencies.patch
new file mode 100644
index 00000000000..dbe9392a269
--- /dev/null
+++ b/gnu/packages/patches/flex-fix-make-dependencies.patch
@@ -0,0 +1,54 @@
1Retrieved from Poky:
2https://git.enea.com/cgit/linux/poky.git/plain/meta/recipes-devtools/flex/flex/0001-build-tests-add-missing-parser-scanner-dependencies.patch?id=bf94ea1cc4e966fa2cf55206389f9c34fbd5419d
3
4From 47e3916842ffefd7def84ae85758fdcceeb77839 Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@arm.com>
6Date: Thu, 20 Mar 2025 12:16:50 +0000
7Subject: [PATCH] build(tests): add missing parser->scanner dependencies
8
9With sufficient parallelism and `make --shuffle` to reorder builds the
10test suite occasionally fails to build with errors like this:
11
12 tests/bison_yylval_parser.y:36:10: fatal error: bison_yylval_scanner.h: No such file or directory
13 36 | #include "bison_yylval_scanner.h"
14
15Solve this by adding the missing dependencies to the *_parser.o targets
16on the _scanner.h files.
17
18Upstream-Status: Submitted [https://github.com/westes/flex/pull/702]
19Signed-off-by: Ross Burton <ross.burton@arm.com>
20---
21 tests/Makefile.am | 3 +++
22 1 file changed, 3 insertions(+)
23
24diff --git a/tests/Makefile.am b/tests/Makefile.am
25index 2cb51df..d0c199d 100644
26--- a/tests/Makefile.am
27+++ b/tests/Makefile.am
28@@ -343,6 +343,7 @@ FLEX = $(top_builddir)/src/flex
29
30 bison_nr_main.$(OBJEXT): bison_nr_parser.h bison_nr_scanner.h
31 bison_nr_scanner.$(OBJEXT): bison_nr_parser.h
32+bison_nr_parser.$(OBJEXT): bison_nr_scanner.h
33
34 bison_nr_scanner.h: bison_nr_scanner.c
35 @if test ! -f $@; then rm -f $<; else :; fi
36@@ -350,6 +351,7 @@ bison_nr_scanner.h: bison_nr_scanner.c
37
38 bison_yylloc_main.$(OBJEXT): bison_yylloc_parser.h bison_yylloc_scanner.h
39 bison_yylloc_scanner.$(OBJEXT): bison_yylloc_parser.h
40+bison_yylloc_parser.$(OBJEXT): bison_yylloc_scanner.h
41
42 bison_yylloc_scanner.h: bison_yylloc_scanner.c
43 @if test ! -f $@; then rm -f $<; else :; fi
44@@ -357,6 +359,7 @@ bison_yylloc_scanner.h: bison_yylloc_scanner.c
45
46 bison_yylval_main.$(OBJEXT): bison_yylval_parser.h bison_yylval_scanner.h
47 bison_yylval_scanner.$(OBJEXT): bison_yylval_parser.h
48+bison_yylval_parser.$(OBJEXT): bison_yylval_scanner.h
49
50 bison_yylval_scanner.h: bison_yylval_scanner.c
51 @if test ! -f $@; then rm -f $<; else :; fi
52--
532.43.0
54