diff mbox series

[kirkstone] xmlto: backport a patch to fix build with gcc-14 on host

Message ID 20241027170119.2876289-1-martin.jansa@gmail.com
State Changes Requested
Delegated to: Steve Sakoman
Headers show
Series [kirkstone] xmlto: backport a patch to fix build with gcc-14 on host | expand

Commit Message

Martin Jansa Oct. 27, 2024, 5:01 p.m. UTC
* 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>

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
 ...001-Fix-return-type-of-main-function.patch | 42 +++++++++++++++++++
 .../0001-fix-Wimplicit-int-for-ifsense.patch  | 33 +++++++++++++++
 meta/recipes-devtools/xmlto/xmlto_0.0.28.bb   |  4 +-
 3 files changed, 78 insertions(+), 1 deletion(-)
 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-fix-Wimplicit-int-for-ifsense.patch

Comments

Steve Sakoman Oct. 27, 2024, 7:54 p.m. UTC | #1
Unfortunately I'm getting an autobuilder failure with this patch:

https://errors.yoctoproject.org/Errors/Details/810853/

Steve

On Sun, Oct 27, 2024 at 10:01 AM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> * 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>
>
> Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> ---
>  ...001-Fix-return-type-of-main-function.patch | 42 +++++++++++++++++++
>  .../0001-fix-Wimplicit-int-for-ifsense.patch  | 33 +++++++++++++++
>  meta/recipes-devtools/xmlto/xmlto_0.0.28.bb   |  4 +-
>  3 files changed, 78 insertions(+), 1 deletion(-)
>  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-fix-Wimplicit-int-for-ifsense.patch
>
> diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch
> new file mode 100644
> index 0000000000..f28f1fb56a
> --- /dev/null
> +++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch
> @@ -0,0 +1,42 @@
> +From 6347e1b9da2140acdd55e3e7ac1199456793e17c Mon Sep 17 00:00:00 2001
> +From: Thomas Kuehne <thomas@kuehne.cn>
> +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 <thomas@kuehne.cn>
> +Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> +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();
> + }
> +
> + /*
> diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch
> new file mode 100644
> index 0000000000..d5c25ba08a
> --- /dev/null
> +++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch
> @@ -0,0 +1,33 @@
> +From 1375e2df75530cd198bd16ac3de38e2b0d126276 Mon Sep 17 00:00:00 2001
> +From: Thomas Kuehne <thomas@kuehne.cn>
> +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 <thomas@kuehne.cn>
> +Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> +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 {
> diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> index 5cb9a4c57b..2c9ee27f82 100644
> --- a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> +++ b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> @@ -8,6 +8,8 @@ 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 \
>  "
>  SRC_URI[md5sum] = "a1fefad9d83499a15576768f60f847c6"
>  SRC_URI[sha256sum] = "2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3"
> @@ -16,7 +18,7 @@ inherit autotools
>
>  CLEANBROKEN = "1"
>
> -DEPENDS = "libxml2-native"
> +DEPENDS = "libxml2-native flex-native"
>
>  RDEPENDS:${PN} = "docbook-xml-dtd4 \
>                    docbook-xsl-stylesheets \
> --
> 2.47.0
>
Martin Jansa Oct. 27, 2024, 8:06 p.m. UTC | #2
Hi Steve,

thanks, will try to reproduce it somehow.

The command line in my successful build looks the same (so it might be
something in ylwrap itself):

DEBUG: Executing python function autotools_aclocals
DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc',
'bit-64', 'x86_64-linux', 'common']
DEBUG: Python function autotools_aclocals finished
DEBUG: Executing shell function do_compile
NOTE: make -j 70 -l 140
make  all-am
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
lex.yy.c xmlif/xmlif.c -- flex
gcc  -DHAVE_CONFIG_H -I. -I../xmlto-0.0.28
-isystemwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/include
 -isystemwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/include
-O2 -pipe -c -o xmlif/xmlif.o xmlif/xmlif.c
gcc   -isystemwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/include
-O2 -pipe  -Lwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/lib

-Lwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/lib
                      -Wl,--enable-new-dtags
-Wl,-rpath-link,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/lib

-Wl,-rpath-link,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/lib

-Wl,-rpath,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/lib

-Wl,-rpath,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/lib
                        -Wl,-O1 -Wl,--allow-shlib-undefined
-Wl,--dynamic-linker=sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
-o xmlif/xmlif xmlif/xmlif.o
make[1]: Leaving directory 'work/x86_64-linux/xmlto-native/0.0.28-r0/build'
DEBUG: Shell function do_compile finished

And I was building it on ubuntu-24.10 while your error is from
ubuntu-22.04 and poky-altcfg, will try with older ubuntu and then with
altcfg to see if I happen to reproduce it locally.

On Sun, Oct 27, 2024 at 8:54 PM Steve Sakoman <steve@sakoman.com> wrote:
>
> Unfortunately I'm getting an autobuilder failure with this patch:
>
> https://errors.yoctoproject.org/Errors/Details/810853/
>
> Steve
>
> On Sun, Oct 27, 2024 at 10:01 AM Martin Jansa <martin.jansa@gmail.com> wrote:
> >
> > * 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>
> >
> > Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > ---
> >  ...001-Fix-return-type-of-main-function.patch | 42 +++++++++++++++++++
> >  .../0001-fix-Wimplicit-int-for-ifsense.patch  | 33 +++++++++++++++
> >  meta/recipes-devtools/xmlto/xmlto_0.0.28.bb   |  4 +-
> >  3 files changed, 78 insertions(+), 1 deletion(-)
> >  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-fix-Wimplicit-int-for-ifsense.patch
> >
> > diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch
> > new file mode 100644
> > index 0000000000..f28f1fb56a
> > --- /dev/null
> > +++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch
> > @@ -0,0 +1,42 @@
> > +From 6347e1b9da2140acdd55e3e7ac1199456793e17c Mon Sep 17 00:00:00 2001
> > +From: Thomas Kuehne <thomas@kuehne.cn>
> > +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 <thomas@kuehne.cn>
> > +Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > +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();
> > + }
> > +
> > + /*
> > diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch
> > new file mode 100644
> > index 0000000000..d5c25ba08a
> > --- /dev/null
> > +++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch
> > @@ -0,0 +1,33 @@
> > +From 1375e2df75530cd198bd16ac3de38e2b0d126276 Mon Sep 17 00:00:00 2001
> > +From: Thomas Kuehne <thomas@kuehne.cn>
> > +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 <thomas@kuehne.cn>
> > +Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > +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 {
> > diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> > index 5cb9a4c57b..2c9ee27f82 100644
> > --- a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> > +++ b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> > @@ -8,6 +8,8 @@ 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 \
> >  "
> >  SRC_URI[md5sum] = "a1fefad9d83499a15576768f60f847c6"
> >  SRC_URI[sha256sum] = "2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3"
> > @@ -16,7 +18,7 @@ inherit autotools
> >
> >  CLEANBROKEN = "1"
> >
> > -DEPENDS = "libxml2-native"
> > +DEPENDS = "libxml2-native flex-native"
> >
> >  RDEPENDS:${PN} = "docbook-xml-dtd4 \
> >                    docbook-xsl-stylesheets \
> > --
> > 2.47.0
> >
Martin Jansa Oct. 27, 2024, 9:05 p.m. UTC | #3
Not sure what else could be different on autobuilder, passed here with
poky and poky-altcfg in ubuntu-22.04 as well:

poky/build $ bitbake -c cleansstate xmlto-native; bitbake -k xmlto-native
Loading cache: 100%
|##########################################################################################################################################################################################################|
Time: 0:00:00
Loaded 1646 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky-altcfg"
DISTRO_VERSION       = "4.0.22"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta
meta-poky
meta-yocto-bsp       = "kirkstone:3632209ffafd2a7ca636fcf994b0da2fed3f18f2"

Initialising tasks: 100%
|#####################################################################################################################################################################################################|
Time: 0:00:00
Sstate summary: Wanted 0 Local 0 Mirrors 0 Missed 0 Current 0 (0%
match, 0% complete)
NOTE: No setscene tasks
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be
rerun and all succeeded.
Loading cache: 100%
|##########################################################################################################################################################################################################|
Time: 0:00:00
Loaded 1646 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky-altcfg"
DISTRO_VERSION       = "4.0.22"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta
meta-poky
meta-yocto-bsp       = "kirkstone:3632209ffafd2a7ca636fcf994b0da2fed3f18f2"

Initialising tasks: 100%
|#####################################################################################################################################################################################################|
Time: 0:00:00
Sstate summary: Wanted 3 Local 0 Mirrors 0 Missed 3 Current 68 (0%
match, 95% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 317 tasks of which 306 didn't need to
be rerun and all succeeded.

poky/build $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04 LTS
Release:        22.04
Codename:       jammy

On Sun, Oct 27, 2024 at 9:06 PM Martin Jansa via
lists.openembedded.org <martin.jansa=gmail.com@lists.openembedded.org>
wrote:
>
> Hi Steve,
>
> thanks, will try to reproduce it somehow.
>
> The command line in my successful build looks the same (so it might be
> something in ylwrap itself):
>
> DEBUG: Executing python function autotools_aclocals
> DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc',
> 'bit-64', 'x86_64-linux', 'common']
> DEBUG: Python function autotools_aclocals finished
> DEBUG: Executing shell function do_compile
> NOTE: make -j 70 -l 140
> make  all-am
> 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
> lex.yy.c xmlif/xmlif.c -- flex
> gcc  -DHAVE_CONFIG_H -I. -I../xmlto-0.0.28
> -isystemwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/include
>  -isystemwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/include
> -O2 -pipe -c -o xmlif/xmlif.o xmlif/xmlif.c
> gcc   -isystemwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/include
> -O2 -pipe  -Lwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/lib
>
> -Lwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/lib
>                       -Wl,--enable-new-dtags
> -Wl,-rpath-link,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/lib
>
> -Wl,-rpath-link,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/lib
>
> -Wl,-rpath,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/lib
>
> -Wl,-rpath,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/lib
>                         -Wl,-O1 -Wl,--allow-shlib-undefined
> -Wl,--dynamic-linker=sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
> -o xmlif/xmlif xmlif/xmlif.o
> make[1]: Leaving directory 'work/x86_64-linux/xmlto-native/0.0.28-r0/build'
> DEBUG: Shell function do_compile finished
>
> And I was building it on ubuntu-24.10 while your error is from
> ubuntu-22.04 and poky-altcfg, will try with older ubuntu and then with
> altcfg to see if I happen to reproduce it locally.
>
> On Sun, Oct 27, 2024 at 8:54 PM Steve Sakoman <steve@sakoman.com> wrote:
> >
> > Unfortunately I'm getting an autobuilder failure with this patch:
> >
> > https://errors.yoctoproject.org/Errors/Details/810853/
> >
> > Steve
> >
> > On Sun, Oct 27, 2024 at 10:01 AM Martin Jansa <martin.jansa@gmail.com> wrote:
> > >
> > > * 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>
> > >
> > > Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > > ---
> > >  ...001-Fix-return-type-of-main-function.patch | 42 +++++++++++++++++++
> > >  .../0001-fix-Wimplicit-int-for-ifsense.patch  | 33 +++++++++++++++
> > >  meta/recipes-devtools/xmlto/xmlto_0.0.28.bb   |  4 +-
> > >  3 files changed, 78 insertions(+), 1 deletion(-)
> > >  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-fix-Wimplicit-int-for-ifsense.patch
> > >
> > > diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch
> > > new file mode 100644
> > > index 0000000000..f28f1fb56a
> > > --- /dev/null
> > > +++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch
> > > @@ -0,0 +1,42 @@
> > > +From 6347e1b9da2140acdd55e3e7ac1199456793e17c Mon Sep 17 00:00:00 2001
> > > +From: Thomas Kuehne <thomas@kuehne.cn>
> > > +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 <thomas@kuehne.cn>
> > > +Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > > +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();
> > > + }
> > > +
> > > + /*
> > > diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch
> > > new file mode 100644
> > > index 0000000000..d5c25ba08a
> > > --- /dev/null
> > > +++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch
> > > @@ -0,0 +1,33 @@
> > > +From 1375e2df75530cd198bd16ac3de38e2b0d126276 Mon Sep 17 00:00:00 2001
> > > +From: Thomas Kuehne <thomas@kuehne.cn>
> > > +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 <thomas@kuehne.cn>
> > > +Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > > +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 {
> > > diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> > > index 5cb9a4c57b..2c9ee27f82 100644
> > > --- a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> > > +++ b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> > > @@ -8,6 +8,8 @@ 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 \
> > >  "
> > >  SRC_URI[md5sum] = "a1fefad9d83499a15576768f60f847c6"
> > >  SRC_URI[sha256sum] = "2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3"
> > > @@ -16,7 +18,7 @@ inherit autotools
> > >
> > >  CLEANBROKEN = "1"
> > >
> > > -DEPENDS = "libxml2-native"
> > > +DEPENDS = "libxml2-native flex-native"
> > >
> > >  RDEPENDS:${PN} = "docbook-xml-dtd4 \
> > >                    docbook-xsl-stylesheets \
> > > --
> > > 2.47.0
> > >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#206413): https://lists.openembedded.org/g/openembedded-core/message/206413
> Mute This Topic: https://lists.openembedded.org/mt/109242697/3617156
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [martin.jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Steve Sakoman Oct. 28, 2024, 4 p.m. UTC | #4
On Sun, Oct 27, 2024 at 2:06 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> Not sure what else could be different on autobuilder, passed here with
> poky and poky-altcfg in ubuntu-22.04 as well:

I can't reproduce locally either :-(

The autobuilder isn't usable right now, but when it becomes available
I will try again there.

Steve

>
> poky/build $ bitbake -c cleansstate xmlto-native; bitbake -k xmlto-native
> Loading cache: 100%
> |##########################################################################################################################################################################################################|
> Time: 0:00:00
> Loaded 1646 entries from dependency cache.
> NOTE: Resolving any missing task queue dependencies
>
> Build Configuration:
> BB_VERSION           = "2.0.0"
> BUILD_SYS            = "x86_64-linux"
> NATIVELSBSTRING      = "universal"
> TARGET_SYS           = "x86_64-poky-linux"
> MACHINE              = "qemux86-64"
> DISTRO               = "poky-altcfg"
> DISTRO_VERSION       = "4.0.22"
> TUNE_FEATURES        = "m64 core2"
> TARGET_FPU           = ""
> meta
> meta-poky
> meta-yocto-bsp       = "kirkstone:3632209ffafd2a7ca636fcf994b0da2fed3f18f2"
>
> Initialising tasks: 100%
> |#####################################################################################################################################################################################################|
> Time: 0:00:00
> Sstate summary: Wanted 0 Local 0 Mirrors 0 Missed 0 Current 0 (0%
> match, 0% complete)
> NOTE: No setscene tasks
> NOTE: Executing Tasks
> NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be
> rerun and all succeeded.
> Loading cache: 100%
> |##########################################################################################################################################################################################################|
> Time: 0:00:00
> Loaded 1646 entries from dependency cache.
> NOTE: Resolving any missing task queue dependencies
>
> Build Configuration:
> BB_VERSION           = "2.0.0"
> BUILD_SYS            = "x86_64-linux"
> NATIVELSBSTRING      = "universal"
> TARGET_SYS           = "x86_64-poky-linux"
> MACHINE              = "qemux86-64"
> DISTRO               = "poky-altcfg"
> DISTRO_VERSION       = "4.0.22"
> TUNE_FEATURES        = "m64 core2"
> TARGET_FPU           = ""
> meta
> meta-poky
> meta-yocto-bsp       = "kirkstone:3632209ffafd2a7ca636fcf994b0da2fed3f18f2"
>
> Initialising tasks: 100%
> |#####################################################################################################################################################################################################|
> Time: 0:00:00
> Sstate summary: Wanted 3 Local 0 Mirrors 0 Missed 3 Current 68 (0%
> match, 95% complete)
> NOTE: Executing Tasks
> NOTE: Tasks Summary: Attempted 317 tasks of which 306 didn't need to
> be rerun and all succeeded.
>
> poky/build $ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description:    Ubuntu 22.04 LTS
> Release:        22.04
> Codename:       jammy
>
> On Sun, Oct 27, 2024 at 9:06 PM Martin Jansa via
> lists.openembedded.org <martin.jansa=gmail.com@lists.openembedded.org>
> wrote:
> >
> > Hi Steve,
> >
> > thanks, will try to reproduce it somehow.
> >
> > The command line in my successful build looks the same (so it might be
> > something in ylwrap itself):
> >
> > DEBUG: Executing python function autotools_aclocals
> > DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc',
> > 'bit-64', 'x86_64-linux', 'common']
> > DEBUG: Python function autotools_aclocals finished
> > DEBUG: Executing shell function do_compile
> > NOTE: make -j 70 -l 140
> > make  all-am
> > 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
> > lex.yy.c xmlif/xmlif.c -- flex
> > gcc  -DHAVE_CONFIG_H -I. -I../xmlto-0.0.28
> > -isystemwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/include
> >  -isystemwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/include
> > -O2 -pipe -c -o xmlif/xmlif.o xmlif/xmlif.c
> > gcc   -isystemwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/include
> > -O2 -pipe  -Lwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/lib
> >
> > -Lwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/lib
> >                       -Wl,--enable-new-dtags
> > -Wl,-rpath-link,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/lib
> >
> > -Wl,-rpath-link,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/lib
> >
> > -Wl,-rpath,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/lib
> >
> > -Wl,-rpath,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/lib
> >                         -Wl,-O1 -Wl,--allow-shlib-undefined
> > -Wl,--dynamic-linker=sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
> > -o xmlif/xmlif xmlif/xmlif.o
> > make[1]: Leaving directory 'work/x86_64-linux/xmlto-native/0.0.28-r0/build'
> > DEBUG: Shell function do_compile finished
> >
> > And I was building it on ubuntu-24.10 while your error is from
> > ubuntu-22.04 and poky-altcfg, will try with older ubuntu and then with
> > altcfg to see if I happen to reproduce it locally.
> >
> > On Sun, Oct 27, 2024 at 8:54 PM Steve Sakoman <steve@sakoman.com> wrote:
> > >
> > > Unfortunately I'm getting an autobuilder failure with this patch:
> > >
> > > https://errors.yoctoproject.org/Errors/Details/810853/
> > >
> > > Steve
> > >
> > > On Sun, Oct 27, 2024 at 10:01 AM Martin Jansa <martin.jansa@gmail.com> wrote:
> > > >
> > > > * 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>
> > > >
> > > > Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > > > ---
> > > >  ...001-Fix-return-type-of-main-function.patch | 42 +++++++++++++++++++
> > > >  .../0001-fix-Wimplicit-int-for-ifsense.patch  | 33 +++++++++++++++
> > > >  meta/recipes-devtools/xmlto/xmlto_0.0.28.bb   |  4 +-
> > > >  3 files changed, 78 insertions(+), 1 deletion(-)
> > > >  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-fix-Wimplicit-int-for-ifsense.patch
> > > >
> > > > diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch
> > > > new file mode 100644
> > > > index 0000000000..f28f1fb56a
> > > > --- /dev/null
> > > > +++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch
> > > > @@ -0,0 +1,42 @@
> > > > +From 6347e1b9da2140acdd55e3e7ac1199456793e17c Mon Sep 17 00:00:00 2001
> > > > +From: Thomas Kuehne <thomas@kuehne.cn>
> > > > +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 <thomas@kuehne.cn>
> > > > +Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > > > +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();
> > > > + }
> > > > +
> > > > + /*
> > > > diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch
> > > > new file mode 100644
> > > > index 0000000000..d5c25ba08a
> > > > --- /dev/null
> > > > +++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch
> > > > @@ -0,0 +1,33 @@
> > > > +From 1375e2df75530cd198bd16ac3de38e2b0d126276 Mon Sep 17 00:00:00 2001
> > > > +From: Thomas Kuehne <thomas@kuehne.cn>
> > > > +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 <thomas@kuehne.cn>
> > > > +Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > > > +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 {
> > > > diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> > > > index 5cb9a4c57b..2c9ee27f82 100644
> > > > --- a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> > > > +++ b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> > > > @@ -8,6 +8,8 @@ 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 \
> > > >  "
> > > >  SRC_URI[md5sum] = "a1fefad9d83499a15576768f60f847c6"
> > > >  SRC_URI[sha256sum] = "2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3"
> > > > @@ -16,7 +18,7 @@ inherit autotools
> > > >
> > > >  CLEANBROKEN = "1"
> > > >
> > > > -DEPENDS = "libxml2-native"
> > > > +DEPENDS = "libxml2-native flex-native"
> > > >
> > > >  RDEPENDS:${PN} = "docbook-xml-dtd4 \
> > > >                    docbook-xsl-stylesheets \
> > > > --
> > > > 2.47.0
> > > >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#206413): https://lists.openembedded.org/g/openembedded-core/message/206413
> > Mute This Topic: https://lists.openembedded.org/mt/109242697/3617156
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [martin.jansa@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Steve Sakoman Oct. 29, 2024, 12:19 p.m. UTC | #5
On Mon, Oct 28, 2024 at 9:00 AM Steve Sakoman via
lists.openembedded.org <steve=sakoman.com@lists.openembedded.org>
wrote:
>
> On Sun, Oct 27, 2024 at 2:06 PM Martin Jansa <martin.jansa@gmail.com> wrote:
> >
> > Not sure what else could be different on autobuilder, passed here with
> > poky and poky-altcfg in ubuntu-22.04 as well:
>
> I can't reproduce locally either :-(
>
> The autobuilder isn't usable right now, but when it becomes available
> I will try again there.

I tried the patch again, and sadly there were many failures of
xmlto-native and they occurred on multiple distros.

For detaIls see:

https://valkyrie.yoctoproject.org/#/builders/29/builds/355

Steve

> > poky/build $ bitbake -c cleansstate xmlto-native; bitbake -k xmlto-native
> > Loading cache: 100%
> > |##########################################################################################################################################################################################################|
> > Time: 0:00:00
> > Loaded 1646 entries from dependency cache.
> > NOTE: Resolving any missing task queue dependencies
> >
> > Build Configuration:
> > BB_VERSION           = "2.0.0"
> > BUILD_SYS            = "x86_64-linux"
> > NATIVELSBSTRING      = "universal"
> > TARGET_SYS           = "x86_64-poky-linux"
> > MACHINE              = "qemux86-64"
> > DISTRO               = "poky-altcfg"
> > DISTRO_VERSION       = "4.0.22"
> > TUNE_FEATURES        = "m64 core2"
> > TARGET_FPU           = ""
> > meta
> > meta-poky
> > meta-yocto-bsp       = "kirkstone:3632209ffafd2a7ca636fcf994b0da2fed3f18f2"
> >
> > Initialising tasks: 100%
> > |#####################################################################################################################################################################################################|
> > Time: 0:00:00
> > Sstate summary: Wanted 0 Local 0 Mirrors 0 Missed 0 Current 0 (0%
> > match, 0% complete)
> > NOTE: No setscene tasks
> > NOTE: Executing Tasks
> > NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be
> > rerun and all succeeded.
> > Loading cache: 100%
> > |##########################################################################################################################################################################################################|
> > Time: 0:00:00
> > Loaded 1646 entries from dependency cache.
> > NOTE: Resolving any missing task queue dependencies
> >
> > Build Configuration:
> > BB_VERSION           = "2.0.0"
> > BUILD_SYS            = "x86_64-linux"
> > NATIVELSBSTRING      = "universal"
> > TARGET_SYS           = "x86_64-poky-linux"
> > MACHINE              = "qemux86-64"
> > DISTRO               = "poky-altcfg"
> > DISTRO_VERSION       = "4.0.22"
> > TUNE_FEATURES        = "m64 core2"
> > TARGET_FPU           = ""
> > meta
> > meta-poky
> > meta-yocto-bsp       = "kirkstone:3632209ffafd2a7ca636fcf994b0da2fed3f18f2"
> >
> > Initialising tasks: 100%
> > |#####################################################################################################################################################################################################|
> > Time: 0:00:00
> > Sstate summary: Wanted 3 Local 0 Mirrors 0 Missed 3 Current 68 (0%
> > match, 95% complete)
> > NOTE: Executing Tasks
> > NOTE: Tasks Summary: Attempted 317 tasks of which 306 didn't need to
> > be rerun and all succeeded.
> >
> > poky/build $ lsb_release -a
> > No LSB modules are available.
> > Distributor ID: Ubuntu
> > Description:    Ubuntu 22.04 LTS
> > Release:        22.04
> > Codename:       jammy
> >
> > On Sun, Oct 27, 2024 at 9:06 PM Martin Jansa via
> > lists.openembedded.org <martin.jansa=gmail.com@lists.openembedded.org>
> > wrote:
> > >
> > > Hi Steve,
> > >
> > > thanks, will try to reproduce it somehow.
> > >
> > > The command line in my successful build looks the same (so it might be
> > > something in ylwrap itself):
> > >
> > > DEBUG: Executing python function autotools_aclocals
> > > DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc',
> > > 'bit-64', 'x86_64-linux', 'common']
> > > DEBUG: Python function autotools_aclocals finished
> > > DEBUG: Executing shell function do_compile
> > > NOTE: make -j 70 -l 140
> > > make  all-am
> > > 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
> > > lex.yy.c xmlif/xmlif.c -- flex
> > > gcc  -DHAVE_CONFIG_H -I. -I../xmlto-0.0.28
> > > -isystemwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/include
> > >  -isystemwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/include
> > > -O2 -pipe -c -o xmlif/xmlif.o xmlif/xmlif.c
> > > gcc   -isystemwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/include
> > > -O2 -pipe  -Lwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/lib
> > >
> > > -Lwork/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/lib
> > >                       -Wl,--enable-new-dtags
> > > -Wl,-rpath-link,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/lib
> > >
> > > -Wl,-rpath-link,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/lib
> > >
> > > -Wl,-rpath,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/usr/lib
> > >
> > > -Wl,-rpath,work/x86_64-linux/xmlto-native/0.0.28-r0/recipe-sysroot-native/lib
> > >                         -Wl,-O1 -Wl,--allow-shlib-undefined
> > > -Wl,--dynamic-linker=sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
> > > -o xmlif/xmlif xmlif/xmlif.o
> > > make[1]: Leaving directory 'work/x86_64-linux/xmlto-native/0.0.28-r0/build'
> > > DEBUG: Shell function do_compile finished
> > >
> > > And I was building it on ubuntu-24.10 while your error is from
> > > ubuntu-22.04 and poky-altcfg, will try with older ubuntu and then with
> > > altcfg to see if I happen to reproduce it locally.
> > >
> > > On Sun, Oct 27, 2024 at 8:54 PM Steve Sakoman <steve@sakoman.com> wrote:
> > > >
> > > > Unfortunately I'm getting an autobuilder failure with this patch:
> > > >
> > > > https://errors.yoctoproject.org/Errors/Details/810853/
> > > >
> > > > Steve
> > > >
> > > > On Sun, Oct 27, 2024 at 10:01 AM Martin Jansa <martin.jansa@gmail.com> wrote:
> > > > >
> > > > > * 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>
> > > > >
> > > > > Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > > > > ---
> > > > >  ...001-Fix-return-type-of-main-function.patch | 42 +++++++++++++++++++
> > > > >  .../0001-fix-Wimplicit-int-for-ifsense.patch  | 33 +++++++++++++++
> > > > >  meta/recipes-devtools/xmlto/xmlto_0.0.28.bb   |  4 +-
> > > > >  3 files changed, 78 insertions(+), 1 deletion(-)
> > > > >  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-fix-Wimplicit-int-for-ifsense.patch
> > > > >
> > > > > diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch
> > > > > new file mode 100644
> > > > > index 0000000000..f28f1fb56a
> > > > > --- /dev/null
> > > > > +++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch
> > > > > @@ -0,0 +1,42 @@
> > > > > +From 6347e1b9da2140acdd55e3e7ac1199456793e17c Mon Sep 17 00:00:00 2001
> > > > > +From: Thomas Kuehne <thomas@kuehne.cn>
> > > > > +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 <thomas@kuehne.cn>
> > > > > +Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > > > > +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();
> > > > > + }
> > > > > +
> > > > > + /*
> > > > > diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch
> > > > > new file mode 100644
> > > > > index 0000000000..d5c25ba08a
> > > > > --- /dev/null
> > > > > +++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch
> > > > > @@ -0,0 +1,33 @@
> > > > > +From 1375e2df75530cd198bd16ac3de38e2b0d126276 Mon Sep 17 00:00:00 2001
> > > > > +From: Thomas Kuehne <thomas@kuehne.cn>
> > > > > +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 <thomas@kuehne.cn>
> > > > > +Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > > > > +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 {
> > > > > diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> > > > > index 5cb9a4c57b..2c9ee27f82 100644
> > > > > --- a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> > > > > +++ b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
> > > > > @@ -8,6 +8,8 @@ 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 \
> > > > >  "
> > > > >  SRC_URI[md5sum] = "a1fefad9d83499a15576768f60f847c6"
> > > > >  SRC_URI[sha256sum] = "2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3"
> > > > > @@ -16,7 +18,7 @@ inherit autotools
> > > > >
> > > > >  CLEANBROKEN = "1"
> > > > >
> > > > > -DEPENDS = "libxml2-native"
> > > > > +DEPENDS = "libxml2-native flex-native"
> > > > >
> > > > >  RDEPENDS:${PN} = "docbook-xml-dtd4 \
> > > > >                    docbook-xsl-stylesheets \
> > > > > --
> > > > > 2.47.0
> > > > >
> > >
> > >
> > >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#206450): https://lists.openembedded.org/g/openembedded-core/message/206450
> Mute This Topic: https://lists.openembedded.org/mt/109242697/3620601
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [steve@sakoman.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Martin Jansa Oct. 29, 2024, 12:30 p.m. UTC | #6
On Tue, Oct 29, 2024 at 1:19 PM Steve Sakoman <steve@sakoman.com> wrote:
>
> On Mon, Oct 28, 2024 at 9:00 AM Steve Sakoman via
> lists.openembedded.org <steve=sakoman.com@lists.openembedded.org>
> wrote:
> >
> > On Sun, Oct 27, 2024 at 2:06 PM Martin Jansa <martin.jansa@gmail.com> wrote:
> > >
> > > Not sure what else could be different on autobuilder, passed here with
> > > poky and poky-altcfg in ubuntu-22.04 as well:
> >
> > I can't reproduce locally either :-(
> >
> > The autobuilder isn't usable right now, but when it becomes available
> > I will try again there.
>
> I tried the patch again, and sadly there were many failures of
> xmlto-native and they occurred on multiple distros.
>
> For detaIls see:
>
> https://valkyrie.yoctoproject.org/#/builders/29/builds/355

:(.

OK, please drop it for now, I'll leave it in my branch and hope that
one day it will fail for me as well.
Martin Jansa Oct. 29, 2024, 12:34 p.m. UTC | #7
I'll check if backporting
https://pagure.io/xmlto/c/32376c053733c6c0ebaca3c25c0725509342fdf3
as well prevents the build from calling flex as applying this as well
will probably make xmlif.c to be newer than xmlif.l again and then it
might not try to re-create it.

On Tue, Oct 29, 2024 at 1:30 PM Martin Jansa via
lists.openembedded.org <martin.jansa=gmail.com@lists.openembedded.org>
wrote:
>
> On Tue, Oct 29, 2024 at 1:19 PM Steve Sakoman <steve@sakoman.com> wrote:
> >
> > On Mon, Oct 28, 2024 at 9:00 AM Steve Sakoman via
> > lists.openembedded.org <steve=sakoman.com@lists.openembedded.org>
> > wrote:
> > >
> > > On Sun, Oct 27, 2024 at 2:06 PM Martin Jansa <martin.jansa@gmail.com> wrote:
> > > >
> > > > Not sure what else could be different on autobuilder, passed here with
> > > > poky and poky-altcfg in ubuntu-22.04 as well:
> > >
> > > I can't reproduce locally either :-(
> > >
> > > The autobuilder isn't usable right now, but when it becomes available
> > > I will try again there.
> >
> > I tried the patch again, and sadly there were many failures of
> > xmlto-native and they occurred on multiple distros.
> >
> > For detaIls see:
> >
> > https://valkyrie.yoctoproject.org/#/builders/29/builds/355
>
> :(.
>
> OK, please drop it for now, I'll leave it in my branch and hope that
> one day it will fail for me as well.
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#206497): https://lists.openembedded.org/g/openembedded-core/message/206497
> Mute This Topic: https://lists.openembedded.org/mt/109242697/3617156
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [martin.jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch
new file mode 100644
index 0000000000..f28f1fb56a
--- /dev/null
+++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-Fix-return-type-of-main-function.patch
@@ -0,0 +1,42 @@ 
+From 6347e1b9da2140acdd55e3e7ac1199456793e17c Mon Sep 17 00:00:00 2001
+From: Thomas Kuehne <thomas@kuehne.cn>
+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 <thomas@kuehne.cn>
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+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();
+ }
+ 
+ /*
diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch
new file mode 100644
index 0000000000..d5c25ba08a
--- /dev/null
+++ b/meta/recipes-devtools/xmlto/xmlto-0.0.28/0001-fix-Wimplicit-int-for-ifsense.patch
@@ -0,0 +1,33 @@ 
+From 1375e2df75530cd198bd16ac3de38e2b0d126276 Mon Sep 17 00:00:00 2001
+From: Thomas Kuehne <thomas@kuehne.cn>
+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 <thomas@kuehne.cn>
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+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 {
diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
index 5cb9a4c57b..2c9ee27f82 100644
--- a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
+++ b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
@@ -8,6 +8,8 @@  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 \
 "
 SRC_URI[md5sum] = "a1fefad9d83499a15576768f60f847c6"
 SRC_URI[sha256sum] = "2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3"
@@ -16,7 +18,7 @@  inherit autotools
 
 CLEANBROKEN = "1"
 
-DEPENDS = "libxml2-native"
+DEPENDS = "libxml2-native flex-native"
 
 RDEPENDS:${PN} = "docbook-xml-dtd4 \
                   docbook-xsl-stylesheets \