All of lore.kernel.org
 help / color / mirror / Atom feed
* libstdc++ honister -> kirkstone
@ 2022-07-01  1:14 Phil Reid
  2022-07-06  4:01 ` mfumita
  0 siblings, 1 reply; 6+ messages in thread
From: Phil Reid @ 2022-07-01  1:14 UTC (permalink / raw)
  To: openembedded-core

G'day All,

We're just updating from honister to kirkstone branch and run into
an issue with libstdc++. We're targeting a 32 bit arm device.

is_empty throws with "filesystem error: cannot check if file is empty: Operation not supported"
when called on an empty directory.

tracing this status is returning fs::file_type::unknown which looks to result from stat returnung EOVERFLOW.
Which appears to be related to 64 / 32 bit file size limits.

We are compiling our code with: -D_FILE_OFFSET_BITS=64


It does look like the builds are linking things slightly differently.

preid:~/dev/kirkstone/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/11.3.0-r0/package/usr/lib$ arm-emit-linux-gnueabi-readelf -r libstdc++.so | grep seek
0015433c  00007916 R_ARM_JUMP_SLOT   00000000   lseek@GLIBC_2.4
00154d70  0000aa16 R_ARM_JUMP_SLOT   00000000   fseek@GLIBC_2.4

preid:~/dev/kirkstone/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/11.3.0-r0/package/usr/lib$ arm-emit-linux-gnueabi-readelf -r libstdc++.so | grep stat
0015561c  0000c016 R_ARM_JUMP_SLOT   00000000   stat64@GLIBC_2.33
00155620  00003016 R_ARM_JUMP_SLOT   00000000   statvfs64@GLIBC_2.4



preid:~/dev/honister/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/11.2.0-r0/package/usr/lib$ arm-emit-linux-gnueabi-readelf -r libstdc++.so.6 | grep seek
00159328  00008a16 R_ARM_JUMP_SLOT   00000000   lseek64@GLIBC_2.4
00159d68  0000c616 R_ARM_JUMP_SLOT   00000000   fseeko64@GLIBC_2.4

preid:~/dev/honister/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/11.2.0-r0/package/usr/lib$ arm-emit-linux-gnueabi-readelf -r libstdc++.so.6 | grep stat
00159334  00009f16 R_ARM_JUMP_SLOT   00000000   fstat64@GLIBC_2.33
0015a618  00006d16 R_ARM_JUMP_SLOT   00000000   statvfs64@GLIBC_2.4
0015a63c  00008816 R_ARM_JUMP_SLOT   00000000   stat64@GLIBC_2.33
0015a68c  00008016 R_ARM_JUMP_SLOT   00000000   lstat64@GLIBC_2.33


Not sure where to look to fix this...

Any help appreciated.


Regards
Phil



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: libstdc++ honister -> kirkstone
  2022-07-01  1:14 libstdc++ honister -> kirkstone Phil Reid
@ 2022-07-06  4:01 ` mfumita
  2022-07-08 13:05   ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: mfumita @ 2022-07-06  4:01 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]

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.

Thanks,
Mori

