[meta-zephyr] build broken with current oe-core master


Jon Mason
 

On Fri, Jul 22, 2022 at 10:35 AM Khem Raj <raj.khem@...> wrote:

On Fri, Jul 22, 2022 at 10:31 AM Khem Raj <raj.khem@...> wrote:

On Fri, Jul 22, 2022 at 10:30 AM Ross Burton <Ross.Burton@...> wrote:

On 22 Jul 2022, at 15:28, Khem Raj via lists.openembedded.org <raj.khem=gmail.com@...> wrote:

On Fri, Jul 22, 2022 at 6:36 AM Bartosz Golaszewski <brgl@...> wrote:

On Thu, Jul 21, 2022 at 3:52 PM Khem Raj <raj.khem@...> wrote:

I don’t see config.log for Libstdc++ folder in there
Can you see why that’s missing ?
I was missing because I misunderstood you - you were probably asking
for the config.log *with* Jon's patch applied.

Here's the log: https://controlc.com/4544edd8
right, so I can see that its checking for fcnt function on system
where it should not, your toolchain
is using newlib and I am not sure what Jon's build is using for
zephyr, I guess it could be pure baremetal
if so, then perhaps we have a place to look into.

Jon, whats TCLIBC set to in zephyr's case.
Our CI has the following workaround for a problem that we’ve not managed to root-cause so far:

EXTRA_OECONF:append:pn-gcc-runtime = " ac_cv_func_fcntl=no ac_cv_func_getexecname=no”
ah, that speaks for the difference then. Is this workaround introduced
after Richard's change ?
perhaps came along with gcc 12 upgrade [1]

[1] https://lists.yoctoproject.org/g/meta-arm/message/3469
Yes. It is being tracked by
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14803




Ross


Khem Raj
 

On Fri, Jul 22, 2022 at 10:31 AM Khem Raj <raj.khem@...> wrote:

On Fri, Jul 22, 2022 at 10:30 AM Ross Burton <Ross.Burton@...> wrote:

On 22 Jul 2022, at 15:28, Khem Raj via lists.openembedded.org <raj.khem=gmail.com@...> wrote:

On Fri, Jul 22, 2022 at 6:36 AM Bartosz Golaszewski <brgl@...> wrote:

On Thu, Jul 21, 2022 at 3:52 PM Khem Raj <raj.khem@...> wrote:

I don’t see config.log for Libstdc++ folder in there
Can you see why that’s missing ?
I was missing because I misunderstood you - you were probably asking
for the config.log *with* Jon's patch applied.

Here's the log: https://controlc.com/4544edd8
right, so I can see that its checking for fcnt function on system
where it should not, your toolchain
is using newlib and I am not sure what Jon's build is using for
zephyr, I guess it could be pure baremetal
if so, then perhaps we have a place to look into.

Jon, whats TCLIBC set to in zephyr's case.
Our CI has the following workaround for a problem that we’ve not managed to root-cause so far:

EXTRA_OECONF:append:pn-gcc-runtime = " ac_cv_func_fcntl=no ac_cv_func_getexecname=no”
ah, that speaks for the difference then. Is this workaround introduced
after Richard's change ?
perhaps came along with gcc 12 upgrade [1]

[1] https://lists.yoctoproject.org/g/meta-arm/message/3469



Ross


Khem Raj
 

On Fri, Jul 22, 2022 at 10:30 AM Ross Burton <Ross.Burton@...> wrote:

On 22 Jul 2022, at 15:28, Khem Raj via lists.openembedded.org <raj.khem=gmail.com@...> wrote:

On Fri, Jul 22, 2022 at 6:36 AM Bartosz Golaszewski <brgl@...> wrote:

On Thu, Jul 21, 2022 at 3:52 PM Khem Raj <raj.khem@...> wrote:

I don’t see config.log for Libstdc++ folder in there
Can you see why that’s missing ?
I was missing because I misunderstood you - you were probably asking
for the config.log *with* Jon's patch applied.

Here's the log: https://controlc.com/4544edd8
right, so I can see that its checking for fcnt function on system
where it should not, your toolchain
is using newlib and I am not sure what Jon's build is using for
zephyr, I guess it could be pure baremetal
if so, then perhaps we have a place to look into.

Jon, whats TCLIBC set to in zephyr's case.
Our CI has the following workaround for a problem that we’ve not managed to root-cause so far:

EXTRA_OECONF:append:pn-gcc-runtime = " ac_cv_func_fcntl=no ac_cv_func_getexecname=no”
ah, that speaks for the difference then. Is this workaround introduced
after Richard's change ?


Ross


Ross Burton
 

On 22 Jul 2022, at 15:28, Khem Raj via lists.openembedded.org <raj.khem=gmail.com@...> wrote:

On Fri, Jul 22, 2022 at 6:36 AM Bartosz Golaszewski <brgl@...> wrote:

On Thu, Jul 21, 2022 at 3:52 PM Khem Raj <raj.khem@...> wrote:

I don’t see config.log for Libstdc++ folder in there
Can you see why that’s missing ?
I was missing because I misunderstood you - you were probably asking
for the config.log *with* Jon's patch applied.

Here's the log: https://controlc.com/4544edd8
right, so I can see that its checking for fcnt function on system
where it should not, your toolchain
is using newlib and I am not sure what Jon's build is using for
zephyr, I guess it could be pure baremetal
if so, then perhaps we have a place to look into.

Jon, whats TCLIBC set to in zephyr's case.
Our CI has the following workaround for a problem that we’ve not managed to root-cause so far:

EXTRA_OECONF:append:pn-gcc-runtime = " ac_cv_func_fcntl=no ac_cv_func_getexecname=no”

Ross


Khem Raj
 

On Fri, Jul 22, 2022 at 6:36 AM Bartosz Golaszewski <brgl@...> wrote:

On Thu, Jul 21, 2022 at 3:52 PM Khem Raj <raj.khem@...> wrote:

I don’t see config.log for Libstdc++ folder in there
Can you see why that’s missing ?
I was missing because I misunderstood you - you were probably asking
for the config.log *with* Jon's patch applied.

Here's the log: https://controlc.com/4544edd8
right, so I can see that its checking for fcnt function on system
where it should not, your toolchain
is using newlib and I am not sure what Jon's build is using for
zephyr, I guess it could be pure baremetal
if so, then perhaps we have a place to look into.

Jon, whats TCLIBC set to in zephyr's case.


Bart


Bartosz Golaszewski
 

On Thu, Jul 21, 2022 at 3:52 PM Khem Raj <raj.khem@...> wrote:

I don’t see config.log for Libstdc++ folder in there
Can you see why that’s missing ?
I was missing because I misunderstood you - you were probably asking
for the config.log *with* Jon's patch applied.

Here's the log: https://controlc.com/4544edd8

Bart


Khem Raj
 

I don’t see config.log for Libstdc++ folder in there
Can you see why that’s missing ? 

