xmlto: backport a patch to fix build with gcc-14 on host
PATCH v3 1/1 xmlto: backport a patch to fix build with gcc-14 on host
* need to add dependency on flex-native because now when the .l file is modified by the .patch file it will try to regenerate the c code and fail:
| make[1]: Entering directory 'work/x86_64-linux/xmlto-native/0.0.28-r0/build' | /bin/bash ../xmlto-0.0.28/ylwrap ../xmlto-0.0.28/xmlif/xmlif.l .c xmlif/xmlif.c -- /bin/bash 'work/x86_64-linux/xmlto-native/0.0.28-r0/xmlto-0.0.28/missing' flex | work/x86_64-linux/xmlto-native/0.0.28-r0/xmlto-0.0.28/missing: line 81: flex: command not found | WARNING: 'flex' is missing on your system. | You should only need it if you modified a '.l' file. | You may want to install the Fast Lexical Analyzer package: | <https://github.com/westes/flex>
* backport
https://pagure.io/xmlto/c/32376c053733c6c0ebaca3c25c0725509342fdf3?branch=master
as well, so that patched xmlif/xmlif.c is newer than xmlif/xmlif.l and the build won't try to regenerate it with flex as that leads to random build failures reported in:
https://lists.openembedded.org/g/openembedded-core/message/206412
https://errors.yoctoproject.org/Errors/Details/810853/
https://lists.openembedded.org/g/openembedded-core/message/206496
https://valkyrie.yoctoproject.org/#/builders/29/builds/355
---
v3: add touch ${S}/xmlif/xmlif.c
to make sure xmlif.c is newer than xmlif.l after do_patch (order of .patch files in SRC_URI isn't enough) to prevent regenerating it with flex-native which isn't in DEPENDS
...001-Fix-return-type-of-main-function.patch | 42 + ...mlif.c-and-update-xmlif.l-to-comply-.patch | 1259 +++++++++++++++++ .../0001-fix-Wimplicit-int-for-ifsense.patch | 33 + meta/recipes-devtools/xmlto/xmlto_0.0.28.bb | 10 + 4 files changed, 1344 insertions(+) create mode 100644 meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch create mode 100644 meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Regenerate-the-xmlif.c-and-update-xmlif.l-to-comply-.patch create mode 100644 meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch
meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch new file +42 -0
@@ -0,0 +1,42 @@ +From 6347e1b9da2140acdd55e3e7ac1199456793e17c Mon Sep 17 00:00:00 2001 +From: Thomas Kuehne <[email protected]> +Date: Sat, 11 Dec 2021 20:56:00 +0000 +Subject: [PATCH] Fix return type of main function +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: +xmlif/xmlif.l:242:1: warning: return type defaults to ‘int’ [-Wimplicit-int] + 242 | main(int argc, char *argv[]) + | ^~~~ + +Signed-off-by: Thomas Kuehne <[email protected]> +Signed-off-by: Martin Jansa <[email protected]> +Upstream-Status: Backport [v0.0.29 https://pagure.io/xmlto/c/8e34f087bf410bcc5fe445933d6ad9bae54f24b5?branch=master] +--- + xmlif/xmlif.l | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/xmlif/xmlif.l b/xmlif/xmlif.l +index ac42136..78a62bc 100644 +--- a/xmlif/xmlif.l ++++ b/xmlif/xmlif.l +@@ -239,7 +239,7 @@ WS [ \t\n]* + + int yywrap() {exit(0);}; + +-main(int argc, char *argv[]) ++int main(int argc, char *argv[]) + { + int i; + +@@ -265,7 +265,7 @@ main(int argc, char *argv[]) + exit(1); + } + +- yylex(); ++ return yylex(); + } + + /*
meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Regenerate-the-xmlif.c-and-update-xmlif.l-to-comply-.patch new file +1259 -0
1,259 lines not on this page · raw message
meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 1375e2df75530cd198bd16ac3de38e2b0d126276 Mon Sep 17 00:00:00 2001 +From: Thomas Kuehne <[email protected]> +Date: Sat, 11 Dec 2021 21:10:41 +0100 +Subject: [PATCH] fix -Wimplicit-int for ifsense +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +fixes: +xmlif/xmlif.l:46:8: warning: type defaults to ‘int’ in declaration of ‘ifsense’ [-Wimplicit-int] + 46 | static ifsense; /* sense of last `if' or unless seen */ + | ^~~~~~~ + +Signed-off-by: Thomas Kuehne <[email protected]> +Signed-off-by: Martin Jansa <[email protected]> +Upstream-Status: Backport [v0.0.29 https://pagure.io/xmlto/c/1375e2df75530cd198bd16ac3de38e2b0d126276?branch=master +--- + xmlif/xmlif.l | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xmlif/xmlif.l b/xmlif/xmlif.l +index ac42136..6e5970e 100644 +--- a/xmlif/xmlif.l ++++ b/xmlif/xmlif.l +@@ -43,7 +43,7 @@ + + static char **selections; /* selection tokens */ + static int nselections; /* number of selections */ +-static ifsense; /* sense of last `if' or unless seen */ ++static int ifsense; /* sense of last `if' or unless seen */ + static char *attribute; /* last attribute scanned */ + + struct stack_t {
meta/recipes-devtools/xmlto/xmlto_0.0.28.bb +10 -0
@@ -8,6 +8,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" SRC_URI = "https://releases.pagure.org/xmlto/xmlto-${PV}.tar.gz \ file://configure.in-drop-the-test-of-xmllint-and-xsltproc.patch \ + file://0001-Fix-return-type-of-main-function.patch \ + file://0001-fix-Wimplicit-int-for-ifsense.patch \ + file://0001-Regenerate-the-xmlif.c-and-update-xmlif.l-to-comply-.patch \ " SRC_URI[md5sum] = "a1fefad9d83499a15576768f60f847c6" SRC_URI[sha256sum] = "2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3"
@@ -36,6 +39,13 @@ BBCLASSEXTEND = "native" EXTRA_OECONF:append = " BASH=/bin/bash GCP=/bin/cp XMLLINT=xmllint XSLTPROC=xsltproc" +do_configure:prepend() { + # make sure xmlif.c is newer than xmlif.l after do_patch (order of + # .patch files in SRC_URI isn't enough) to prevent regenerating it + # with flex-native which isn't in DEPENDS + touch ${S}/xmlif/xmlif.c +} + do_install:append:class-native() { create_wrapper ${D}${bindir}/xmlto XML_CATALOG_FILES=${sysconfdir}/xml/catalog }
Signature · 1 line
2.47.0
Quoted 22 lines · Martin Jansa
* need to add dependency on flex-native because now when the .l file is modified by the .patch file it will try to regenerate the c code and fail:
| make[1]: Entering directory 'work/x86_64-linux/xmlto-native/0.0.28-r0/build' | /bin/bash ../xmlto-0.0.28/ylwrap ../xmlto-0.0.28/xmlif/xmlif.l .c xmlif/xmlif.c -- /bin/bash 'work/x86_64-linux/xmlto-native/0.0.28-r0/xmlto-0.0.28/missing' flex | work/x86_64-linux/xmlto-native/0.0.28-r0/xmlto-0.0.28/missing: line 81: flex: command not found | WARNING: 'flex' is missing on your system. | You should only need it if you modified a '.l' file. | You may want to install the Fast Lexical Analyzer package: | <https://github.com/westes/flex>* backport
https://pagure.io/xmlto/c/32376c053733c6c0ebaca3c25c0725509342fdf3?branch=master
as well, so that patchedxmlif/xmlif.cis newer than xmlif/xmlif.l and the build won't try to regenerate it with flex as that leads to random build failures reported in:
https://lists.openembedded.org/g/openembedded-core/message/206412
https://errors.yoctoproject.org/Errors/Details/810853/
https://lists.openembedded.org/g/openembedded-core/message/206496
https://valkyrie.yoctoproject.org/#/builders/29/builds/355
Quoted 7 lines
Signed-off-by Martin Jansa <[email protected]>---
v3: add touch${S}/xmlif/xmlif.c
to make surexmlif.cis newer than xmlif.l afterdo_patch(order of .patch files inSRC_URIisn't enough) to prevent regenerating it with flex-native which isn't in DEPENDS
Hi Martin,
This is still for Kirkstone branch, right ?
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Yes, sorry, forgot to add kirkstone tag in v3.
Steve: should I resend or did you notice this one?
Quoted 40 lines · Mathieu Dubois-Briand
Quoted 22 lines · Martin Jansa
* need to add dependency on flex-native because now when the .l file is modified by the .patch file it will try to regenerate the c code and fail:
| make[1]: Entering directory 'work/x86_64-linux/xmlto-native/0.0.28-r0/build' | /bin/bash ../xmlto-0.0.28/ylwrap ../xmlto-0.0.28/xmlif/xmlif.l .c xmlif/xmlif.c -- /bin/bash 'work/x86_64-linux/xmlto-native/0.0.28-r0/xmlto-0.0.28/missing' flex | work/x86_64-linux/xmlto-native/0.0.28-r0/xmlto-0.0.28/missing: line 81: flex: command not found | WARNING: 'flex' is missing on your system. | You should only need it if you modified a '.l' file. | You may want to install the Fast Lexical Analyzer package: | <https://github.com/westes/flex>* backport
https://pagure.io/xmlto/c/32376c053733c6c0ebaca3c25c0725509342fdf3?branch=master
as well, so that patchedxmlif/xmlif.cis newer than xmlif/xmlif.l and the build won't try to regenerate it with flex as that leads to random build failures reported in:
https://lists.openembedded.org/g/openembedded-core/message/206412
https://errors.yoctoproject.org/Errors/Details/810853/
https://lists.openembedded.org/g/openembedded-core/message/206496
https://valkyrie.yoctoproject.org/#/builders/29/builds/355Quoted 7 lines
Signed-off-by Martin Jansa <[email protected]>---
v3: add touch${S}/xmlif/xmlif.c
to make surexmlif.cis newer than xmlif.l afterdo_patch(order of .patch files inSRC_URIisn't enough) to prevent regenerating it with flex-native which isn't in DEPENDSHi Martin,
This is still for Kirkstone branch, right ?
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Quoted 4 lines · Martin Jansa
Yes, sorry, forgot to add kirkstone tag in v3.
Steve: should I resend or did you notice this one?
I noticed it now :-)
No need to resend.
Steve
Quoted 43 lines
Quoted 40 lines · Mathieu Dubois-Briand
Quoted 22 lines · Martin Jansa
* need to add dependency on flex-native because now when the .l file is modified by the .patch file it will try to regenerate the c code and fail:
| make[1]: Entering directory 'work/x86_64-linux/xmlto-native/0.0.28-r0/build' | /bin/bash ../xmlto-0.0.28/ylwrap ../xmlto-0.0.28/xmlif/xmlif.l .c xmlif/xmlif.c -- /bin/bash 'work/x86_64-linux/xmlto-native/0.0.28-r0/xmlto-0.0.28/missing' flex | work/x86_64-linux/xmlto-native/0.0.28-r0/xmlto-0.0.28/missing: line 81: flex: command not found | WARNING: 'flex' is missing on your system. | You should only need it if you modified a '.l' file. | You may want to install the Fast Lexical Analyzer package: | <https://github.com/westes/flex>* backport
https://pagure.io/xmlto/c/32376c053733c6c0ebaca3c25c0725509342fdf3?branch=master
as well, so that patchedxmlif/xmlif.cis newer than xmlif/xmlif.l and the build won't try to regenerate it with flex as that leads to random build failures reported in:
https://lists.openembedded.org/g/openembedded-core/message/206412
https://errors.yoctoproject.org/Errors/Details/810853/
https://lists.openembedded.org/g/openembedded-core/message/206496
https://valkyrie.yoctoproject.org/#/builders/29/builds/355Quoted 7 lines
Signed-off-by Martin Jansa <[email protected]>---
v3: add touch${S}/xmlif/xmlif.c
to make surexmlif.cis newer than xmlif.l afterdo_patch(order of .patch files inSRC_URIisn't enough) to prevent regenerating it with flex-native which isn't in DEPENDSHi Martin,
This is still for Kirkstone branch, right ?
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com