[-- Attachment #2: Type: text/html, Size: 1198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] libstdc++ honister -> kirkstone
  2022-07-06  4:01 ` mfumita
@ 2022-07-08 13:05   ` Richard Purdie
  2022-07-12  5:23     ` Phil Reid
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2022-07-08 13:05 UTC (permalink / raw)
  To: mfumita, openembedded-core

On Tue, 2022-07-05 at 21:01 -0700, mfumita@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?

Cheers,

Richard




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] libstdc++ honister -> kirkstone
  2022-07-08 13:05   ` [OE-core] " Richard Purdie
@ 2022-07-12  5:23     ` Phil Reid
  2022-07-13 22:13       ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Phil Reid @ 2022-07-12  5:23 UTC (permalink / raw)
  To: Richard Purdie, mfumita, openembedded-core

On 8/07/2022 9:05 pm, Richard Purdie wrote:
> On Tue, 2022-07-05 at 21:01 -0700, mfumita@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.




configure:15660: arm-emit-linux-gnueabi-g++  -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot -nostdinc++ -L/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/dummylib -o conftest  -O2 -pipe -g -feliminate-unused-debug-types     -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot=    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native=    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0=/usr/src/debug/gcc-runtime/12.1.0-r0    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/include=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../include    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/libiberty=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../libiberty    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/libgcc=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../libgcc    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-emit-linux-gnueabi.arm-emit-linux-gnueabi=/usr/src/debug/gcc-runtime/12.1.0-r0    -ffile-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-emit-linux-gnueabi.arm-emit-linux-gnueabi/arm-emit-linux-gnueabi/libstdc++-v3/include=/usr/include/c++/12.1.0      -fno-exceptions  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed     -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot=    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native=    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0=/usr/src/debug/gcc-runtime/12.1.0-r0    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/include=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../include    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/libiberty=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../libiberty    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/libgcc=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../libgcc    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-emit-linux-gnueabi.arm-emit-linux-gnueabi=/usr/src/debug/gcc-runtime/12.1.0-r0    -ffile-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-emit-linux-gnueabi.arm-emit-linux-gnueabi/arm-emit-linux-gnueabi/libstdc++-v3/include=/usr/include/c++/12.1.0     conftest.cpp  >&5
/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
configure:15660: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "package-unused"
| #define PACKAGE_TARNAME "libstdc++"
| #define PACKAGE_VERSION "version-unused"
| #define PACKAGE_STRING "package-unused version-unused"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define _FILE_OFFSET_BITS 64
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define _GLIBCXX_HOSTED 1
| #define _GLIBCXX_VERBOSE 1
| #define HAVE_ATOMIC_LOCK_POLICY 1
| #define HAVE_STRXFRM_L 1
| #define HAVE_STRERROR_L 1
| #define HAVE_STRERROR_R 1
| #define _GLIBCXX_USE_LONG_LONG 1
| #define HAVE_WCHAR_H 1
| #define HAVE_MBSTATE_T 1
| #define HAVE_WCTYPE_H 1
| #define _GLIBCXX_USE_WCHAR_T 1
| #define _GLIBCXX98_USE_C99_MATH 1
| #define HAVE_TGMATH_H 1
| #define HAVE_COMPLEX_H 1
| #define _GLIBCXX98_USE_C99_COMPLEX 1
| #define _GLIBCXX98_USE_C99_STDIO 1
| #define _GLIBCXX98_USE_C99_STDLIB 1
| #define HAVE_VFWSCANF 1
| #define HAVE_VSWSCANF 1
| #define HAVE_VWSCANF 1
| #define HAVE_WCSTOF 1
| #define HAVE_ISWBLANK 1
| #define _GLIBCXX98_USE_C99_WCHAR 1
| #define _GLIBCXX_USE_C99 1
| #define _GLIBCXX11_USE_C99_MATH 1
| #define HAVE_TGMATH_H 1
| #define HAVE_COMPLEX_H 1
| #define _GLIBCXX11_USE_C99_COMPLEX 1
| #define _GLIBCXX11_USE_C99_STDIO 1
| #define _GLIBCXX11_USE_C99_STDLIB 1
| #define HAVE_VFWSCANF 1
| #define HAVE_VSWSCANF 1
| #define HAVE_VWSCANF 1
| #define HAVE_WCSTOF 1
| #define HAVE_ISWBLANK 1
| #define _GLIBCXX11_USE_C99_WCHAR 1
| #define _GLIBCXX_FULLY_DYNAMIC_STRING 0
| #define HAVE_GETS 1
| #define HAVE_UCHAR_H 1
| #define _GLIBCXX_USE_C11_UCHAR_CXX11 1
| #define HAVE_SYS_IOCTL_H 1
| /* end confdefs.h.  */
| #include <sys/stat.h>
| int
| main ()
| {
| struct stat buffer;
|        fstat(0, &buffer);
|        S_IFREG & buffer.st_mode;
|   ;
|   return 0;
| }
configure:15683: result: no
configure:15698: checking sys/uio.h usability
configure:15698: arm-emit-linux-gnueabi-gcc  -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot -c  -O2 -pipe -g -feliminate-unused-debug-types     -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot=    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native=    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0=/usr/src/debug/gcc-runtime/12.1.0-r0    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/include=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../include    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/libiberty=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../libiberty    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/libgcc=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../libgcc    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-emit-linux-gnueabi.arm-emit-linux-gnueabi=/usr/src/debug/gcc-runtime/12.1.0-r0    -ffile-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-emit-linux-gnueabi.arm-emit-linux-gnueabi/arm-emit-linux-gnueabi/libstdc++-v3/include=/usr/include/c++/12.1.0      conftest.c >&5
configure:15698: $? = 0
configure:15698: result: yes
configure:15698: checking sys/uio.h presence
configure:15698: arm-emit-linux-gnueabi-gcc -E --sysroot=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot  -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9  conftest.c
configure:15698: $? = 0
configure:15698: result: yes
configure:15698: checking for sys/uio.h
configure:15698: result: yes
configure:15720: checking for writev
configure:15761: arm-emit-linux-gnueabi-g++  -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot -nostdinc++ -L/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/dummylib -o conftest  -O2 -pipe -g -feliminate-unused-debug-types     -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot=    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native=    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0=/usr/src/debug/gcc-runtime/12.1.0-r0    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/include=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../include    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/libiberty=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../libiberty    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/libgcc=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../libgcc    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-emit-linux-gnueabi.arm-emit-linux-gnueabi=/usr/src/debug/gcc-runtime/12.1.0-r0    -ffile-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-emit-linux-gnueabi.arm-emit-linux-gnueabi/arm-emit-linux-gnueabi/libstdc++-v3/include=/usr/include/c++/12.1.0      -fno-exceptions  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed     -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot=    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native=    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0=/usr/src/debug/gcc-runtime/12.1.0-r0    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/include=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../include    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/libiberty=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../libiberty    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work-shared/gcc-12.1.0-r0/gcc-12.1.0/libgcc=/usr/src/debug/gcc-runtime/12.1.0-r0/libstdc++-v3/../libgcc    -fdebug-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-emit-linux-gnueabi.arm-emit-linux-gnueabi=/usr/src/debug/gcc-runtime/12.1.0-r0    -ffile-prefix-map=/home/preid/dev/v2022.05/tmp-glibc/work/cortexa9t2hf-neon-emit-linux-gnueabi/gcc-runtime/12.1.0-r0/gcc-12.1.0/build.arm-emit-linux-gnueabi.arm-emit-linux-gnueabi/arm-emit-linux-gnueabi/libstdc++-v3/include=/usr/include/c++/12.1.0     conftest.cpp  >&5
/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
configure:15761: $? = 1




-- 
Regards
Phil Reid
  
ElectroMagnetic Imaging Technology Pty Ltd
Development of Geophysical Instrumentation & Software
www.electromag.com.au
  
23 Junction Parade, Midland WA 6056, AUSTRALIA
Ph: +61 8 9250 8100
Fax: +61 8 9250 7100

Email: preid@electromag.com.au

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] libstdc++ honister -> kirkstone
  2022-07-12  5:23     ` Phil Reid
@ 2022-07-13 22:13       ` Richard Purdie
  2022-07-14  8:25         ` Phil Reid
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2022-07-13 22:13 UTC (permalink / raw)
  To: Phil Reid, mfumita, openembedded-core

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, mfumita@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





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [OE-core] libstdc++ honister -> kirkstone
  2022-07-13 22:13       ` Richard Purdie
@ 2022-07-14  8:25         ` Phil Reid
  0 siblings, 0 replies; 6+ messages in thread
From: Phil Reid @ 2022-07-14  8:25 UTC (permalink / raw)
  To: Richard Purdie, mfumita, openembedded-core

On 14/07/2022 6:13 am, Richard Purdie wrote:
> 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, mfumita@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/
> 
G'day Richard,

Thanks, can confirm that this fixes the problem. Our tests all passed.
Will you submit this as a patch?
Affects us on kirkstone, as well as master branch.




-- 
Regards
Phil Reid
  


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-14  8:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-01  1:14 libstdc++ honister -> kirkstone Phil Reid
2022-07-06  4:01 ` mfumita
2022-07-08 13:05   ` [OE-core] " Richard Purdie
2022-07-12  5:23     ` Phil Reid
2022-07-13 22:13       ` Richard Purdie
2022-07-14  8:25         ` Phil Reid

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.