Message ID | 20250918112347.1331393-2-skandigraun@gmail.com |
---|---|
State | New |
Headers | show |
Series | [meta-oe,kirkstone,01/10] fb-test: include UPSTREAM_CHECK_COMMITS to fix UNKNOWN_BROKEN status | expand |
Do we need these fixed for gcc-15 in kirkstone? At least for target recipes which will use gcc from OE not the native from host. I've sent couple fixes for scarthgap and walnascar for components with native in BBCLASSEXTEND (which were failing on my host with gcc-15), but for target it isn't needed, right? Unless you did it just to more easily cherry-pick some later fixes which are needed in kirkstone. On Thu, Sep 18, 2025 at 1:23 PM Gyorgy Sarvari via lists.openembedded.org <skandigraun=gmail.com@lists.openembedded.org> wrote: > > From: "mark.yang" <mark.yang@lge.com> > > * fix following error: > http://errors.yoctoproject.org/Errors/Details/850314 > utils/uevent_reader.c: In function 'main': > utils/uevent_reader.c:33:24: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types] > 33 | signal(SIGINT, exit_handler); > | ^~~~~~~~~~~~ > | | > | void (*)(void) > In file included from utils/uevent_reader.c:4: > TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)' > 88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler) > | ~~~~~~~~~~~~~~~^~~~~~~~~ > utils/uevent_reader.c:15:6: note: 'exit_handler' declared here > 15 | void exit_handler() > | ^~~~~~~~~~~~ > TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here > 72 | typedef void (*__sighandler_t) (int); > | ^~~~~~~~~~~~~~ > make: *** [<builtin>: utils/uevent_reader] Error 1 > > Set PATCHTOOL to git because this recipe compiles all .c files including those in .pc/ directory which causes build errors. > .pc/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch/utils/uevent_reader.c:15:6: note: 'exit_handler' declared here > 15 | void exit_handler() > > Signed-off-by: mark.yang <mark.yang@lge.com> > Signed-off-by: Khem Raj <raj.khem@gmail.com> > (cherry picked from commit a0b88afd798221b0751fc506e6ea224cd6745ec7) > Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> > --- > ...cc-15-Wincompatible-pointer-types-er.patch | 69 +++++++++++++++++++ > meta-oe/recipes-test/pm-qa/pm-qa_git.bb | 7 +- > 2 files changed, 75 insertions(+), 1 deletion(-) > create mode 100644 meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch > > diff --git a/meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch b/meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch > new file mode 100644 > index 0000000000..7efd8dd71a > --- /dev/null > +++ b/meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch > @@ -0,0 +1,69 @@ > +From b6b968d1c8fbba79b33d63874b551225e663435e Mon Sep 17 00:00:00 2001 > +From: "mark.yang" <mark.yang@lge.com> > +Date: Wed, 2 Apr 2025 16:59:00 +0900 > +Subject: [PATCH] fix build with gcc-15 -Wincompatible-pointer-types error > + > +See more details: http://errors.yoctoproject.org/Errors/Details/850314 > +utils/uevent_reader.c:33:24: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types] > + 33 | signal(SIGINT, exit_handler); > + | ^~~~~~~~~~~~ > + | | > + | void (*)(void) > +In file included from utils/uevent_reader.c:4: > +TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)' > + 88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler) > + | ~~~~~~~~~~~~~~~^~~~~~~~~ > +utils/uevent_reader.c:15:6: note: 'exit_handler' declared here > + 15 | void exit_handler() > + | ^~~~~~~~~~~~ > +TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here > + 72 | typedef void (*__sighandler_t) (int); > + | ^~~~~~~~~~~~~~ > + > +* Set the parameter of exit_handler() to int. > + Changed to use exit_handler(0). > + The parameter is not used inside exit_handler() anyway. > + > +Upstream-Status: Inactive-Upstream [lastrelease: 6 years ago] > +Signed-off-by: mark.yang <mark.yang@lge.com> > +--- > + utils/uevent_reader.c | 8 ++++---- > + 1 file changed, 4 insertions(+), 4 deletions(-) > + > +diff --git a/utils/uevent_reader.c b/utils/uevent_reader.c > +index afbb426..75d445c 100644 > +--- a/utils/uevent_reader.c > ++++ b/utils/uevent_reader.c > +@@ -12,7 +12,7 @@ > + > + FILE *fp; > + > +-void exit_handler() > ++void exit_handler(int sig) > + { > + fprintf(stdout, "exiting from uevent reader...\n"); > + fclose(fp); > +@@ -42,20 +42,20 @@ int main(int argc, char *argv[]) > + pfd.fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); > + if (pfd.fd == -1) { > + perror("error: socket()"); > +- exit_handler(); > ++ exit_handler(0); > + } > + > + if (bind(pfd.fd, (struct sockaddr *) &nls, > + sizeof(struct sockaddr_nl))) { > + perror("error : bind()"); > +- exit_handler(); > ++ exit_handler(0); > + } > + > + while (-1 != poll(&pfd, 1, -1)) { > + int i, len = recv(pfd.fd, buf, sizeof(buf), MSG_DONTWAIT); > + if (len == -1) { > + perror("error : recv()"); > +- exit_handler(); > ++ exit_handler(0); > + } > + > + i = 0; > diff --git a/meta-oe/recipes-test/pm-qa/pm-qa_git.bb b/meta-oe/recipes-test/pm-qa/pm-qa_git.bb > index fc21e6192e..5cb51cb9eb 100644 > --- a/meta-oe/recipes-test/pm-qa/pm-qa_git.bb > +++ b/meta-oe/recipes-test/pm-qa/pm-qa_git.bb > @@ -10,12 +10,17 @@ BRANCH ?= "master" > > SRCREV = "05710ec5032be4c8edafb4109d4d908d31243906" > > -SRC_URI = "git://git.linaro.org/power/pm-qa.git;protocol=git;branch=${BRANCH}" > +SRC_URI = " \ > + git://git.linaro.org/power/pm-qa.git;protocol=git;branch=${BRANCH} \ > + file://0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch \ > +" > > S = "${WORKDIR}/git" > > CFLAGS += "-pthread" > > +PATCHTOOL = "git" > + > do_compile () { > # Find all the .c files in this project and build them. > for x in `find . -name "*.c"` > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#119561): https://lists.openembedded.org/g/openembedded-devel/message/119561 > Mute This Topic: https://lists.openembedded.org/mt/115308032/3617156 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On 9/18/25 13:28, Martin Jansa wrote: > Do we need these fixed for gcc-15 in kirkstone? At least for target > recipes which will use gcc from OE not the native from host. I've sent > couple fixes for scarthgap and walnascar for components with native in > BBCLASSEXTEND (which were failing on my host with gcc-15), but for > target it isn't needed, right? Unless you did it just to more easily > cherry-pick some later fixes which are needed in kirkstone. Thanks for reviewing. Trying to bring some recipes gradually to be closer to master regarding fixes (within the frame of stable branch rules). Mostly I'm trying to cherry pick useful commits bugfixes and version bumps that look useful and I can also at least test build. This commit wasn't picked specifically to make later cherry-picking easier, it just looks like a generic fix, coming from upstream - but I can be convinced about this one if it should stay out of this branch. > On Thu, Sep 18, 2025 at 1:23 PM Gyorgy Sarvari via > lists.openembedded.org <skandigraun=gmail.com@lists.openembedded.org> > wrote: >> From: "mark.yang" <mark.yang@lge.com> >> >> * fix following error: >> http://errors.yoctoproject.org/Errors/Details/850314 >> utils/uevent_reader.c: In function 'main': >> utils/uevent_reader.c:33:24: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types] >> 33 | signal(SIGINT, exit_handler); >> | ^~~~~~~~~~~~ >> | | >> | void (*)(void) >> In file included from utils/uevent_reader.c:4: >> TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)' >> 88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler) >> | ~~~~~~~~~~~~~~~^~~~~~~~~ >> utils/uevent_reader.c:15:6: note: 'exit_handler' declared here >> 15 | void exit_handler() >> | ^~~~~~~~~~~~ >> TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here >> 72 | typedef void (*__sighandler_t) (int); >> | ^~~~~~~~~~~~~~ >> make: *** [<builtin>: utils/uevent_reader] Error 1 >> >> Set PATCHTOOL to git because this recipe compiles all .c files including those in .pc/ directory which causes build errors. >> .pc/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch/utils/uevent_reader.c:15:6: note: 'exit_handler' declared here >> 15 | void exit_handler() >> >> Signed-off-by: mark.yang <mark.yang@lge.com> >> Signed-off-by: Khem Raj <raj.khem@gmail.com> >> (cherry picked from commit a0b88afd798221b0751fc506e6ea224cd6745ec7) >> Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> >> --- >> ...cc-15-Wincompatible-pointer-types-er.patch | 69 +++++++++++++++++++ >> meta-oe/recipes-test/pm-qa/pm-qa_git.bb | 7 +- >> 2 files changed, 75 insertions(+), 1 deletion(-) >> create mode 100644 meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch >> >> diff --git a/meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch b/meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch >> new file mode 100644 >> index 0000000000..7efd8dd71a >> --- /dev/null >> +++ b/meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch >> @@ -0,0 +1,69 @@ >> +From b6b968d1c8fbba79b33d63874b551225e663435e Mon Sep 17 00:00:00 2001 >> +From: "mark.yang" <mark.yang@lge.com> >> +Date: Wed, 2 Apr 2025 16:59:00 +0900 >> +Subject: [PATCH] fix build with gcc-15 -Wincompatible-pointer-types error >> + >> +See more details: http://errors.yoctoproject.org/Errors/Details/850314 >> +utils/uevent_reader.c:33:24: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types] >> + 33 | signal(SIGINT, exit_handler); >> + | ^~~~~~~~~~~~ >> + | | >> + | void (*)(void) >> +In file included from utils/uevent_reader.c:4: >> +TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)' >> + 88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler) >> + | ~~~~~~~~~~~~~~~^~~~~~~~~ >> +utils/uevent_reader.c:15:6: note: 'exit_handler' declared here >> + 15 | void exit_handler() >> + | ^~~~~~~~~~~~ >> +TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here >> + 72 | typedef void (*__sighandler_t) (int); >> + | ^~~~~~~~~~~~~~ >> + >> +* Set the parameter of exit_handler() to int. >> + Changed to use exit_handler(0). >> + The parameter is not used inside exit_handler() anyway. >> + >> +Upstream-Status: Inactive-Upstream [lastrelease: 6 years ago] >> +Signed-off-by: mark.yang <mark.yang@lge.com> >> +--- >> + utils/uevent_reader.c | 8 ++++---- >> + 1 file changed, 4 insertions(+), 4 deletions(-) >> + >> +diff --git a/utils/uevent_reader.c b/utils/uevent_reader.c >> +index afbb426..75d445c 100644 >> +--- a/utils/uevent_reader.c >> ++++ b/utils/uevent_reader.c >> +@@ -12,7 +12,7 @@ >> + >> + FILE *fp; >> + >> +-void exit_handler() >> ++void exit_handler(int sig) >> + { >> + fprintf(stdout, "exiting from uevent reader...\n"); >> + fclose(fp); >> +@@ -42,20 +42,20 @@ int main(int argc, char *argv[]) >> + pfd.fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); >> + if (pfd.fd == -1) { >> + perror("error: socket()"); >> +- exit_handler(); >> ++ exit_handler(0); >> + } >> + >> + if (bind(pfd.fd, (struct sockaddr *) &nls, >> + sizeof(struct sockaddr_nl))) { >> + perror("error : bind()"); >> +- exit_handler(); >> ++ exit_handler(0); >> + } >> + >> + while (-1 != poll(&pfd, 1, -1)) { >> + int i, len = recv(pfd.fd, buf, sizeof(buf), MSG_DONTWAIT); >> + if (len == -1) { >> + perror("error : recv()"); >> +- exit_handler(); >> ++ exit_handler(0); >> + } >> + >> + i = 0; >> diff --git a/meta-oe/recipes-test/pm-qa/pm-qa_git.bb b/meta-oe/recipes-test/pm-qa/pm-qa_git.bb >> index fc21e6192e..5cb51cb9eb 100644 >> --- a/meta-oe/recipes-test/pm-qa/pm-qa_git.bb >> +++ b/meta-oe/recipes-test/pm-qa/pm-qa_git.bb >> @@ -10,12 +10,17 @@ BRANCH ?= "master" >> >> SRCREV = "05710ec5032be4c8edafb4109d4d908d31243906" >> >> -SRC_URI = "git://git.linaro.org/power/pm-qa.git;protocol=git;branch=${BRANCH}" >> +SRC_URI = " \ >> + git://git.linaro.org/power/pm-qa.git;protocol=git;branch=${BRANCH} \ >> + file://0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch \ >> +" >> >> S = "${WORKDIR}/git" >> >> CFLAGS += "-pthread" >> >> +PATCHTOOL = "git" >> + >> do_compile () { >> # Find all the .c files in this project and build them. >> for x in `find . -name "*.c"` >> >> -=-=-=-=-=-=-=-=-=-=-=- >> Links: You receive all messages sent to this group. >> View/Reply Online (#119561): https://lists.openembedded.org/g/openembedded-devel/message/119561 >> Mute This Topic: https://lists.openembedded.org/mt/115308032/3617156 >> Group Owner: openembedded-devel+owner@lists.openembedded.org >> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com] >> -=-=-=-=-=-=-=-=-=-=-=- >>
On 9/18/25 13:42, Gyorgy Sarvari wrote: > On 9/18/25 13:28, Martin Jansa wrote: >> Do we need these fixed for gcc-15 in kirkstone? At least for target >> recipes which will use gcc from OE not the native from host. I've sent >> couple fixes for scarthgap and walnascar for components with native in >> BBCLASSEXTEND (which were failing on my host with gcc-15), but for >> target it isn't needed, right? Unless you did it just to more easily >> cherry-pick some later fixes which are needed in kirkstone. > Thanks for reviewing. > Trying to bring some recipes gradually to be closer to master regarding > fixes (within the frame of stable branch rules). > Mostly I'm trying to cherry pick useful commits bugfixes and version > bumps that look useful and I can also at least test build. > > This commit wasn't picked specifically to make later cherry-picking > easier, it just looks like a generic fix, coming from upstream - but I > can be convinced about this one if it should stay out of this branch. Thinking a bit more, actually I agree with you. Kirkstone doesn't need gcc15 class-target fixes, it doesn't make much sense. I will drop this, and the one I picked for avro-c too. Thanks for noting!
diff --git a/meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch b/meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch new file mode 100644 index 0000000000..7efd8dd71a --- /dev/null +++ b/meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch @@ -0,0 +1,69 @@ +From b6b968d1c8fbba79b33d63874b551225e663435e Mon Sep 17 00:00:00 2001 +From: "mark.yang" <mark.yang@lge.com> +Date: Wed, 2 Apr 2025 16:59:00 +0900 +Subject: [PATCH] fix build with gcc-15 -Wincompatible-pointer-types error + +See more details: http://errors.yoctoproject.org/Errors/Details/850314 +utils/uevent_reader.c:33:24: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types] + 33 | signal(SIGINT, exit_handler); + | ^~~~~~~~~~~~ + | | + | void (*)(void) +In file included from utils/uevent_reader.c:4: +TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)' + 88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler) + | ~~~~~~~~~~~~~~~^~~~~~~~~ +utils/uevent_reader.c:15:6: note: 'exit_handler' declared here + 15 | void exit_handler() + | ^~~~~~~~~~~~ +TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here + 72 | typedef void (*__sighandler_t) (int); + | ^~~~~~~~~~~~~~ + +* Set the parameter of exit_handler() to int. + Changed to use exit_handler(0). + The parameter is not used inside exit_handler() anyway. + +Upstream-Status: Inactive-Upstream [lastrelease: 6 years ago] +Signed-off-by: mark.yang <mark.yang@lge.com> +--- + utils/uevent_reader.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/utils/uevent_reader.c b/utils/uevent_reader.c +index afbb426..75d445c 100644 +--- a/utils/uevent_reader.c ++++ b/utils/uevent_reader.c +@@ -12,7 +12,7 @@ + + FILE *fp; + +-void exit_handler() ++void exit_handler(int sig) + { + fprintf(stdout, "exiting from uevent reader...\n"); + fclose(fp); +@@ -42,20 +42,20 @@ int main(int argc, char *argv[]) + pfd.fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); + if (pfd.fd == -1) { + perror("error: socket()"); +- exit_handler(); ++ exit_handler(0); + } + + if (bind(pfd.fd, (struct sockaddr *) &nls, + sizeof(struct sockaddr_nl))) { + perror("error : bind()"); +- exit_handler(); ++ exit_handler(0); + } + + while (-1 != poll(&pfd, 1, -1)) { + int i, len = recv(pfd.fd, buf, sizeof(buf), MSG_DONTWAIT); + if (len == -1) { + perror("error : recv()"); +- exit_handler(); ++ exit_handler(0); + } + + i = 0; diff --git a/meta-oe/recipes-test/pm-qa/pm-qa_git.bb b/meta-oe/recipes-test/pm-qa/pm-qa_git.bb index fc21e6192e..5cb51cb9eb 100644 --- a/meta-oe/recipes-test/pm-qa/pm-qa_git.bb +++ b/meta-oe/recipes-test/pm-qa/pm-qa_git.bb @@ -10,12 +10,17 @@ BRANCH ?= "master" SRCREV = "05710ec5032be4c8edafb4109d4d908d31243906" -SRC_URI = "git://git.linaro.org/power/pm-qa.git;protocol=git;branch=${BRANCH}" +SRC_URI = " \ + git://git.linaro.org/power/pm-qa.git;protocol=git;branch=${BRANCH} \ + file://0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch \ +" S = "${WORKDIR}/git" CFLAGS += "-pthread" +PATCHTOOL = "git" + do_compile () { # Find all the .c files in this project and build them. for x in `find . -name "*.c"`