Message ID | 20250602140828.518094-1-kelefa.sane@smile.fr |
---|---|
State | Accepted |
Headers | show |
Series | [meta-oe] imx-cst:fix race condition build error | expand |
Le lun. 2 juin 2025 à 16:08, kelefa.sane via lists.openembedded.org <kelefa.sane=smile.fr@lists.openembedded.org> a écrit : > From: Kéléfa Sané <kelefa.sane@smile.fr> > > Add missing makefile rule depedency on compilation of cst_lexer.c, which > require header cst_parser.h generated at compilation with cst_parser.c > > This issue has been detected during the Yocto autobuilder test CI, > probably during a high CPU load > ( > https://autobuilder.yoctoproject.org/valkyrie/#/builders/87/builds/46/steps/33/logs/stdio > ). > > Signed-off-by: Kelefa Sane <kelefa.sane@smile.fr> > Reviewed-by: Yoann Congal <yoann.congal@smile.fr> > --- > ...fix-missing-makefile-rule-dependency.patch | 45 +++++++++++++++++++ > .../recipes-support/imx-cst/imx-cst_3.4.0.bb | 1 + > 2 files changed, 46 insertions(+) > create mode 100644 > meta-oe/recipes-support/imx-cst/imx-cst/0001-fix-missing-makefile-rule-dependency.patch > > diff --git > a/meta-oe/recipes-support/imx-cst/imx-cst/0001-fix-missing-makefile-rule-dependency.patch > b/meta-oe/recipes-support/imx-cst/imx-cst/0001-fix-missing-makefile-rule-dependency.patch > new file mode 100644 > index 0000000000..ce7626ab31 > --- /dev/null > +++ > b/meta-oe/recipes-support/imx-cst/imx-cst/0001-fix-missing-makefile-rule-dependency.patch > @@ -0,0 +1,45 @@ > +From 73509cb22ffab827dc3e3ccda2781683b8e8296d Mon Sep 17 00:00:00 2001 > +From: =?UTF-8?q?K=C3=A9l=C3=A9fa=20San=C3=A9?= <kelefa.sane@smile.fr> > +Date: Mon, 2 Jun 2025 11:07:08 +0200 > +Subject: [PATCH] fix missing makefile rule dependency > + > +During, the package build with an high CPU load we can face > +a build failed issue, caused by the header file cst_parser.h not present > +when compiling cst_lexer.c, which depend on cst_parser.h: > +| x86_64-poky-linux-gcc ... -c cst_lexer.c -o cst_lexer.d > +| ../../code/front_end/src/cst_lexer.l:21:10: fatal error: > +|cst_parser.h: No such file or directory > +| 21 | #include "cst_parser.h" > +| | ^~~~~~~~~~~~~~ > +| compilation terminated. > + > +The file cst_parser.h is generated during compilation > +by a makefile rule which also generate cst_parser.c > + > +To fix the issue, makefile rule needed to be update > +in order for compilation of cst_lexer.c to be done, > +always after the generation of cst_parser.h and .c > + > +Upstream-Status: Submitted [ > https://community.nxp.com/t5/Other-NXP-Products/Package-imx-code-signing-tool-3-4-0-dfsg-2-build-issue/m-p/2108575#M28853 > ] > + > +Signed-off-by: Kelefa Sane <kelefa.sane@smile.fr> > +--- > + code/build/make/rules.mk | 5 +++++ > + 1 file changed, 5 insertions(+) > + > +diff --git a/code/build/make/rules.mk b/code/build/make/rules.mk > +index 7720e4b..239108b 100644 > +--- a/code/build/make/rules.mk > ++++ b/code/build/make/rules.mk > +@@ -35,6 +35,11 @@ LFLAGS := -t > + @echo "Link $@" > + $(LD) $^ $(LDFLAGS) -o $@ > + > ++# Compilation of cst_lexer.c require cst_parser.h > ++# (cst_lexer.c include cst_parser.h) which is generated > ++# by the same makefile genrating cst_parser.c > ++cst_lexer.o: cst_parser.c > ++ > + %.o: %.c > + @echo "Compile $@" > + # generate dependency file > diff --git a/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb > b/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb > index c4b7ce032d..375c0b4e10 100644 > --- a/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb > +++ b/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb > @@ -16,6 +16,7 @@ DEBIAN_PGK_VERSION = "${PV}+dfsg" > > SRC_URI = "\ > > ${DEBIAN_MIRROR}/main/i/${DEBIAN_PGK_NAME}/${DEBIAN_PGK_NAME}_${DEBIAN_PGK_VERSION}.orig.tar.xz > \ > + file://0001-fix-missing-makefile-rule-dependency.patch \ > " > > SRC_URI[sha256sum] = > "52ee3cee3bc500a42095f73c4584e223b4b9d2dfc1cd3e5df965c5952eba8c8d" > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#117707): > https://lists.openembedded.org/g/openembedded-devel/message/117707 > Mute This Topic: https://lists.openembedded.org/mt/113428702/4316185 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ > yoann.congal@smile.fr] > -=-=-=-=-=-=-=-=-=-=-=- > >
diff --git a/meta-oe/recipes-support/imx-cst/imx-cst/0001-fix-missing-makefile-rule-dependency.patch b/meta-oe/recipes-support/imx-cst/imx-cst/0001-fix-missing-makefile-rule-dependency.patch new file mode 100644 index 0000000000..ce7626ab31 --- /dev/null +++ b/meta-oe/recipes-support/imx-cst/imx-cst/0001-fix-missing-makefile-rule-dependency.patch @@ -0,0 +1,45 @@ +From 73509cb22ffab827dc3e3ccda2781683b8e8296d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?K=C3=A9l=C3=A9fa=20San=C3=A9?= <kelefa.sane@smile.fr> +Date: Mon, 2 Jun 2025 11:07:08 +0200 +Subject: [PATCH] fix missing makefile rule dependency + +During, the package build with an high CPU load we can face +a build failed issue, caused by the header file cst_parser.h not present +when compiling cst_lexer.c, which depend on cst_parser.h: +| x86_64-poky-linux-gcc ... -c cst_lexer.c -o cst_lexer.d +| ../../code/front_end/src/cst_lexer.l:21:10: fatal error: +|cst_parser.h: No such file or directory +| 21 | #include "cst_parser.h" +| | ^~~~~~~~~~~~~~ +| compilation terminated. + +The file cst_parser.h is generated during compilation +by a makefile rule which also generate cst_parser.c + +To fix the issue, makefile rule needed to be update +in order for compilation of cst_lexer.c to be done, +always after the generation of cst_parser.h and .c + +Upstream-Status: Submitted [https://community.nxp.com/t5/Other-NXP-Products/Package-imx-code-signing-tool-3-4-0-dfsg-2-build-issue/m-p/2108575#M28853] + +Signed-off-by: Kelefa Sane <kelefa.sane@smile.fr> +--- + code/build/make/rules.mk | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/code/build/make/rules.mk b/code/build/make/rules.mk +index 7720e4b..239108b 100644 +--- a/code/build/make/rules.mk ++++ b/code/build/make/rules.mk +@@ -35,6 +35,11 @@ LFLAGS := -t + @echo "Link $@" + $(LD) $^ $(LDFLAGS) -o $@ + ++# Compilation of cst_lexer.c require cst_parser.h ++# (cst_lexer.c include cst_parser.h) which is generated ++# by the same makefile genrating cst_parser.c ++cst_lexer.o: cst_parser.c ++ + %.o: %.c + @echo "Compile $@" + # generate dependency file diff --git a/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb b/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb index c4b7ce032d..375c0b4e10 100644 --- a/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb +++ b/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb @@ -16,6 +16,7 @@ DEBIAN_PGK_VERSION = "${PV}+dfsg" SRC_URI = "\ ${DEBIAN_MIRROR}/main/i/${DEBIAN_PGK_NAME}/${DEBIAN_PGK_NAME}_${DEBIAN_PGK_VERSION}.orig.tar.xz \ + file://0001-fix-missing-makefile-rule-dependency.patch \ " SRC_URI[sha256sum] = "52ee3cee3bc500a42095f73c4584e223b4b9d2dfc1cd3e5df965c5952eba8c8d"