Message ID | 20250401115003.1886649-1-mark.yang@lge.com |
---|---|
State | Under Review |
Headers | show |
Series | [meta-oe] xmlrpc-c: Stick to C17 | expand |
On Tue, Apr 1, 2025 at 4:50 AM mark.yang via lists.openembedded.org <mark.yang=lge.com@lists.openembedded.org> wrote: > > From: "mark.yang" <mark.yang@lge.com> > > * Fix build error with gcc-15.0.1 > http://errors.yoctoproject.org/Errors/Details/850147/ > srcdir/lib/util/include/bool.h:13:5: error: cannot use keyword 'false' as enumeration constant > 13 | false = 0, > | ^~~~~ > srcdir/lib/util/include/bool.h:13:5: note: 'false' is a keyword with '-std=c23' onwards > srcdir/lib/util/include/bool.h:15:3: error: expected ';', identifier or '(' before 'bool' > 15 | } bool; > | ^~~~ > srcdir/lib/util/include/bool.h:15:3: warning: useless type name in empty declaration > In file included from sleep.c:2: > srcdir/lib/util/include/bool.h:13:5: error: cannot use keyword 'false' as enumeration constant > 13 | false = 0, > | ^~~~~ > srcdir/lib/util/include/bool.h:13:5: note: 'false' is a keyword with '-std=c23' onwards > srcdir/lib/util/include/bool.h:15:3: error: expected ';', identifier or '(' before 'bool' > 15 | } bool; > | ^~~~ > > In C23, bool, true, and false are added as reserved keywords, causing build errors. > However, modifying the source code just for this would be risky, so we set the C standard to C17. > See if something like this https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-std-c23-build-failure.patch Can be adopted. > Signed-off-by: mark.yang <mark.yang@lge.com> > --- > meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.64.0.bb | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.64.0.bb b/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.64.0.bb > index 62ba0f53e6..cca745cd51 100644 > --- a/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.64.0.bb > +++ b/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.64.0.bb > @@ -46,3 +46,8 @@ do_install:append:class-target() { > BBCLASSEXTEND = "native" > > CLEANBROKEN = "1" > + > +# http://errors.yoctoproject.org/Errors/Details/850147/ > +# srcdir/lib/util/include/bool.h:13:5: note: 'false' is a keyword with '-std=c23' onwards > +# srcdir/lib/util/include/bool.h:15:3: error: expected ';', identifier or '(' before 'bool' > +CFLAGS += "-std=gnu17" > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#116474): https://lists.openembedded.org/g/openembedded-devel/message/116474 > Mute This Topic: https://lists.openembedded.org/mt/112023126/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.64.0.bb b/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.64.0.bb index 62ba0f53e6..cca745cd51 100644 --- a/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.64.0.bb +++ b/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.64.0.bb @@ -46,3 +46,8 @@ do_install:append:class-target() { BBCLASSEXTEND = "native" CLEANBROKEN = "1" + +# http://errors.yoctoproject.org/Errors/Details/850147/ +# srcdir/lib/util/include/bool.h:13:5: note: 'false' is a keyword with '-std=c23' onwards +# srcdir/lib/util/include/bool.h:15:3: error: expected ';', identifier or '(' before 'bool' +CFLAGS += "-std=gnu17"