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 | |
| 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')
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/flex.scm | 21 | ||||
| -rw-r--r-- | gnu/packages/patches/flex-fix-make-dependencies.patch | 54 |
3 files changed, 67 insertions, 9 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index abedd37ff7a..a6bc8db5e2a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -1290,6 +1290,7 @@ dist_patch_DATA = \ | |||
| 1290 | %D%/packages/patches/flatpak-fix-fonts-icons.patch \ | 1290 | %D%/packages/patches/flatpak-fix-fonts-icons.patch \ |
| 1291 | %D%/packages/patches/flatpak-fix-icon-validation.patch \ | 1291 | %D%/packages/patches/flatpak-fix-icon-validation.patch \ |
| 1292 | %D%/packages/patches/flatpak-unset-gdk-pixbuf-for-sandbox.patch \ | 1292 | %D%/packages/patches/flatpak-unset-gdk-pixbuf-for-sandbox.patch \ |
| 1293 | %D%/packages/patches/flex-fix-make-dependencies.patch \ | ||
| 1293 | %D%/packages/patches/fluxbox-1.3.7-no-dynamic-cursor.patch \ | 1294 | %D%/packages/patches/fluxbox-1.3.7-no-dynamic-cursor.patch \ |
| 1294 | %D%/packages/patches/fluxbox-1.3.7-gcc.patch \ | 1295 | %D%/packages/patches/fluxbox-1.3.7-gcc.patch \ |
| 1295 | %D%/packages/patches/fmt-9-overspecified-tests.patch \ | 1296 | %D%/packages/patches/fmt-9-overspecified-tests.patch \ |
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 @@ | |||
| 26 | #:use-module (guix gexp) | 26 | #:use-module (guix gexp) |
| 27 | #:use-module (guix utils) | 27 | #:use-module (guix utils) |
| 28 | #:use-module (gnu packages) | 28 | #:use-module (gnu packages) |
| 29 | #:use-module (gnu packages bootstrap) | ||
| 29 | #:use-module (gnu packages m4) | 30 | #:use-module (gnu packages m4) |
| 30 | #:use-module (gnu packages man) | 31 | #:use-module (gnu packages man) |
| 31 | #:use-module (gnu packages bison) | 32 | #:use-module (gnu packages bison) |
| @@ -35,15 +36,17 @@ | |||
| 35 | (package | 36 | (package |
| 36 | (name "flex") | 37 | (name "flex") |
| 37 | (version "2.6.4") | 38 | (version "2.6.4") |
| 38 | (source (origin | 39 | (source (bootstrap-origin ;avoid a circular dependency |
| 39 | (method url-fetch) | 40 | (origin |
| 40 | (uri (string-append | 41 | (method url-fetch) |
| 41 | "https://github.com/westes/flex" | 42 | (uri (string-append |
| 42 | "/releases/download/v" version "/" | 43 | "https://github.com/westes/flex" |
| 43 | "flex-" version ".tar.gz")) | 44 | "/releases/download/v" version "/" |
| 44 | (sha256 | 45 | "flex-" version ".tar.gz")) |
| 45 | (base32 | 46 | (sha256 |
| 46 | "15g9bv236nzi665p9ggqjlfn4dwck5835vf0bbw2cz7h5c1swyp8")))) | 47 | (base32 |
| 48 | "15g9bv236nzi665p9ggqjlfn4dwck5835vf0bbw2cz7h5c1swyp8")) | ||
| 49 | (patches (search-patches "flex-fix-make-dependencies.patch"))))) | ||
| 47 | (build-system gnu-build-system) | 50 | (build-system gnu-build-system) |
| 48 | (inputs | 51 | (inputs |
| 49 | (let ((bison-for-tests | 52 | (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 @@ | |||
| 1 | Retrieved from Poky: | ||
| 2 | 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 | ||
| 3 | |||
| 4 | From 47e3916842ffefd7def84ae85758fdcceeb77839 Mon Sep 17 00:00:00 2001 | ||
| 5 | From: Ross Burton <ross.burton@arm.com> | ||
| 6 | Date: Thu, 20 Mar 2025 12:16:50 +0000 | ||
| 7 | Subject: [PATCH] build(tests): add missing parser->scanner dependencies | ||
| 8 | |||
| 9 | With sufficient parallelism and `make --shuffle` to reorder builds the | ||
| 10 | test 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 | |||
| 15 | Solve this by adding the missing dependencies to the *_parser.o targets | ||
| 16 | on the _scanner.h files. | ||
| 17 | |||
| 18 | Upstream-Status: Submitted [https://github.com/westes/flex/pull/702] | ||
| 19 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 20 | --- | ||
| 21 | tests/Makefile.am | 3 +++ | ||
| 22 | 1 file changed, 3 insertions(+) | ||
| 23 | |||
| 24 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
| 25 | index 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 | -- | ||
| 53 | 2.43.0 | ||
| 54 | |||
