* [PATCH V1] coreutils: Add gcc parameter for ptest
@ 2023-04-14 8:53 qiutt
2023-04-14 9:41 ` [OE-core] " Luca Ceresoli
2023-04-14 10:06 ` Richard Purdie
0 siblings, 2 replies; 10+ messages in thread
From: qiutt @ 2023-04-14 8:53 UTC (permalink / raw)
To: openembedded-core; +Cc: fnstml-fujitsuten, Qiu Tingting
From: Qiu Tingting <qiutt@fujitsu.com>
If gcc is installed in image, ptest result has 4 ERROR.
ERROR: tests/rm/r-root.sh
ERROR: tests/rm/rm-readdir-fail.sh
ERROR: tests/cp/nfs-removal-race.sh
ERROR: tests/ls/getxattr-speedup.sh
r-root.log as an example:
--------------------------
k.c:1:10: fatal error: stdio.h: No such file or directory
1 | #include <stdio.h>
| ^~~~~~~~~
compilation terminated.
r-root.sh: set-up failure: failed to build shared library
ERROR tests/rm/r-root.sh (exit status: 99)
--------------------------
reason:
In these cases, k.c file is created and compiled by gcc before run.
There is a stdio.h file in /usr/include/ directory,
but gcc parameter is not set it.
solution:
Add "-l /usr/include/" in gcc parameter.
other:
If gcc is not installed in image, these cases will be skipped.
Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
---
meta/recipes-core/coreutils/coreutils_9.1.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-core/coreutils/coreutils_9.1.bb b/meta/recipes-core/coreutils/coreutils_9.1.bb
index 4807eefd04..fe785b673d 100644
--- a/meta/recipes-core/coreutils/coreutils_9.1.bb
+++ b/meta/recipes-core/coreutils/coreutils_9.1.bb
@@ -184,6 +184,7 @@ do_install_ptest () {
install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
cp ${B}/Makefile ${D}${PTEST_PATH}/
cp ${S}/init.cfg ${D}${PTEST_PATH}/
+ sed -i 's/CC -Wall -shared/CC -Wall -shared -l \/usr\/include\//g' ${D}${PTEST_PATH}/init.cfg
cp -r ${B}/src ${D}${PTEST_PATH}/
cp -r ${S}/src/*.c ${D}${PTEST_PATH}/src
sed -i '/^VPATH/s/= .*$/= ./g' ${D}${PTEST_PATH}/Makefile
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest 2023-04-14 8:53 [PATCH V1] coreutils: Add gcc parameter for ptest qiutt @ 2023-04-14 9:41 ` Luca Ceresoli 2023-04-18 1:00 ` Tingting Qiu (Fujitsu) 2023-04-14 10:06 ` Richard Purdie 1 sibling, 1 reply; 10+ messages in thread From: Luca Ceresoli @ 2023-04-14 9:41 UTC (permalink / raw) To: qiutt@fujitsu.com; +Cc: openembedded-core, fnstml-fujitsuten Hello Qiu, On Fri, 14 Apr 2023 16:53:20 +0800 "qiutt@fujitsu.com" <qiutt@fujitsu.com> wrote: > From: Qiu Tingting <qiutt@fujitsu.com> > > If gcc is installed in image, ptest result has 4 ERROR. > ERROR: tests/rm/r-root.sh > ERROR: tests/rm/rm-readdir-fail.sh > ERROR: tests/cp/nfs-removal-race.sh > ERROR: tests/ls/getxattr-speedup.sh > > r-root.log as an example: > -------------------------- > k.c:1:10: fatal error: stdio.h: No such file or directory > 1 | #include <stdio.h> > | ^~~~~~~~~ > compilation terminated. > r-root.sh: set-up failure: failed to build shared library > ERROR tests/rm/r-root.sh (exit status: 99) > -------------------------- > > reason: > In these cases, k.c file is created and compiled by gcc before run. > There is a stdio.h file in /usr/include/ directory, > but gcc parameter is not set it. > > solution: > Add "-l /usr/include/" in gcc parameter. Why "-l"? Shouldn't it be "-I"? Best regards, Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest 2023-04-14 9:41 ` [OE-core] " Luca Ceresoli @ 2023-04-18 1:00 ` Tingting Qiu (Fujitsu) 0 siblings, 0 replies; 10+ messages in thread From: Tingting Qiu (Fujitsu) @ 2023-04-18 1:00 UTC (permalink / raw) To: Luca Ceresoli Cc: openembedded-core@lists.openembedded.org, fnstml-fujitsuten@fujitsu.com Hi Luca, > -----Original Message----- > From: Luca Ceresoli <luca.ceresoli@bootlin.com> > Sent: Friday, April 14, 2023 5:41 PM > To: Qiu, Tingting/仇 婷婷 <qiutt@fujitsu.com> > Cc: openembedded-core@lists.openembedded.org; FNST fnstml-fujitsuten > <fnstml-fujitsuten@fujitsu.com> > Subject: Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest > > Hello Qiu, > > On Fri, 14 Apr 2023 16:53:20 +0800 > "qiutt@fujitsu.com" <qiutt@fujitsu.com> wrote: > > > From: Qiu Tingting <qiutt@fujitsu.com> > > > > If gcc is installed in image, ptest result has 4 ERROR. > > ERROR: tests/rm/r-root.sh > > ERROR: tests/rm/rm-readdir-fail.sh > > ERROR: tests/cp/nfs-removal-race.sh > > ERROR: tests/ls/getxattr-speedup.sh > > > > r-root.log as an example: > > -------------------------- > > k.c:1:10: fatal error: stdio.h: No such file or directory > > 1 | #include <stdio.h> > > | ^~~~~~~~~ > > compilation terminated. > > r-root.sh: set-up failure: failed to build shared library > > ERROR tests/rm/r-root.sh (exit status: 99) > > -------------------------- > > > > reason: > > In these cases, k.c file is created and compiled by gcc before run. > > There is a stdio.h file in /usr/include/ directory, > > but gcc parameter is not set it. > > > > solution: > > Add "-l /usr/include/" in gcc parameter. > > Why "-l"? Shouldn't it be "-I"? Yes, it should be "-I". Thanks Best regards, Qiu Tingting > > Best regards, > Luca > > -- > Luca Ceresoli, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest 2023-04-14 8:53 [PATCH V1] coreutils: Add gcc parameter for ptest qiutt 2023-04-14 9:41 ` [OE-core] " Luca Ceresoli @ 2023-04-14 10:06 ` Richard Purdie 2023-04-14 16:11 ` Khem Raj 1 sibling, 1 reply; 10+ messages in thread From: Richard Purdie @ 2023-04-14 10:06 UTC (permalink / raw) To: qiutt@fujitsu.com, openembedded-core; +Cc: fnstml-fujitsuten On Fri, 2023-04-14 at 16:53 +0800, qiutt@fujitsu.com wrote: > From: Qiu Tingting <qiutt@fujitsu.com> > > If gcc is installed in image, ptest result has 4 ERROR. > ERROR: tests/rm/r-root.sh > ERROR: tests/rm/rm-readdir-fail.sh > ERROR: tests/cp/nfs-removal-race.sh > ERROR: tests/ls/getxattr-speedup.sh > > r-root.log as an example: > -------------------------- > k.c:1:10: fatal error: stdio.h: No such file or directory > 1 | #include <stdio.h> > | ^~~~~~~~~ > compilation terminated. > r-root.sh: set-up failure: failed to build shared library > ERROR tests/rm/r-root.sh (exit status: 99) > -------------------------- > > reason: > In these cases, k.c file is created and compiled by gcc before run. > There is a stdio.h file in /usr/include/ directory, > but gcc parameter is not set it. > > solution: > Add "-l /usr/include/" in gcc parameter. > > other: > If gcc is not installed in image, these cases will be skipped. > > Signed-off-by: Qiu Tingting <qiutt@fujitsu.com> > --- > meta/recipes-core/coreutils/coreutils_9.1.bb | 1 + > 1 file changed, 1 insertion(+) I'm a bit puzzled by this. Wouldn't on target gcc have /usr/include as part of it's default search path? Why isn't the default search path working? Cheers, Richard > > diff --git a/meta/recipes-core/coreutils/coreutils_9.1.bb b/meta/recipes-core/coreutils/coreutils_9.1.bb > index 4807eefd04..fe785b673d 100644 > --- a/meta/recipes-core/coreutils/coreutils_9.1.bb > +++ b/meta/recipes-core/coreutils/coreutils_9.1.bb > @@ -184,6 +184,7 @@ do_install_ptest () { > install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ > cp ${B}/Makefile ${D}${PTEST_PATH}/ > cp ${S}/init.cfg ${D}${PTEST_PATH}/ > + sed -i 's/CC -Wall -shared/CC -Wall -shared -l \/usr\/include\//g' ${D}${PTEST_PATH}/init.cfg > cp -r ${B}/src ${D}${PTEST_PATH}/ > cp -r ${S}/src/*.c ${D}${PTEST_PATH}/src > sed -i '/^VPATH/s/= .*$/= ./g' ${D}${PTEST_PATH}/Makefile > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#179993): https://lists.openembedded.org/g/openembedded-core/message/179993 > Mute This Topic: https://lists.openembedded.org/mt/98258324/1686473 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [richard.purdie@linuxfoundation.org] > -=-=-=-=-=-=-=-=-=-=-=- > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest 2023-04-14 10:06 ` Richard Purdie @ 2023-04-14 16:11 ` Khem Raj 2023-04-18 1:05 ` Tingting Qiu (Fujitsu) 0 siblings, 1 reply; 10+ messages in thread From: Khem Raj @ 2023-04-14 16:11 UTC (permalink / raw) To: Richard Purdie; +Cc: qiutt@fujitsu.com, openembedded-core, fnstml-fujitsuten On Fri, Apr 14, 2023 at 3:06 AM Richard Purdie <richard.purdie@linuxfoundation.org> wrote: > > On Fri, 2023-04-14 at 16:53 +0800, qiutt@fujitsu.com wrote: > > From: Qiu Tingting <qiutt@fujitsu.com> > > > > If gcc is installed in image, ptest result has 4 ERROR. > > ERROR: tests/rm/r-root.sh > > ERROR: tests/rm/rm-readdir-fail.sh > > ERROR: tests/cp/nfs-removal-race.sh > > ERROR: tests/ls/getxattr-speedup.sh > > > > r-root.log as an example: > > -------------------------- > > k.c:1:10: fatal error: stdio.h: No such file or directory > > 1 | #include <stdio.h> > > | ^~~~~~~~~ > > compilation terminated. > > r-root.sh: set-up failure: failed to build shared library > > ERROR tests/rm/r-root.sh (exit status: 99) > > -------------------------- > > > > reason: > > In these cases, k.c file is created and compiled by gcc before run. > > There is a stdio.h file in /usr/include/ directory, > > but gcc parameter is not set it. > > > > solution: > > Add "-l /usr/include/" in gcc parameter. > > > > other: > > If gcc is not installed in image, these cases will be skipped. > > > > Signed-off-by: Qiu Tingting <qiutt@fujitsu.com> > > --- > > meta/recipes-core/coreutils/coreutils_9.1.bb | 1 + > > 1 file changed, 1 insertion(+) > > > I'm a bit puzzled by this. Wouldn't on target gcc have /usr/include as > part of it's default search path? Why isn't the default search path > working? yeah. Perhaps looking at full compiler commandline used just for this test would help maybe there is something like -ffreestanding or something passed to it. > > Cheers, > > Richard > > > > > > diff --git a/meta/recipes-core/coreutils/coreutils_9.1.bb b/meta/recipes-core/coreutils/coreutils_9.1.bb > > index 4807eefd04..fe785b673d 100644 > > --- a/meta/recipes-core/coreutils/coreutils_9.1.bb > > +++ b/meta/recipes-core/coreutils/coreutils_9.1.bb > > @@ -184,6 +184,7 @@ do_install_ptest () { > > install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ > > cp ${B}/Makefile ${D}${PTEST_PATH}/ > > cp ${S}/init.cfg ${D}${PTEST_PATH}/ > > + sed -i 's/CC -Wall -shared/CC -Wall -shared -l \/usr\/include\//g' ${D}${PTEST_PATH}/init.cfg > > cp -r ${B}/src ${D}${PTEST_PATH}/ > > cp -r ${S}/src/*.c ${D}${PTEST_PATH}/src > > sed -i '/^VPATH/s/= .*$/= ./g' ${D}${PTEST_PATH}/Makefile > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#179996): https://lists.openembedded.org/g/openembedded-core/message/179996 > Mute This Topic: https://lists.openembedded.org/mt/98258324/1997914 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest 2023-04-14 16:11 ` Khem Raj @ 2023-04-18 1:05 ` Tingting Qiu (Fujitsu) 2023-04-18 1:13 ` Khem Raj 0 siblings, 1 reply; 10+ messages in thread From: Tingting Qiu (Fujitsu) @ 2023-04-18 1:05 UTC (permalink / raw) To: Khem Raj, Richard Purdie Cc: openembedded-core@lists.openembedded.org, fnstml-fujitsuten@fujitsu.com > -----Original Message----- > From: Khem Raj <raj.khem@gmail.com> > Sent: Saturday, April 15, 2023 12:11 AM > To: Richard Purdie <richard.purdie@linuxfoundation.org> > Cc: Qiu, Tingting/仇 婷婷 <qiutt@fujitsu.com>; > openembedded-core@lists.openembedded.org; FNST fnstml-fujitsuten > <fnstml-fujitsuten@fujitsu.com> > Subject: Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest > > On Fri, Apr 14, 2023 at 3:06 AM Richard Purdie > <richard.purdie@linuxfoundation.org> wrote: > > > > On Fri, 2023-04-14 at 16:53 +0800, qiutt@fujitsu.com wrote: > > > From: Qiu Tingting <qiutt@fujitsu.com> > > > > > > If gcc is installed in image, ptest result has 4 ERROR. > > > ERROR: tests/rm/r-root.sh > > > ERROR: tests/rm/rm-readdir-fail.sh > > > ERROR: tests/cp/nfs-removal-race.sh > > > ERROR: tests/ls/getxattr-speedup.sh > > > > > > r-root.log as an example: > > > -------------------------- > > > k.c:1:10: fatal error: stdio.h: No such file or directory > > > 1 | #include <stdio.h> > > > | ^~~~~~~~~ > > > compilation terminated. > > > r-root.sh: set-up failure: failed to build shared library > > > ERROR tests/rm/r-root.sh (exit status: 99) > > > -------------------------- > > > > > > reason: > > > In these cases, k.c file is created and compiled by gcc before run. > > > There is a stdio.h file in /usr/include/ directory, > > > but gcc parameter is not set it. > > > > > > solution: > > > Add "-l /usr/include/" in gcc parameter. > > > > > > other: > > > If gcc is not installed in image, these cases will be skipped. > > > > > > Signed-off-by: Qiu Tingting <qiutt@fujitsu.com> > > > --- > > > meta/recipes-core/coreutils/coreutils_9.1.bb | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > I'm a bit puzzled by this. Wouldn't on target gcc have /usr/include as > > part of it's default search path? Why isn't the default search path > > working? > > yeah. Perhaps looking at full compiler commandline used just for this test > would help maybe there is something like -ffreestanding or something passed > to it. Normal gcc have /usr/include as part of its default search path. I used aarch64-agl-linux-gcc for aarch64 board, which does not search this path. Best regards, Qiu Tingting > > > > > Cheers, > > > > Richard > > > > > > > > > > diff --git a/meta/recipes-core/coreutils/coreutils_9.1.bb > > > b/meta/recipes-core/coreutils/coreutils_9.1.bb > > > index 4807eefd04..fe785b673d 100644 > > > --- a/meta/recipes-core/coreutils/coreutils_9.1.bb > > > +++ b/meta/recipes-core/coreutils/coreutils_9.1.bb > > > @@ -184,6 +184,7 @@ do_install_ptest () { > > > install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ > > > cp ${B}/Makefile ${D}${PTEST_PATH}/ > > > cp ${S}/init.cfg ${D}${PTEST_PATH}/ > > > + sed -i 's/CC -Wall -shared/CC -Wall -shared -l > > > + \/usr\/include\//g' ${D}${PTEST_PATH}/init.cfg > > > cp -r ${B}/src ${D}${PTEST_PATH}/ > > > cp -r ${S}/src/*.c ${D}${PTEST_PATH}/src > > > sed -i '/^VPATH/s/= .*$/= ./g' ${D}${PTEST_PATH}/Makefile > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#179996): > > https://lists.openembedded.org/g/openembedded-core/message/179996 > > Mute This Topic: https://lists.openembedded.org/mt/98258324/1997914 > > Group Owner: openembedded-core+owner@lists.openembedded.org > > Unsubscribe: > https://lists.openembedded.org/g/openembedded-core/unsub > > [raj.khem@gmail.com] > > -=-=-=-=-=-=-=-=-=-=-=- > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest 2023-04-18 1:05 ` Tingting Qiu (Fujitsu) @ 2023-04-18 1:13 ` Khem Raj 2023-04-18 3:27 ` Tingting Qiu (Fujitsu) 2023-04-18 3:42 ` qiutt 0 siblings, 2 replies; 10+ messages in thread From: Khem Raj @ 2023-04-18 1:13 UTC (permalink / raw) To: Tingting Qiu (Fujitsu) Cc: Richard Purdie, fnstml-fujitsuten@fujitsu.com, openembedded-core@lists.openembedded.org [-- Attachment #1: Type: text/plain, Size: 4039 bytes --] On Mon, Apr 17, 2023 at 6:05 PM Tingting Qiu (Fujitsu) <qiutt@fujitsu.com> wrote: > > > > -----Original Message----- > > From: Khem Raj <raj.khem@gmail.com> > > Sent: Saturday, April 15, 2023 12:11 AM > > To: Richard Purdie <richard.purdie@linuxfoundation.org> > > Cc: Qiu, Tingting/仇 婷婷 <qiutt@fujitsu.com>; > > openembedded-core@lists.openembedded.org; FNST fnstml-fujitsuten > > <fnstml-fujitsuten@fujitsu.com> > > Subject: Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest > > > > On Fri, Apr 14, 2023 at 3:06 AM Richard Purdie > > <richard.purdie@linuxfoundation.org> wrote: > > > > > > On Fri, 2023-04-14 at 16:53 +0800, qiutt@fujitsu.com wrote: > > > > From: Qiu Tingting <qiutt@fujitsu.com> > > > > > > > > If gcc is installed in image, ptest result has 4 ERROR. > > > > ERROR: tests/rm/r-root.sh > > > > ERROR: tests/rm/rm-readdir-fail.sh > > > > ERROR: tests/cp/nfs-removal-race.sh > > > > ERROR: tests/ls/getxattr-speedup.sh > > > > > > > > r-root.log as an example: > > > > -------------------------- > > > > k.c:1:10: fatal error: stdio.h: No such file or directory > > > > 1 | #include <stdio.h> > > > > | ^~~~~~~~~ > > > > compilation terminated. > > > > r-root.sh: set-up failure: failed to build shared library > > > > ERROR tests/rm/r-root.sh (exit status: 99) > > > > -------------------------- > > > > > > > > reason: > > > > In these cases, k.c file is created and compiled by gcc before run. > > > > There is a stdio.h file in /usr/include/ directory, > > > > but gcc parameter is not set it. > > > > > > > > solution: > > > > Add "-l /usr/include/" in gcc parameter. > > > > > > > > other: > > > > If gcc is not installed in image, these cases will be skipped. > > > > > > > > Signed-off-by: Qiu Tingting <qiutt@fujitsu.com> > > > > --- > > > > meta/recipes-core/coreutils/coreutils_9.1.bb | 1 + > > > > 1 file changed, 1 insertion(+) > > > > > > > > > I'm a bit puzzled by this. Wouldn't on target gcc have /usr/include as > > > part of it's default search path? Why isn't the default search path > > > working? > > > > yeah. Perhaps looking at full compiler commandline used just for this > test > > would help maybe there is something like -ffreestanding or something > passed > > to it. > > Normal gcc have /usr/include as part of its default search path. > I used aarch64-agl-linux-gcc for aarch64 board, which does not search this > path. This should be a symlink to gcc on target so I wonder why it does not work > > Best regards, > Qiu Tingting > > > > > > > > Cheers, > > > > > > Richard > > > > > > > > > > > > > > diff --git a/meta/recipes-core/coreutils/coreutils_9.1.bb > > > > b/meta/recipes-core/coreutils/coreutils_9.1.bb > > > > index 4807eefd04..fe785b673d 100644 > > > > --- a/meta/recipes-core/coreutils/coreutils_9.1.bb > > > > +++ b/meta/recipes-core/coreutils/coreutils_9.1.bb > > > > @@ -184,6 +184,7 @@ do_install_ptest () { > > > > install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ > > > > cp ${B}/Makefile ${D}${PTEST_PATH}/ > > > > cp ${S}/init.cfg ${D}${PTEST_PATH}/ > > > > + sed -i 's/CC -Wall -shared/CC -Wall -shared -l > > > > + \/usr\/include\//g' ${D}${PTEST_PATH}/init.cfg > > > > cp -r ${B}/src ${D}${PTEST_PATH}/ > > > > cp -r ${S}/src/*.c ${D}${PTEST_PATH}/src > > > > sed -i '/^VPATH/s/= .*$/= ./g' ${D}${PTEST_PATH}/Makefile > > > > > > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > > Links: You receive all messages sent to this group. > > > View/Reply Online (#179996): > > > https://lists.openembedded.org/g/openembedded-core/message/179996 > > > Mute This Topic: https://lists.openembedded.org/mt/98258324/1997914 > > > Group Owner: openembedded-core+owner@lists.openembedded.org > > > Unsubscribe: > > https://lists.openembedded.org/g/openembedded-core/unsub > > > [raj.khem@gmail.com] > > > -=-=-=-=-=-=-=-=-=-=-=- > > > > [-- Attachment #2: Type: text/html, Size: 6872 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest 2023-04-18 1:13 ` Khem Raj @ 2023-04-18 3:27 ` Tingting Qiu (Fujitsu) 2023-04-18 3:42 ` qiutt 1 sibling, 0 replies; 10+ messages in thread From: Tingting Qiu (Fujitsu) @ 2023-04-18 3:27 UTC (permalink / raw) To: Khem Raj Cc: Richard Purdie, fnstml-fujitsuten@fujitsu.com, openembedded-core@lists.openembedded.org [-- Attachment #1: Type: text/plain, Size: 5593 bytes --] From: Khem Raj <raj.khem@gmail.com> Sent: Tuesday, April 18, 2023 9:14 AM To: Qiu, Tingting/仇 婷婷 <qiutt@fujitsu.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org>; FNST fnstml-fujitsuten <fnstml-fujitsuten@fujitsu.com>; openembedded-core@lists.openembedded.org Subject: Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest On Mon, Apr 17, 2023 at 6:05 PM Tingting Qiu (Fujitsu) <qiutt@fujitsu.com<mailto:qiutt@fujitsu.com>> wrote: > -----Original Message----- > From: Khem Raj <raj.khem@gmail.com<mailto:raj.khem@gmail.com>> > Sent: Saturday, April 15, 2023 12:11 AM > To: Richard Purdie <richard.purdie@linuxfoundation.org<mailto:richard.purdie@linuxfoundation.org>> > Cc: Qiu, Tingting/仇 婷婷 <qiutt@fujitsu.com<mailto:qiutt@fujitsu.com>>; > openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>; FNST fnstml-fujitsuten > <fnstml-fujitsuten@fujitsu.com<mailto:fnstml-fujitsuten@fujitsu.com>> > Subject: Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest > > On Fri, Apr 14, 2023 at 3:06 AM Richard Purdie > <richard.purdie@linuxfoundation.org<mailto:richard.purdie@linuxfoundation.org>> wrote: > > > > On Fri, 2023-04-14 at 16:53 +0800, qiutt@fujitsu.com<mailto:qiutt@fujitsu.com> wrote: > > > From: Qiu Tingting <qiutt@fujitsu.com<mailto:qiutt@fujitsu.com>> > > > > > > If gcc is installed in image, ptest result has 4 ERROR. > > > ERROR: tests/rm/r-root.sh > > > ERROR: tests/rm/rm-readdir-fail.sh > > > ERROR: tests/cp/nfs-removal-race.sh > > > ERROR: tests/ls/getxattr-speedup.sh > > > > > > r-root.log as an example: > > > -------------------------- > > > k.c:1:10: fatal error: stdio.h: No such file or directory > > > 1 | #include <stdio.h> > > > | ^~~~~~~~~ > > > compilation terminated. > > > r-root.sh: set-up failure: failed to build shared library > > > ERROR tests/rm/r-root.sh (exit status: 99) > > > -------------------------- > > > > > > reason: > > > In these cases, k.c file is created and compiled by gcc before run. > > > There is a stdio.h file in /usr/include/ directory, > > > but gcc parameter is not set it. > > > > > > solution: > > > Add "-l /usr/include/" in gcc parameter. > > > > > > other: > > > If gcc is not installed in image, these cases will be skipped. > > > > > > Signed-off-by: Qiu Tingting <qiutt@fujitsu.com<mailto:qiutt@fujitsu.com>> > > > --- > > > meta/recipes-core/coreutils/coreutils_9.1.bb<http://coreutils_9.1.bb> | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > I'm a bit puzzled by this. Wouldn't on target gcc have /usr/include as > > part of it's default search path? Why isn't the default search path > > working? > > yeah. Perhaps looking at full compiler commandline used just for this test > would help maybe there is something like -ffreestanding or something passed > to it. Normal gcc have /usr/include as part of its default search path. I used aarch64-agl-linux-gcc for aarch64 board, which does not search this path. This should be a symlink to gcc on target so I wonder why it does not work First, see the coreutils’ files which installed on target. ================ Makefile -->created by cross-compile build-aux init.cfg --> copied from src run-ptest tests ================ In Makefile, CC is defined by aarch64-agl-linux-gcc with --sysroot=recipe-sysroot. CC = aarch64-agl-linux-gcc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=recipe-sysroot In init.cfg, CC is used to compile k.c file. $CC -Wall -shared --std=gnu99 -fPIC -O2 $* "$in" -o "$out" $gcc_shared_libs_ Because of “--sysroot=recipe-sysroot”, it does not work. So, we could add “-I /usr/include” in Makefile or init.cfg, or delete “--sysroot=recipe-sysroot” from Makefile. Which one is better? Let me know, and I will send the patch v2. thanks. Best regards, Qiu Tingting Best regards, Qiu Tingting > > > > > Cheers, > > > > Richard > > > > > > > > > > diff --git a/meta/recipes-core/coreutils/coreutils_9.1.bb<http://coreutils_9.1.bb> > > > b/meta/recipes-core/coreutils/coreutils_9.1.bb<http://coreutils_9.1.bb> > > > index 4807eefd04..fe785b673d 100644 > > > --- a/meta/recipes-core/coreutils/coreutils_9.1.bb<http://coreutils_9.1.bb> > > > +++ b/meta/recipes-core/coreutils/coreutils_9.1.bb<http://coreutils_9.1.bb> > > > @@ -184,6 +184,7 @@ do_install_ptest () { > > > install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ > > > cp ${B}/Makefile ${D}${PTEST_PATH}/ > > > cp ${S}/init.cfg ${D}${PTEST_PATH}/ > > > + sed -i 's/CC -Wall -shared/CC -Wall -shared -l > > > + \/usr\/include\//g' ${D}${PTEST_PATH}/init.cfg > > > cp -r ${B}/src ${D}${PTEST_PATH}/ > > > cp -r ${S}/src/*.c ${D}${PTEST_PATH}/src > > > sed -i '/^VPATH/s/= .*$/= ./g' ${D}${PTEST_PATH}/Makefile > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#179996): > > https://lists.openembedded.org/g/openembedded-core/message/179996 > > Mute This Topic: https://lists.openembedded.org/mt/98258324/1997914 > > Group Owner: openembedded-core+owner@lists.openembedded.org<mailto:openembedded-core%2Bowner@lists.openembedded.org> > > Unsubscribe: > https://lists.openembedded.org/g/openembedded-core/unsub > > [raj.khem@gmail.com<mailto:raj.khem@gmail.com>] > > -=-=-=-=-=-=-=-=-=-=-=- > > [-- Attachment #2: Type: text/html, Size: 15646 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH V1] coreutils: Add gcc parameter for ptest 2023-04-18 1:13 ` Khem Raj 2023-04-18 3:27 ` Tingting Qiu (Fujitsu) @ 2023-04-18 3:42 ` qiutt 2023-04-18 5:22 ` [OE-core] " Khem Raj 1 sibling, 1 reply; 10+ messages in thread From: qiutt @ 2023-04-18 3:42 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 973 bytes --] > > > > This should be a symlink to gcc on target so I wonder why it does not work > > > First, see the coreutils’ files which installed on target. ================ Makefile -->created by cross-compile build-aux init.cfg --> copied from src run-ptest tests ================ In Makefile, CC is defined by aarch64-agl-linux-gcc with --sysroot=recipe-sysroot. CC = aarch64-agl-linux-gcc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=recipe-sysroot In init.cfg, CC is used to compile k.c file. $CC -Wall -shared --std=gnu99 -fPIC -O2 $* "$in" -o "$out" $gcc_shared_libs_ Because of “ --sysroot=recipe-sysroot ” , it does not work. So, we could add “ -I /usr/include ” in Makefile or init.cfg, or delete “ --sysroot=recipe-sysroot ” from Makefile. Which one is better? Let me know, and I will send the patch v2. thanks. [-- Attachment #2: Type: text/html, Size: 3783 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest 2023-04-18 3:42 ` qiutt @ 2023-04-18 5:22 ` Khem Raj 0 siblings, 0 replies; 10+ messages in thread From: Khem Raj @ 2023-04-18 5:22 UTC (permalink / raw) To: qiutt@fujitsu.com; +Cc: openembedded-core [-- Attachment #1: Type: text/plain, Size: 1562 bytes --] On Mon, Apr 17, 2023 at 8:42 PM qiutt@fujitsu.com <qiutt@fujitsu.com> wrote: > This should be a symlink to gcc on target so I wonder why it does not work > > First, see the coreutils’ files which installed on target. > > ================ > > Makefile -->created by cross-compile > > build-aux > > init.cfg --> copied from src > > run-ptest > > tests > > ================ > > In Makefile, CC is defined by aarch64-agl-linux-gcc with > --sysroot=recipe-sysroot. > > CC = aarch64-agl-linux-gcc -fstack-protector-strong -O2 > -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security > --sysroot=recipe-sysroot > > In init.cfg, CC is used to compile k.c file. > > $CC -Wall -shared --std=gnu99 -fPIC -O2 $* "$in" -o "$out" > $gcc_shared_libs_ > > Because of “--sysroot=recipe-sysroot”, it does not work. > > So, we could add “-I /usr/include” in Makefile or init.cfg, or delete “ > --sysroot=recipe-sysroot” from Makefile. > > Which one is better? > Delete sysroot > Let me know, and I will send the patch v2. > > thanks. > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#180174): > https://lists.openembedded.org/g/openembedded-core/message/180174 > Mute This Topic: https://lists.openembedded.org/mt/98258324/1997914 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > > [-- Attachment #2: Type: text/html, Size: 4689 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-04-18 5:23 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-04-14 8:53 [PATCH V1] coreutils: Add gcc parameter for ptest qiutt 2023-04-14 9:41 ` [OE-core] " Luca Ceresoli 2023-04-18 1:00 ` Tingting Qiu (Fujitsu) 2023-04-14 10:06 ` Richard Purdie 2023-04-14 16:11 ` Khem Raj 2023-04-18 1:05 ` Tingting Qiu (Fujitsu) 2023-04-18 1:13 ` Khem Raj 2023-04-18 3:27 ` Tingting Qiu (Fujitsu) 2023-04-18 3:42 ` qiutt 2023-04-18 5:22 ` [OE-core] " Khem Raj
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox