diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2025-10-22 12:34:42 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2025-10-30 16:13:02 +0900 |
| commit | 6faa102a045bde3eaedf9b6f9076be70abbe890e (patch) | |
| tree | f5bbdbf6a2379c2fc6e2a7d0f9117994a0af9a39 /gnu/packages | |
| parent | 81fcd98bac93c21d5435e521992d31dd32ca8db7 (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/flex.scm (flex) [source]: Apply it, wrapping the origin in a
bootstrap-origin call to avoid a circular dependency problem.
Change-Id: I7b9994a9239bdafa5c7768b9f954870716c76ad7
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/flex.scm | 21 | ||||
| -rw-r--r-- | gnu/packages/patches/flex-fix-make-dependencies.patch | 54 |
2 files changed, 66 insertions, 9 deletions
diff --git a/gnu/packages/flex.scm b/gnu/packages/flex.scm index bc4498b6331..45ee7e7eaf0 100644 --- a/gnu/packages/flex.scm +++ b/gnu/packages/flex.scm @@ -26,6 +26,7 @@ #:use-module (guix gexp) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages bootstrap) #:use-module (gnu packages m4) #:use-module (gnu packages man) #:use-module (gnu packages bison) @@ -35,15 +36,17 @@ (package (name "flex") (version "2.6.4") - (source (origin - (method url-fetch) - (uri (string-append - "https://github.com/westes/flex" - "/releases/download/v" version "/" - "flex-" version ".tar.gz")) - (sha256 - (base32 - "15g9bv236nzi665p9ggqjlfn4dwck5835vf0bbw2cz7h5c1swyp8")))) + (source (bootstrap-origin ;avoid a circular dependency + (origin + (method url-fetch) + (uri (string-append + "https://github.com/westes/flex" + "/releases/download/v" version "/" + "flex-" version ".tar.gz")) + (sha256 + (base32 + "15g9bv236nzi665p9ggqjlfn4dwck5835vf0bbw2cz7h5c1swyp8")) + (patches (search-patches "flex-fix-make-dependencies.patch"))))) (build-system gnu-build-system) (inputs (let ((bison-for-tests 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 @@ +Retrieved from Poky: +https://git.enea.com/cgit/linux/poky.git/plain/meta/recipes-devtools/flex/flex/0001-build-tests-add-missing-parser-scanner-dependencies.patch?id=bf94ea1cc4e966fa2cf55206389f9c34fbd5419d + +From 47e3916842ffefd7def84ae85758fdcceeb77839 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@arm.com> +Date: Thu, 20 Mar 2025 12:16:50 +0000 +Subject: [PATCH] build(tests): add missing parser->scanner dependencies + +With sufficient parallelism and `make --shuffle` to reorder builds the +test suite occasionally fails to build with errors like this: + + tests/bison_yylval_parser.y:36:10: fatal error: bison_yylval_scanner.h: No such file or directory + 36 | #include "bison_yylval_scanner.h" + +Solve this by adding the missing dependencies to the *_parser.o targets +on the _scanner.h files. + +Upstream-Status: Submitted [https://github.com/westes/flex/pull/702] +Signed-off-by: Ross Burton <ross.burton@arm.com> +--- + tests/Makefile.am | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 2cb51df..d0c199d 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -343,6 +343,7 @@ FLEX = $(top_builddir)/src/flex + + bison_nr_main.$(OBJEXT): bison_nr_parser.h bison_nr_scanner.h + bison_nr_scanner.$(OBJEXT): bison_nr_parser.h ++bison_nr_parser.$(OBJEXT): bison_nr_scanner.h + + bison_nr_scanner.h: bison_nr_scanner.c + @if test ! -f $@; then rm -f $<; else :; fi +@@ -350,6 +351,7 @@ bison_nr_scanner.h: bison_nr_scanner.c + + bison_yylloc_main.$(OBJEXT): bison_yylloc_parser.h bison_yylloc_scanner.h + bison_yylloc_scanner.$(OBJEXT): bison_yylloc_parser.h ++bison_yylloc_parser.$(OBJEXT): bison_yylloc_scanner.h + + bison_yylloc_scanner.h: bison_yylloc_scanner.c + @if test ! -f $@; then rm -f $<; else :; fi +@@ -357,6 +359,7 @@ bison_yylloc_scanner.h: bison_yylloc_scanner.c + + bison_yylval_main.$(OBJEXT): bison_yylval_parser.h bison_yylval_scanner.h + bison_yylval_scanner.$(OBJEXT): bison_yylval_parser.h ++bison_yylval_parser.$(OBJEXT): bison_yylval_scanner.h + + bison_yylval_scanner.h: bison_yylval_scanner.c + @if test ! -f $@; then rm -f $<; else :; fi +-- +2.43.0 + |