On Thu, Jul 21, 2022 at 4:22 AM Bartosz Golaszewski <brgl@...> wrote:
On Wed, Jul 20, 2022 at 5:59 PM Khem Raj <raj.khem@...> wrote:
>
>
>
> On Wed, Jul 20, 2022 at 11:35 AM Bartosz Golaszewski <brgl@...> wrote:
>>
>> On Tue, Jul 19, 2022 at 4:58 PM Khem Raj <raj.khem@...> wrote:
>> >
>> > On Tue, Jul 19, 2022 at 10:48 AM Bartosz Golaszewski <brgl@...> wrote:
>> > >
>> > > On Tue, Jul 19, 2022 at 2:54 PM Khem Raj <raj.khem@...> wrote:
>> > > >
>> > > >
>> > > >
>> > > > On Tue, Jul 19, 2022 at 3:40 AM Bartosz Golaszewski <brgl@...> wrote:
>> > > >>
>> > > >> On Tue, Jul 19, 2022 at 12:10 AM Jon Mason <jdmason@...> wrote:
>> > > >> >
>> > > >> > On Mon, Jul 18, 2022 at 4:06 PM Khem Raj <raj.khem@...> wrote:
>> > > >> > >
>> > > >> > > Can you try something like this
>> > > >> > >
>> > > >> > > diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc
>> > > >> > > b/meta/recipes-devtools/gcc/gcc-runtime.inc
>> > > >> > > index 5d74e4494d..61d5bf6058 100644
>> > > >> > > --- a/meta/recipes-devtools/gcc/gcc-runtime.inc
>> > > >> > > +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
>> > > >> > > @@ -68,8 +68,7 @@ do_configure () {
>> > > >> > >     # libstdc++ isn't built yet so CXX would error not able to find it
>> > > >> > > which breaks stdc++'s configure
>> > > >> > >     # tests. Create a dummy empty lib for the purposes of configure.
>> > > >> > >     mkdir -p ${WORKDIR}/dummylib
>> > > >> > > -   touch ${WORKDIR}/dummylib/dummylib.c
>> > > >> > > -   ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o
>> > > >> > > ${WORKDIR}/dummylib/libstdc++.so
>> > > >> > > +   ${CC} -nostartfiles -shared -x c /dev/null -o
>> > > >> > > ${WORKDIR}/dummylib/libstdc++.so
>> > > >> > >     for d in libgcc ${RUNTIMETARGET}; do
>> > > >> > >         echo "Configuring $d"
>> > > >> > >         rm -rf ${B}/${TARGET_SYS}/$d/
>> > > >> > >
>> > > >> > >
>> > > >> > > and see if it helps ?
>> > > >> >
>> > > >> > That appears to work for the 2 zephyr machines in meta-arm
>> > > >> >
>> > > >>
>> > > >> This still fails for arduino nano 33 ble:
>> > > >>
>> > > >> | checking for dirent.h... no
>> > > >> | checking sys/statvfs.h usability... no
>> > > >> | checking sys/statvfs.h presence... no
>> > > >> | checking for sys/statvfs.h... no
>> > > >> | checking utime.h usability... yes
>> > > >> | checking utime.h presence... yes
>> > > >> | checking for utime.h... yes
>> > > >> | checking whether to build Filesystem TS support... no
>> > > >> | checking for struct dirent.d_type... no
>> > > >> | checking for realpath... no
>> > > >> | checking for utimensat... no
>> > > >> | checking for utime... no
>> > > >> | checking for lstat... no
>> > > >> | checking for struct stat.st_mtim.tv_nsec... yes
>> > > >> | checking for fchmod... yes
>> > > >> | checking for fchmodat... yes
>> > > >> | checking for sendfile that can copy files... no
>> > > >> | checking for link... yes
>> > > >> | checking for readlink... yes
>> > > >> | checking for symlink... yes
>> > > >> | checking for truncate... yes
>> > > >> | checking for fdopendir... no
>> > > >> | checking for dirfd... no
>> > > >> | checking for unlinkat... yes
>> > > >> | checking __sync extensions... yes
>> > > >> | checking link.h usability... no
>> > > >> | checking link.h presence... no
>> > > >> | checking for link.h... no
>> > > >> | checking for fcntl... configure: error: Link tests are not allowed
>> > > >> after GCC_NO_EXECUTABLES.
>> > > >
>> > > >
>> > > >
>> > > > Can you post config.log from this component
>> > > >
>> > >
>> > > Here you go: https://pastebin.com/6KMD9PhX
>> >
>> > this one has succeeded. I guess there are multiple config.log files in
>> > your build tree. Perhaps the one which shows exit 1 at the end is one
>> > I am interested in.
>> >
>> > >
>> > > Bart
>>
>> I don't see any config.h that would fail and I just ran a clean build.
>
>
> Not config.h but config.log
>

Sorry, the heatwave is getting to me.

Still with config.log:

When I run this from the gcc-runtime's workdir:

$ find | grep config.log$ | xargs tail -n1
==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/intl/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/arm-yocto-eabi/libgcc/config.log
<==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/libcody/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/fixincludes/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/lto-plugin/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/gcc/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/libbacktrace/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/libcpp/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/build-x86_64-linux/fixincludes/config.log
<==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/build-x86_64-linux/libcpp/config.log
<==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/build-x86_64-linux/libiberty/config.log
<==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/libcc1/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/c++tools/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/libdecnumber/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/libiberty/config.log <==
configure: exit 0

There's no log indicating a failure.

Bart


Bartosz Golaszewski
 

On Wed, Jul 20, 2022 at 5:59 PM Khem Raj <raj.khem@...> wrote:



On Wed, Jul 20, 2022 at 11:35 AM Bartosz Golaszewski <brgl@...> wrote:

On Tue, Jul 19, 2022 at 4:58 PM Khem Raj <raj.khem@...> wrote:

On Tue, Jul 19, 2022 at 10:48 AM Bartosz Golaszewski <brgl@...> wrote:

On Tue, Jul 19, 2022 at 2:54 PM Khem Raj <raj.khem@...> wrote:



On Tue, Jul 19, 2022 at 3:40 AM Bartosz Golaszewski <brgl@...> wrote:

On Tue, Jul 19, 2022 at 12:10 AM Jon Mason <jdmason@...> wrote:

On Mon, Jul 18, 2022 at 4:06 PM Khem Raj <raj.khem@...> wrote:

Can you try something like this

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 5d74e4494d..61d5bf6058 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -68,8 +68,7 @@ do_configure () {
# libstdc++ isn't built yet so CXX would error not able to find it
which breaks stdc++'s configure
# tests. Create a dummy empty lib for the purposes of configure.
mkdir -p ${WORKDIR}/dummylib
- touch ${WORKDIR}/dummylib/dummylib.c
- ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o
${WORKDIR}/dummylib/libstdc++.so
+ ${CC} -nostartfiles -shared -x c /dev/null -o
${WORKDIR}/dummylib/libstdc++.so
for d in libgcc ${RUNTIMETARGET}; do
echo "Configuring $d"
rm -rf ${B}/${TARGET_SYS}/$d/


and see if it helps ?
That appears to work for the 2 zephyr machines in meta-arm
This still fails for arduino nano 33 ble:

| checking for dirent.h... no
| checking sys/statvfs.h usability... no
| checking sys/statvfs.h presence... no
| checking for sys/statvfs.h... no
| checking utime.h usability... yes
| checking utime.h presence... yes
| checking for utime.h... yes
| checking whether to build Filesystem TS support... no
| checking for struct dirent.d_type... no
| checking for realpath... no
| checking for utimensat... no
| checking for utime... no
| checking for lstat... no
| checking for struct stat.st_mtim.tv_nsec... yes
| checking for fchmod... yes
| checking for fchmodat... yes
| checking for sendfile that can copy files... no
| checking for link... yes
| checking for readlink... yes
| checking for symlink... yes
| checking for truncate... yes
| checking for fdopendir... no
| checking for dirfd... no
| checking for unlinkat... yes
| checking __sync extensions... yes
| checking link.h usability... no
| checking link.h presence... no
| checking for link.h... no
| checking for fcntl... configure: error: Link tests are not allowed
after GCC_NO_EXECUTABLES.


Can you post config.log from this component
Here you go: https://pastebin.com/6KMD9PhX
this one has succeeded. I guess there are multiple config.log files in
your build tree. Perhaps the one which shows exit 1 at the end is one
I am interested in.


Bart
I don't see any config.h that would fail and I just ran a clean build.

Not config.h but config.log
Sorry, the heatwave is getting to me.

Still with config.log:

When I run this from the gcc-runtime's workdir:

$ find | grep config.log$ | xargs tail -n1
==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/intl/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/arm-yocto-eabi/libgcc/config.log
<==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/libcody/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/fixincludes/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/lto-plugin/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/gcc/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/libbacktrace/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/libcpp/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/build-x86_64-linux/fixincludes/config.log
<==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/build-x86_64-linux/libcpp/config.log
<==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/build-x86_64-linux/libiberty/config.log
<==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/libcc1/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/c++tools/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/libdecnumber/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/config.log <==
configure: exit 0

==> ./gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/libiberty/config.log <==
configure: exit 0

There's no log indicating a failure.

Bart


Khem Raj
 



On Wed, Jul 20, 2022 at 11:35 AM Bartosz Golaszewski <brgl@...> wrote:
On Tue, Jul 19, 2022 at 4:58 PM Khem Raj <raj.khem@...> wrote:
>
> On Tue, Jul 19, 2022 at 10:48 AM Bartosz Golaszewski <brgl@...> wrote:
> >
> > On Tue, Jul 19, 2022 at 2:54 PM Khem Raj <raj.khem@...> wrote:
> > >
> > >
> > >
> > > On Tue, Jul 19, 2022 at 3:40 AM Bartosz Golaszewski <brgl@...> wrote:
> > >>
> > >> On Tue, Jul 19, 2022 at 12:10 AM Jon Mason <jdmason@...> wrote:
> > >> >
> > >> > On Mon, Jul 18, 2022 at 4:06 PM Khem Raj <raj.khem@...> wrote:
> > >> > >
> > >> > > Can you try something like this
> > >> > >
> > >> > > diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc
> > >> > > b/meta/recipes-devtools/gcc/gcc-runtime.inc
> > >> > > index 5d74e4494d..61d5bf6058 100644
> > >> > > --- a/meta/recipes-devtools/gcc/gcc-runtime.inc
> > >> > > +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
> > >> > > @@ -68,8 +68,7 @@ do_configure () {
> > >> > >     # libstdc++ isn't built yet so CXX would error not able to find it
> > >> > > which breaks stdc++'s configure
> > >> > >     # tests. Create a dummy empty lib for the purposes of configure.
> > >> > >     mkdir -p ${WORKDIR}/dummylib
> > >> > > -   touch ${WORKDIR}/dummylib/dummylib.c
> > >> > > -   ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o
> > >> > > ${WORKDIR}/dummylib/libstdc++.so
> > >> > > +   ${CC} -nostartfiles -shared -x c /dev/null -o
> > >> > > ${WORKDIR}/dummylib/libstdc++.so
> > >> > >     for d in libgcc ${RUNTIMETARGET}; do
> > >> > >         echo "Configuring $d"
> > >> > >         rm -rf ${B}/${TARGET_SYS}/$d/
> > >> > >
> > >> > >
> > >> > > and see if it helps ?
> > >> >
> > >> > That appears to work for the 2 zephyr machines in meta-arm
> > >> >
> > >>
> > >> This still fails for arduino nano 33 ble:
> > >>
> > >> | checking for dirent.h... no
> > >> | checking sys/statvfs.h usability... no
> > >> | checking sys/statvfs.h presence... no
> > >> | checking for sys/statvfs.h... no
> > >> | checking utime.h usability... yes
> > >> | checking utime.h presence... yes
> > >> | checking for utime.h... yes
> > >> | checking whether to build Filesystem TS support... no
> > >> | checking for struct dirent.d_type... no
> > >> | checking for realpath... no
> > >> | checking for utimensat... no
> > >> | checking for utime... no
> > >> | checking for lstat... no
> > >> | checking for struct stat.st_mtim.tv_nsec... yes
> > >> | checking for fchmod... yes
> > >> | checking for fchmodat... yes
> > >> | checking for sendfile that can copy files... no
> > >> | checking for link... yes
> > >> | checking for readlink... yes
> > >> | checking for symlink... yes
> > >> | checking for truncate... yes
> > >> | checking for fdopendir... no
> > >> | checking for dirfd... no
> > >> | checking for unlinkat... yes
> > >> | checking __sync extensions... yes
> > >> | checking link.h usability... no
> > >> | checking link.h presence... no
> > >> | checking for link.h... no
> > >> | checking for fcntl... configure: error: Link tests are not allowed
> > >> after GCC_NO_EXECUTABLES.
> > >
> > >
> > >
> > > Can you post config.log from this component
> > >
> >
> > Here you go: https://pastebin.com/6KMD9PhX
>
> this one has succeeded. I guess there are multiple config.log files in
> your build tree. Perhaps the one which shows exit 1 at the end is one
> I am interested in.
>
> >
> > Bart

I don't see any config.h that would fail and I just ran a clean build.

Not config.h but config.log 



| DEBUG: Executing python function extract_stashed_builddir
| DEBUG: sed -e
's:^[^/]*/:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/:g'
/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/sysroots-components/x86_64/gcc-stashed-builddir-arm-yocto-eabi/fixmepath
| xargs sed -i -e
's:FIXMESTAGINGDIRTARGET:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot:g;
s:FIXMESTAGINGDIRHOST:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native:g'
-e 's:FIXME_PSEUDO_SYSROOT:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/sysroots-components/x86_64/pseudo-native:g'
-e 's:FIXME_HOSTTOOLS_DIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/hosttools:g'
-e 's:FIXME_PKGDATA_DIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/pkgdata/arduino-nano-33-ble:g'
-e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/pseudo/:g'
-e 's:FIXME_LOGFIFO:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/fifo.385595:g'

This makes me think that it fails after configure?

Bart


Bartosz Golaszewski
 

On Tue, Jul 19, 2022 at 4:58 PM Khem Raj <raj.khem@...> wrote:

On Tue, Jul 19, 2022 at 10:48 AM Bartosz Golaszewski <brgl@...> wrote:

On Tue, Jul 19, 2022 at 2:54 PM Khem Raj <raj.khem@...> wrote:



On Tue, Jul 19, 2022 at 3:40 AM Bartosz Golaszewski <brgl@...> wrote:

On Tue, Jul 19, 2022 at 12:10 AM Jon Mason <jdmason@...> wrote:

On Mon, Jul 18, 2022 at 4:06 PM Khem Raj <raj.khem@...> wrote:

Can you try something like this

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 5d74e4494d..61d5bf6058 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -68,8 +68,7 @@ do_configure () {
# libstdc++ isn't built yet so CXX would error not able to find it
which breaks stdc++'s configure
# tests. Create a dummy empty lib for the purposes of configure.
mkdir -p ${WORKDIR}/dummylib
- touch ${WORKDIR}/dummylib/dummylib.c
- ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o
${WORKDIR}/dummylib/libstdc++.so
+ ${CC} -nostartfiles -shared -x c /dev/null -o
${WORKDIR}/dummylib/libstdc++.so
for d in libgcc ${RUNTIMETARGET}; do
echo "Configuring $d"
rm -rf ${B}/${TARGET_SYS}/$d/


and see if it helps ?
That appears to work for the 2 zephyr machines in meta-arm
This still fails for arduino nano 33 ble:

| checking for dirent.h... no
| checking sys/statvfs.h usability... no
| checking sys/statvfs.h presence... no
| checking for sys/statvfs.h... no
| checking utime.h usability... yes
| checking utime.h presence... yes
| checking for utime.h... yes
| checking whether to build Filesystem TS support... no
| checking for struct dirent.d_type... no
| checking for realpath... no
| checking for utimensat... no
| checking for utime... no
| checking for lstat... no
| checking for struct stat.st_mtim.tv_nsec... yes
| checking for fchmod... yes
| checking for fchmodat... yes
| checking for sendfile that can copy files... no
| checking for link... yes
| checking for readlink... yes
| checking for symlink... yes
| checking for truncate... yes
| checking for fdopendir... no
| checking for dirfd... no
| checking for unlinkat... yes
| checking __sync extensions... yes
| checking link.h usability... no
| checking link.h presence... no
| checking for link.h... no
| checking for fcntl... configure: error: Link tests are not allowed
after GCC_NO_EXECUTABLES.


Can you post config.log from this component
Here you go: https://pastebin.com/6KMD9PhX
this one has succeeded. I guess there are multiple config.log files in
your build tree. Perhaps the one which shows exit 1 at the end is one
I am interested in.


Bart
I don't see any config.h that would fail and I just ran a clean build.

| DEBUG: Executing python function extract_stashed_builddir
| DEBUG: sed -e
's:^[^/]*/:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/:g'
/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/sysroots-components/x86_64/gcc-stashed-builddir-arm-yocto-eabi/fixmepath
| xargs sed -i -e
's:FIXMESTAGINGDIRTARGET:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot:g;
s:FIXMESTAGINGDIRHOST:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native:g'
-e 's:FIXME_PSEUDO_SYSROOT:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/sysroots-components/x86_64/pseudo-native:g'
-e 's:FIXME_HOSTTOOLS_DIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/hosttools:g'
-e 's:FIXME_PKGDATA_DIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/pkgdata/arduino-nano-33-ble:g'
-e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/pseudo/:g'
-e 's:FIXME_LOGFIFO:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/fifo.385595:g'

This makes me think that it fails after configure?

Bart


Khem Raj
 

On Tue, Jul 19, 2022 at 10:48 AM Bartosz Golaszewski <brgl@...> wrote:

On Tue, Jul 19, 2022 at 2:54 PM Khem Raj <raj.khem@...> wrote:



On Tue, Jul 19, 2022 at 3:40 AM Bartosz Golaszewski <brgl@...> wrote:

On Tue, Jul 19, 2022 at 12:10 AM Jon Mason <jdmason@...> wrote:

On Mon, Jul 18, 2022 at 4:06 PM Khem Raj <raj.khem@...> wrote:

Can you try something like this

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 5d74e4494d..61d5bf6058 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -68,8 +68,7 @@ do_configure () {
# libstdc++ isn't built yet so CXX would error not able to find it
which breaks stdc++'s configure
# tests. Create a dummy empty lib for the purposes of configure.
mkdir -p ${WORKDIR}/dummylib
- touch ${WORKDIR}/dummylib/dummylib.c
- ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o
${WORKDIR}/dummylib/libstdc++.so
+ ${CC} -nostartfiles -shared -x c /dev/null -o
${WORKDIR}/dummylib/libstdc++.so
for d in libgcc ${RUNTIMETARGET}; do
echo "Configuring $d"
rm -rf ${B}/${TARGET_SYS}/$d/


and see if it helps ?
That appears to work for the 2 zephyr machines in meta-arm
This still fails for arduino nano 33 ble:

| checking for dirent.h... no
| checking sys/statvfs.h usability... no
| checking sys/statvfs.h presence... no
| checking for sys/statvfs.h... no
| checking utime.h usability... yes
| checking utime.h presence... yes
| checking for utime.h... yes
| checking whether to build Filesystem TS support... no
| checking for struct dirent.d_type... no
| checking for realpath... no
| checking for utimensat... no
| checking for utime... no
| checking for lstat... no
| checking for struct stat.st_mtim.tv_nsec... yes
| checking for fchmod... yes
| checking for fchmodat... yes
| checking for sendfile that can copy files... no
| checking for link... yes
| checking for readlink... yes
| checking for symlink... yes
| checking for truncate... yes
| checking for fdopendir... no
| checking for dirfd... no
| checking for unlinkat... yes
| checking __sync extensions... yes
| checking link.h usability... no
| checking link.h presence... no
| checking for link.h... no
| checking for fcntl... configure: error: Link tests are not allowed
after GCC_NO_EXECUTABLES.


Can you post config.log from this component
Here you go: https://pastebin.com/6KMD9PhX
this one has succeeded. I guess there are multiple config.log files in
your build tree. Perhaps the one which shows exit 1 at the end is one
I am interested in.


Bart


Bartosz Golaszewski
 

On Tue, Jul 19, 2022 at 2:54 PM Khem Raj <raj.khem@...> wrote:



On Tue, Jul 19, 2022 at 3:40 AM Bartosz Golaszewski <brgl@...> wrote:

On Tue, Jul 19, 2022 at 12:10 AM Jon Mason <jdmason@...> wrote:

On Mon, Jul 18, 2022 at 4:06 PM Khem Raj <raj.khem@...> wrote:

Can you try something like this

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 5d74e4494d..61d5bf6058 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -68,8 +68,7 @@ do_configure () {
# libstdc++ isn't built yet so CXX would error not able to find it
which breaks stdc++'s configure
# tests. Create a dummy empty lib for the purposes of configure.
mkdir -p ${WORKDIR}/dummylib
- touch ${WORKDIR}/dummylib/dummylib.c
- ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o
${WORKDIR}/dummylib/libstdc++.so
+ ${CC} -nostartfiles -shared -x c /dev/null -o
${WORKDIR}/dummylib/libstdc++.so
for d in libgcc ${RUNTIMETARGET}; do
echo "Configuring $d"
rm -rf ${B}/${TARGET_SYS}/$d/


and see if it helps ?
That appears to work for the 2 zephyr machines in meta-arm
This still fails for arduino nano 33 ble:

| checking for dirent.h... no
| checking sys/statvfs.h usability... no
| checking sys/statvfs.h presence... no
| checking for sys/statvfs.h... no
| checking utime.h usability... yes
| checking utime.h presence... yes
| checking for utime.h... yes
| checking whether to build Filesystem TS support... no
| checking for struct dirent.d_type... no
| checking for realpath... no
| checking for utimensat... no
| checking for utime... no
| checking for lstat... no
| checking for struct stat.st_mtim.tv_nsec... yes
| checking for fchmod... yes
| checking for fchmodat... yes
| checking for sendfile that can copy files... no
| checking for link... yes
| checking for readlink... yes
| checking for symlink... yes
| checking for truncate... yes
| checking for fdopendir... no
| checking for dirfd... no
| checking for unlinkat... yes
| checking __sync extensions... yes
| checking link.h usability... no
| checking link.h presence... no
| checking for link.h... no
| checking for fcntl... configure: error: Link tests are not allowed
after GCC_NO_EXECUTABLES.


Can you post config.log from this component
Here you go: https://pastebin.com/6KMD9PhX

Bart


Khem Raj
 



On Tue, Jul 19, 2022 at 3:40 AM Bartosz Golaszewski <brgl@...> wrote:
On Tue, Jul 19, 2022 at 12:10 AM Jon Mason <jdmason@...> wrote:
>
> On Mon, Jul 18, 2022 at 4:06 PM Khem Raj <raj.khem@...> wrote:
> >
> > Can you try something like this
> >
> > diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc
> > b/meta/recipes-devtools/gcc/gcc-runtime.inc
> > index 5d74e4494d..61d5bf6058 100644
> > --- a/meta/recipes-devtools/gcc/gcc-runtime.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
> > @@ -68,8 +68,7 @@ do_configure () {
> >     # libstdc++ isn't built yet so CXX would error not able to find it
> > which breaks stdc++'s configure
> >     # tests. Create a dummy empty lib for the purposes of configure.
> >     mkdir -p ${WORKDIR}/dummylib
> > -   touch ${WORKDIR}/dummylib/dummylib.c
> > -   ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o
> > ${WORKDIR}/dummylib/libstdc++.so
> > +   ${CC} -nostartfiles -shared -x c /dev/null -o
> > ${WORKDIR}/dummylib/libstdc++.so
> >     for d in libgcc ${RUNTIMETARGET}; do
> >         echo "Configuring $d"
> >         rm -rf ${B}/${TARGET_SYS}/$d/
> >
> >
> > and see if it helps ?
>
> That appears to work for the 2 zephyr machines in meta-arm
>

This still fails for arduino nano 33 ble:

| checking for dirent.h... no
| checking sys/statvfs.h usability... no
| checking sys/statvfs.h presence... no
| checking for sys/statvfs.h... no
| checking utime.h usability... yes
| checking utime.h presence... yes
| checking for utime.h... yes
| checking whether to build Filesystem TS support... no
| checking for struct dirent.d_type... no
| checking for realpath... no
| checking for utimensat... no
| checking for utime... no
| checking for lstat... no
| checking for struct stat.st_mtim.tv_nsec... yes
| checking for fchmod... yes
| checking for fchmodat... yes
| checking for sendfile that can copy files... no
| checking for link... yes
| checking for readlink... yes
| checking for symlink... yes
| checking for truncate... yes
| checking for fdopendir... no
| checking for dirfd... no
| checking for unlinkat... yes
| checking __sync extensions... yes
| checking link.h usability... no
| checking link.h presence... no
| checking for link.h... no
| checking for fcntl... configure: error: Link tests are not allowed
after GCC_NO_EXECUTABLES.


Can you post config.log from this component 


| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_12.1.bb:do_configure)
failed with exit code '1'
NOTE: Tasks Summary: Attempted 795 tasks of which 774 didn't need to
be rerun and 1 failed.

Summary: 1 task failed:
  /home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_12.1.bb:do_configure
Summary: There was 1 ERROR message, returning a non-zero exit code.

Bart


Bartosz Golaszewski
 

On Tue, Jul 19, 2022 at 12:10 AM Jon Mason <jdmason@...> wrote:

On Mon, Jul 18, 2022 at 4:06 PM Khem Raj <raj.khem@...> wrote:

Can you try something like this

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 5d74e4494d..61d5bf6058 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -68,8 +68,7 @@ do_configure () {
# libstdc++ isn't built yet so CXX would error not able to find it
which breaks stdc++'s configure
# tests. Create a dummy empty lib for the purposes of configure.
mkdir -p ${WORKDIR}/dummylib
- touch ${WORKDIR}/dummylib/dummylib.c
- ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o
${WORKDIR}/dummylib/libstdc++.so
+ ${CC} -nostartfiles -shared -x c /dev/null -o
${WORKDIR}/dummylib/libstdc++.so
for d in libgcc ${RUNTIMETARGET}; do
echo "Configuring $d"
rm -rf ${B}/${TARGET_SYS}/$d/


and see if it helps ?
That appears to work for the 2 zephyr machines in meta-arm
This still fails for arduino nano 33 ble:

| checking for dirent.h... no
| checking sys/statvfs.h usability... no
| checking sys/statvfs.h presence... no
| checking for sys/statvfs.h... no
| checking utime.h usability... yes
| checking utime.h presence... yes
| checking for utime.h... yes
| checking whether to build Filesystem TS support... no
| checking for struct dirent.d_type... no
| checking for realpath... no
| checking for utimensat... no
| checking for utime... no
| checking for lstat... no
| checking for struct stat.st_mtim.tv_nsec... yes
| checking for fchmod... yes
| checking for fchmodat... yes
| checking for sendfile that can copy files... no
| checking for link... yes
| checking for readlink... yes
| checking for symlink... yes
| checking for truncate... yes
| checking for fdopendir... no
| checking for dirfd... no
| checking for unlinkat... yes
| checking __sync extensions... yes
| checking link.h usability... no
| checking link.h presence... no
| checking for link.h... no
| checking for fcntl... configure: error: Link tests are not allowed
after GCC_NO_EXECUTABLES.
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_12.1.bb:do_configure)
failed with exit code '1'
NOTE: Tasks Summary: Attempted 795 tasks of which 774 didn't need to
be rerun and 1 failed.

Summary: 1 task failed:
/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_12.1.bb:do_configure
Summary: There was 1 ERROR message, returning a non-zero exit code.

Bart


Jon Mason
 

On Mon, Jul 18, 2022 at 4:06 PM Khem Raj <raj.khem@...> wrote:

Can you try something like this

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 5d74e4494d..61d5bf6058 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -68,8 +68,7 @@ do_configure () {
# libstdc++ isn't built yet so CXX would error not able to find it
which breaks stdc++'s configure
# tests. Create a dummy empty lib for the purposes of configure.
mkdir -p ${WORKDIR}/dummylib
- touch ${WORKDIR}/dummylib/dummylib.c
- ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o
${WORKDIR}/dummylib/libstdc++.so
+ ${CC} -nostartfiles -shared -x c /dev/null -o
${WORKDIR}/dummylib/libstdc++.so
for d in libgcc ${RUNTIMETARGET}; do
echo "Configuring $d"
rm -rf ${B}/${TARGET_SYS}/$d/


and see if it helps ?
That appears to work for the 2 zephyr machines in meta-arm


On Mon, Jul 18, 2022 at 2:49 PM Jon Mason <jdmason@...> wrote:

On Mon, Jul 18, 2022 at 08:31:39PM +0200, Bartosz Golaszewski wrote:
Hi!

It seems that the zephyr build is currently broken with master (and
master-next) for meta-zephyr samples:

Build Configuration:
BB_VERSION = "2.0.1"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-yocto-eabi"
MACHINE = "arduino-nano-33-ble"
DISTRO = "zephyr"
DISTRO_VERSION = "1.0"
TUNE_FEATURES = "armv7m cortexm4"
TARGET_FPU = "soft"
meta
meta-poky = "HEAD:67b9303d72c14d2aedb3f0313cb7b27dfb1499d3"
meta-zephyr-core
meta-zephyr-bsp = "master:6d184ce6b66349a87dc114c7ab59d0dd3bf92785"
meta-oe
meta-python = "master:cb7d3afba838f159a5df4ef5091dba8e770159a8"

Initialising tasks: 100%
|#########################################################################################################|
Time: 0:00:01
Sstate summary: Wanted 101 Local 66 Mirrors 0 Missed 35 Current 98
(65% match, 82% complete)
NOTE: Executing Tasks
ERROR: gcc-runtime-12.1.0-r0 do_configure:
ExecutionError('/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/run.do_configure.2702410',
1, None, None)
ERROR: Logfile of failure stored in:
/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/log.do_configure.2702410
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are
['/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-core/newlib/newlib_4.2.0.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/binutils/binutils-cross_2.38.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-cross_12.1.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/libgcc_12.1.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/libtool/libtool-native_2.4.7.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-core/zlib/zlib_1.2.12.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/autoconf/autoconf_2.71.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/automake/automake_1.16.5.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/flex/flex_2.6.4.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-extended/xz/xz_5.2.5.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-extended/zstd/zstd_1.5.2.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-support/gmp/gmp_6.2.1.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-support/libmpc/libmpc_1.2.1.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-support/mpfr/mpfr_4.1.0.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['newlib',
'binutils-cross-arm', 'gcc-cross-arm', 'libgcc', 'libtool-native',
'quilt-native', 'texinfo-dummy-native', 'zlib-native',
'autoconf-native', 'automake-native', 'flex-native',
'gnu-config-native', 'patch-native', 'pseudo-native', 'xz-native',
'zstd-native', 'gmp-native', 'libmpc-native', 'mpfr-native',
'attr-native', 'gettext-minimal-native', 'm4-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing python function autotools_aclocals
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
'arm-32', 'arm-eabi', 'common']
| DEBUG: Python function autotools_aclocals finished
| DEBUG: Executing python function gcc_multilib_setup
| DEBUG: Python function gcc_multilib_setup finished
| DEBUG: Executing python function extract_stashed_builddir
| DEBUG: sed -e
's:^[^/]*/:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/:g'
/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/sysroots-components/x86_64/gcc-stashed-builddir-arm-yocto-eabi/fixmepath
| xargs sed -i -e
's:FIXMESTAGINGDIRTARGET:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot:g;
s:FIXMESTAGINGDIRHOST:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native:g'
-e 's:FIXME_PSEUDO_SYSROOT:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/sysroots-components/x86_64/pseudo-native:g'
-e 's:FIXME_HOSTTOOLS_DIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/hosttools:g'
-e 's:FIXME_PKGDATA_DIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/pkgdata/arduino-nano-33-ble:g'
-e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/pseudo/:g'
-e 's:FIXME_LOGFIFO:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/fifo.2702410:g'
| DEBUG: Python function extract_stashed_builddir finished
| DEBUG: Executing shell function do_configure
| /home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native/usr/bin/arm-yocto-eabi/../../libexec/arm-yocto-eabi/gcc/arm-yocto-eabi/12.1.0/ld:
cannot find crt0.o: No such file or directory
| collect2: error: ld returned 1 exit status
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_12.1.bb:do_configure)
failed with exit code '1'
NOTE: Tasks Summary: Attempted 765 tasks of which 746 didn't need to
be rerun and 1 failed.

Summary: 1 task failed:
/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_12.1.bb:do_configure
Summary: There was 1 ERROR message, returning a non-zero exit code.

I don't have any ideas but it looks like something related to the machine tune?
I haven't had time to bottom out on the issue, but I was able to
confirm that the patch in OE core that breaks meta-zephyr is

commit 028ecb0c265fa495071cbcca10587c0ba60cf538
Author: Richard Purdie <richard.purdie@...>
Date: Wed Jul 13 23:12:06 2022 +0100

gcc-runtime: Fix build when using gold

If gold is enabled as the default linker, it errors trying to link
to our dummy library empty file and this turns off things which should
be present in libstdc++.

For example, _GLIBCXX_HAVE_S_ISREG isn't defined and HAVE_S_ISREG in
libstdc++-v3/config.h isn't set properly.

Instead of just creating an empty file, create an empty elf binary
instead which addresses the issue.

(From OE-Core rev: 2070bcd10aa3a05c96c8501c6a8c1e129fb1d440)

Signed-off-by: Richard Purdie <richard.purdie@...>

If you revert that, everything is happy.

Thanks,
Jon



Bart


Khem Raj
 

Can you try something like this

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 5d74e4494d..61d5bf6058 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -68,8 +68,7 @@ do_configure () {
# libstdc++ isn't built yet so CXX would error not able to find it
which breaks stdc++'s configure
# tests. Create a dummy empty lib for the purposes of configure.
mkdir -p ${WORKDIR}/dummylib
- touch ${WORKDIR}/dummylib/dummylib.c
- ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o
${WORKDIR}/dummylib/libstdc++.so
+ ${CC} -nostartfiles -shared -x c /dev/null -o
${WORKDIR}/dummylib/libstdc++.so
for d in libgcc ${RUNTIMETARGET}; do
echo "Configuring $d"
rm -rf ${B}/${TARGET_SYS}/$d/


and see if it helps ?

On Mon, Jul 18, 2022 at 2:49 PM Jon Mason <jdmason@...> wrote:

On Mon, Jul 18, 2022 at 08:31:39PM +0200, Bartosz Golaszewski wrote:
Hi!

It seems that the zephyr build is currently broken with master (and
master-next) for meta-zephyr samples:

Build Configuration:
BB_VERSION = "2.0.1"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-yocto-eabi"
MACHINE = "arduino-nano-33-ble"
DISTRO = "zephyr"
DISTRO_VERSION = "1.0"
TUNE_FEATURES = "armv7m cortexm4"
TARGET_FPU = "soft"
meta
meta-poky = "HEAD:67b9303d72c14d2aedb3f0313cb7b27dfb1499d3"
meta-zephyr-core
meta-zephyr-bsp = "master:6d184ce6b66349a87dc114c7ab59d0dd3bf92785"
meta-oe
meta-python = "master:cb7d3afba838f159a5df4ef5091dba8e770159a8"

Initialising tasks: 100%
|#########################################################################################################|
Time: 0:00:01
Sstate summary: Wanted 101 Local 66 Mirrors 0 Missed 35 Current 98
(65% match, 82% complete)
NOTE: Executing Tasks
ERROR: gcc-runtime-12.1.0-r0 do_configure:
ExecutionError('/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/run.do_configure.2702410',
1, None, None)
ERROR: Logfile of failure stored in:
/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/log.do_configure.2702410
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are
['/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-core/newlib/newlib_4.2.0.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/binutils/binutils-cross_2.38.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-cross_12.1.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/libgcc_12.1.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/libtool/libtool-native_2.4.7.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-core/zlib/zlib_1.2.12.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/autoconf/autoconf_2.71.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/automake/automake_1.16.5.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/flex/flex_2.6.4.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-extended/xz/xz_5.2.5.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-extended/zstd/zstd_1.5.2.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-support/gmp/gmp_6.2.1.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-support/libmpc/libmpc_1.2.1.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-support/mpfr/mpfr_4.1.0.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['newlib',
'binutils-cross-arm', 'gcc-cross-arm', 'libgcc', 'libtool-native',
'quilt-native', 'texinfo-dummy-native', 'zlib-native',
'autoconf-native', 'automake-native', 'flex-native',
'gnu-config-native', 'patch-native', 'pseudo-native', 'xz-native',
'zstd-native', 'gmp-native', 'libmpc-native', 'mpfr-native',
'attr-native', 'gettext-minimal-native', 'm4-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing python function autotools_aclocals
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
'arm-32', 'arm-eabi', 'common']
| DEBUG: Python function autotools_aclocals finished
| DEBUG: Executing python function gcc_multilib_setup
| DEBUG: Python function gcc_multilib_setup finished
| DEBUG: Executing python function extract_stashed_builddir
| DEBUG: sed -e
's:^[^/]*/:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/:g'
/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/sysroots-components/x86_64/gcc-stashed-builddir-arm-yocto-eabi/fixmepath
| xargs sed -i -e
's:FIXMESTAGINGDIRTARGET:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot:g;
s:FIXMESTAGINGDIRHOST:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native:g'
-e 's:FIXME_PSEUDO_SYSROOT:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/sysroots-components/x86_64/pseudo-native:g'
-e 's:FIXME_HOSTTOOLS_DIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/hosttools:g'
-e 's:FIXME_PKGDATA_DIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/pkgdata/arduino-nano-33-ble:g'
-e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/pseudo/:g'
-e 's:FIXME_LOGFIFO:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/fifo.2702410:g'
| DEBUG: Python function extract_stashed_builddir finished
| DEBUG: Executing shell function do_configure
| /home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native/usr/bin/arm-yocto-eabi/../../libexec/arm-yocto-eabi/gcc/arm-yocto-eabi/12.1.0/ld:
cannot find crt0.o: No such file or directory
| collect2: error: ld returned 1 exit status
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_12.1.bb:do_configure)
failed with exit code '1'
NOTE: Tasks Summary: Attempted 765 tasks of which 746 didn't need to
be rerun and 1 failed.

Summary: 1 task failed:
/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_12.1.bb:do_configure
Summary: There was 1 ERROR message, returning a non-zero exit code.

I don't have any ideas but it looks like something related to the machine tune?
I haven't had time to bottom out on the issue, but I was able to
confirm that the patch in OE core that breaks meta-zephyr is

commit 028ecb0c265fa495071cbcca10587c0ba60cf538
Author: Richard Purdie <richard.purdie@...>
Date: Wed Jul 13 23:12:06 2022 +0100

gcc-runtime: Fix build when using gold

If gold is enabled as the default linker, it errors trying to link
to our dummy library empty file and this turns off things which should
be present in libstdc++.

For example, _GLIBCXX_HAVE_S_ISREG isn't defined and HAVE_S_ISREG in
libstdc++-v3/config.h isn't set properly.

Instead of just creating an empty file, create an empty elf binary
instead which addresses the issue.

(From OE-Core rev: 2070bcd10aa3a05c96c8501c6a8c1e129fb1d440)

Signed-off-by: Richard Purdie <richard.purdie@...>

If you revert that, everything is happy.

Thanks,
Jon



Bart


Jon Mason
 

On Mon, Jul 18, 2022 at 08:31:39PM +0200, Bartosz Golaszewski wrote:
Hi!

It seems that the zephyr build is currently broken with master (and
master-next) for meta-zephyr samples:

Build Configuration:
BB_VERSION = "2.0.1"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-yocto-eabi"
MACHINE = "arduino-nano-33-ble"
DISTRO = "zephyr"
DISTRO_VERSION = "1.0"
TUNE_FEATURES = "armv7m cortexm4"
TARGET_FPU = "soft"
meta
meta-poky = "HEAD:67b9303d72c14d2aedb3f0313cb7b27dfb1499d3"
meta-zephyr-core
meta-zephyr-bsp = "master:6d184ce6b66349a87dc114c7ab59d0dd3bf92785"
meta-oe
meta-python = "master:cb7d3afba838f159a5df4ef5091dba8e770159a8"

Initialising tasks: 100%
|#########################################################################################################|
Time: 0:00:01
Sstate summary: Wanted 101 Local 66 Mirrors 0 Missed 35 Current 98
(65% match, 82% complete)
NOTE: Executing Tasks
ERROR: gcc-runtime-12.1.0-r0 do_configure:
ExecutionError('/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/run.do_configure.2702410',
1, None, None)
ERROR: Logfile of failure stored in:
/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/log.do_configure.2702410
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are
['/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-core/newlib/newlib_4.2.0.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/binutils/binutils-cross_2.38.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-cross_12.1.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/libgcc_12.1.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/libtool/libtool-native_2.4.7.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-core/zlib/zlib_1.2.12.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/autoconf/autoconf_2.71.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/automake/automake_1.16.5.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/flex/flex_2.6.4.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-extended/xz/xz_5.2.5.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-extended/zstd/zstd_1.5.2.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-support/gmp/gmp_6.2.1.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-support/libmpc/libmpc_1.2.1.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-support/mpfr/mpfr_4.1.0.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['newlib',
'binutils-cross-arm', 'gcc-cross-arm', 'libgcc', 'libtool-native',
'quilt-native', 'texinfo-dummy-native', 'zlib-native',
'autoconf-native', 'automake-native', 'flex-native',
'gnu-config-native', 'patch-native', 'pseudo-native', 'xz-native',
'zstd-native', 'gmp-native', 'libmpc-native', 'mpfr-native',
'attr-native', 'gettext-minimal-native', 'm4-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing python function autotools_aclocals
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
'arm-32', 'arm-eabi', 'common']
| DEBUG: Python function autotools_aclocals finished
| DEBUG: Executing python function gcc_multilib_setup
| DEBUG: Python function gcc_multilib_setup finished
| DEBUG: Executing python function extract_stashed_builddir
| DEBUG: sed -e
's:^[^/]*/:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/:g'
/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/sysroots-components/x86_64/gcc-stashed-builddir-arm-yocto-eabi/fixmepath
| xargs sed -i -e
's:FIXMESTAGINGDIRTARGET:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot:g;
s:FIXMESTAGINGDIRHOST:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native:g'
-e 's:FIXME_PSEUDO_SYSROOT:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/sysroots-components/x86_64/pseudo-native:g'
-e 's:FIXME_HOSTTOOLS_DIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/hosttools:g'
-e 's:FIXME_PKGDATA_DIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/pkgdata/arduino-nano-33-ble:g'
-e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/pseudo/:g'
-e 's:FIXME_LOGFIFO:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/fifo.2702410:g'
| DEBUG: Python function extract_stashed_builddir finished
| DEBUG: Executing shell function do_configure
| /home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native/usr/bin/arm-yocto-eabi/../../libexec/arm-yocto-eabi/gcc/arm-yocto-eabi/12.1.0/ld:
cannot find crt0.o: No such file or directory
| collect2: error: ld returned 1 exit status
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_12.1.bb:do_configure)
failed with exit code '1'
NOTE: Tasks Summary: Attempted 765 tasks of which 746 didn't need to
be rerun and 1 failed.

Summary: 1 task failed:
/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_12.1.bb:do_configure
Summary: There was 1 ERROR message, returning a non-zero exit code.

I don't have any ideas but it looks like something related to the machine tune?
I haven't had time to bottom out on the issue, but I was able to
confirm that the patch in OE core that breaks meta-zephyr is

commit 028ecb0c265fa495071cbcca10587c0ba60cf538
Author: Richard Purdie <richard.purdie@...>
Date: Wed Jul 13 23:12:06 2022 +0100

gcc-runtime: Fix build when using gold

If gold is enabled as the default linker, it errors trying to link
to our dummy library empty file and this turns off things which should
be present in libstdc++.

For example, _GLIBCXX_HAVE_S_ISREG isn't defined and HAVE_S_ISREG in
libstdc++-v3/config.h isn't set properly.

Instead of just creating an empty file, create an empty elf binary
instead which addresses the issue.

(From OE-Core rev: 2070bcd10aa3a05c96c8501c6a8c1e129fb1d440)

Signed-off-by: Richard Purdie <richard.purdie@...>

If you revert that, everything is happy.

Thanks,
Jon



Bart


Bartosz Golaszewski
 

Hi!

It seems that the zephyr build is currently broken with master (and
master-next) for meta-zephyr samples:

Build Configuration:
BB_VERSION = "2.0.1"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-yocto-eabi"
MACHINE = "arduino-nano-33-ble"
DISTRO = "zephyr"
DISTRO_VERSION = "1.0"
TUNE_FEATURES = "armv7m cortexm4"
TARGET_FPU = "soft"
meta
meta-poky = "HEAD:67b9303d72c14d2aedb3f0313cb7b27dfb1499d3"
meta-zephyr-core
meta-zephyr-bsp = "master:6d184ce6b66349a87dc114c7ab59d0dd3bf92785"
meta-oe
meta-python = "master:cb7d3afba838f159a5df4ef5091dba8e770159a8"

Initialising tasks: 100%
|#########################################################################################################|
Time: 0:00:01
Sstate summary: Wanted 101 Local 66 Mirrors 0 Missed 35 Current 98
(65% match, 82% complete)
NOTE: Executing Tasks
ERROR: gcc-runtime-12.1.0-r0 do_configure:
ExecutionError('/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/run.do_configure.2702410',
1, None, None)
ERROR: Logfile of failure stored in:
/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/log.do_configure.2702410
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are
['/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-core/newlib/newlib_4.2.0.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/binutils/binutils-cross_2.38.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-cross_12.1.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/libgcc_12.1.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/libtool/libtool-native_2.4.7.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot',
'/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-core/zlib/zlib_1.2.12.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/autoconf/autoconf_2.71.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/automake/automake_1.16.5.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/flex/flex_2.6.4.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-extended/xz/xz_5.2.5.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-extended/zstd/zstd_1.5.2.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-support/gmp/gmp_6.2.1.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-support/libmpc/libmpc_1.2.1.bb:do_populate_sysroot',
'virtual:native:/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-support/mpfr/mpfr_4.1.0.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['newlib',
'binutils-cross-arm', 'gcc-cross-arm', 'libgcc', 'libtool-native',
'quilt-native', 'texinfo-dummy-native', 'zlib-native',
'autoconf-native', 'automake-native', 'flex-native',
'gnu-config-native', 'patch-native', 'pseudo-native', 'xz-native',
'zstd-native', 'gmp-native', 'libmpc-native', 'mpfr-native',
'attr-native', 'gettext-minimal-native', 'm4-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing python function autotools_aclocals
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
'arm-32', 'arm-eabi', 'common']
| DEBUG: Python function autotools_aclocals finished
| DEBUG: Executing python function gcc_multilib_setup
| DEBUG: Python function gcc_multilib_setup finished
| DEBUG: Executing python function extract_stashed_builddir
| DEBUG: sed -e
's:^[^/]*/:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-yocto-eabi.arm-yocto-eabi/:g'
/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/sysroots-components/x86_64/gcc-stashed-builddir-arm-yocto-eabi/fixmepath
| xargs sed -i -e
's:FIXMESTAGINGDIRTARGET:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot:g;
s:FIXMESTAGINGDIRHOST:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native:g'
-e 's:FIXME_PSEUDO_SYSROOT:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/sysroots-components/x86_64/pseudo-native:g'
-e 's:FIXME_HOSTTOOLS_DIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/hosttools:g'
-e 's:FIXME_PKGDATA_DIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/pkgdata/arduino-nano-33-ble:g'
-e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/pseudo/:g'
-e 's:FIXME_LOGFIFO:/home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/temp/fifo.2702410:g'
| DEBUG: Python function extract_stashed_builddir finished
| DEBUG: Executing shell function do_configure
| /home/brgl/workspace/zephyr-yocto/build/tmp-newlib/work/armv7m-yocto-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native/usr/bin/arm-yocto-eabi/../../libexec/arm-yocto-eabi/gcc/arm-yocto-eabi/12.1.0/ld:
cannot find crt0.o: No such file or directory
| collect2: error: ld returned 1 exit status
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_12.1.bb:do_configure)
failed with exit code '1'
NOTE: Tasks Summary: Attempted 765 tasks of which 746 didn't need to
be rerun and 1 failed.

Summary: 1 task failed:
/home/brgl/workspace/zephyr-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_12.1.bb:do_configure
Summary: There was 1 ERROR message, returning a non-zero exit code.

I don't have any ideas but it looks like something related to the machine tune?

Bart