On Tue, 2022-07-12 at 13:23 +0800, Phil Reid wrote: > On 8/07/2022 9:05 pm, Richard Purdie wrote: > > On Tue, 2022-07-05 at 21:01 -0700, mfum...@electromag.com.au wrote: > > > Hello there, > > > > > > It isn't due to EOVERFLOW but make_file_type function in libstdc++- > > > v3\src\filesystem\ops-common.h always returns file_type::unknown. > > > It's because _GLIBCXX_HAVE_S_ISREG isn't defined. > > > I found HAVE_S_ISREG at libstdc++-v3/config.h isn't set properly. > > > > > > It's caused by a configure failure below to tell if S_ISREG exists on > > > the target. > > > gcc/arm-emit-linux-gnueabi/11.3.0/ld: error: tmp- > > > glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/11.3.0- > > > r0/dummylib/libstdc++.so: file is empty > > > collect2: error: ld returned 1 exit status > > > configure:15686: $? = 1 > > > > > > It complains dummylib/libstdc++.so is empty, configure failed then > > > wrongly considered S_ISREG doesn't exist. > > > This seems related to the following commit. > > > https://github.com/openembedded/openembedded-core/commit/34b0edb0d3120c32063ff7e3dd52be20d60401d5 > > > > > > Reverting this commit rectifies this issue but not sure what's the > > > proper fix? > > > Any help appreciated. > > > > There is some piece we're still not understanding. I had a look at my > > local build (master so gcc 12.1) and I see HAVE_S_ISREG is set > > correctly, I don't see any "file is empty" message. > > > > Are you able to reproduce this on master? Which linker are you using? > > > > G'day Richard, > > I've update to master and tried this. Still get a "file is empty" error > during configure. See log snippet below. > > > Tried to capture the ld version here: > > wait4(23043, > /home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native/usr/bin/arm-emit-linux-gnueabi/../../libexec/arm-emit-linux-gnueabi/gcc/arm-emit-linux-gnueabi/12.1.0/ld: > error: > /home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/dummylib/libstdc++.so: > file is empty > collect2: error: ld returned 1 exit status > > > /home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native/usr/bin/arm-emit-linux-gnueabi/../../libexec/arm-emit-linux-gnueabi/gcc/arm-emit-linux-gnueabi/12.1.0/ld > --version > GNU gold (GNU Binutils 2.38.20220516) 1.16 > Copyright (C) 2022 Free Software Foundation, Inc. > This program is free software; you may redistribute it under the terms of > the GNU General Public License version 3 or (at your option) a later version. > This program has absolutely no warranty. > > > Hope that helps.
It does thanks. It confirms you're using the gold linker which allowed me to reproduce (I was trying with the default bfd). I think this small change will fix it: diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc index c39a0caf8a7..7e920df2d34 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc @@ -68,7 +68,8 @@ 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/libstdc++.so + touch ${WORKDIR}/dummylib/dummylib.c + ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o ${WORKDIR}/dummylib/libstdc++.so for d in libgcc ${RUNTIMETARGET}; do echo "Configuring $d" rm -rf ${B}/${TARGET_SYS}/$d/ Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#167994): https://lists.openembedded.org/g/openembedded-core/message/167994 Mute This Topic: https://lists.openembedded.org/mt/92099905/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-