On Mon, Apr 17, 2023 at 6:05 PM Tingting Qiu (Fujitsu) <[email protected]>
wrote:

>
>
> > -----Original Message-----
> > From: Khem Raj <[email protected]>
> > Sent: Saturday, April 15, 2023 12:11 AM
> > To: Richard Purdie <[email protected]>
> > Cc: Qiu, Tingting/仇 婷婷 <[email protected]>;
> > [email protected]; FNST fnstml-fujitsuten
> > <[email protected]>
> > Subject: Re: [OE-core] [PATCH V1] coreutils: Add gcc parameter for ptest
> >
> > On Fri, Apr 14, 2023 at 3:06 AM Richard Purdie
> > <[email protected]> wrote:
> > >
> > > On Fri, 2023-04-14 at 16:53 +0800, [email protected] wrote:
> > > > From: Qiu Tingting <[email protected]>
> > > >
> > > > 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 <[email protected]>
> > > > ---
> > > >  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 (#180172): 
https://lists.openembedded.org/g/openembedded-core/message/180172
Mute This Topic: https://lists.openembedded.org/mt/98258324/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to