Skip to contentSkip to conversation

cmake-native build failure on fedora38

DISCUSSION Changqing Li 2 participants 3 messages May 22, 2023 – May 26, 2023 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi, Richard, Khem

With uninative enabled, I build cmake-native failed on host fedora38.

Host fedora38 have gcc 13, and uninative tarball with libstdc++ from gcc 12, which will have runtime error when run the compiled apps. There should be some incompatibility.

I noticed that Khem had an patch in mail list to upgrade oe-core gcc to 13,  we need to update gcc to 13 and then update the uninative tarball to fix this failure.

Can I know is there any plan about upgrade gcc to 13,  and will the uninative tarball be rebuilt after gcc is upgraded?  Thanks.

Here is the failure:

$ g++ -g -isystem/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/usr/include -O2 -pipe
-L/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/usr/lib
-L/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/lib
-Wl,--enable-new-dtags    -Wl,-rpath-link,/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath-link,/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/lib
-Wl,-rpath,/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath,/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/lib
 -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
-std=gnu++17 cmake_bootstrap_7352_test.cxx -o cmake_bootstrap_7352_test
$ gdb ./cmake_bootstrap_7352_test
GNU gdb (GDB) Fedora Linux 13.1-3.fc38
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type"show copying"  and"show warranty"  for  details.
This GDB was configured as"x86_64-redhat-linux-gnu".
Type"show configuration"  for  configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
For help, type"help".
Type"apropos word"  to searchfor  commands related to"word"...
Reading symbols from ./cmake_bootstrap_7352_test...
(gdb) r
Starting program: /build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/cmake_bootstrap_7352_test
warning: Error disabling address space randomization: Operation not permitted

This GDB supports auto-downloading debuginfo from the following URLs:
<https://debuginfod.fedoraproject.org/> Enable debuginfodfor this session? (y or [n]) y
Debuginfod has been enabled.
To makethis setting permanent, add'set debuginfod enabled on' to .gdbinit.
Downloading separate debug infofor system-supplied DSO at 0x7ffeaaffe000
Downloading separate debug infofor /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6 Missing separate debuginfofor /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/7b/ff8bdd19faf549fb41f33504fa23bd0ae23ce8.debug Downloading separate debug infofor /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libgcc_s.so.1 Missing separate debuginfofor /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libgcc_s.so.1
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/6e/9a3111b316bb6ec90cc2fff7af5a494d7e7589.debug [Thread debugging using libthread_db enabled]
Using host libthread_db library"/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
(gdb) info s
#0 0x00007f5facbf9e6a in std::basic_ostream<char, std::char_traits<char> >::sentry::sentry(std::basic_ostream<char, std::char_traits<char> >&)

    () from /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6
#1  0x00007f5facbfa81c in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char  const*,long) ()
   from /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6
#2  0x00000000004012ca in std::operator<< <std::char_traits<char> > (__s=0x402010 "debug2", __out=...) at /usr/include/c++/13/ostream:667
#3  check_cxx14 () at cmake_bootstrap_7352_test.cxx:25
#4  0x0000000000401120 in main () at cmake_bootstrap_7352_test.cxx:79
(gdb) info sharedlibrary
From                To                  Syms Read   SharedObject  Library
0x00007f5facce7000  0x00007f5facd0c145  Yes (*)     /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
0x00007f5facb67320  0x00007f5facc63692  Yes (*)     /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6
0x00007f5fac9f73a0  0x00007f5faca682f8  Yes         /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libm.so.6
0x00007f5fac9cd660  0x00007f5fac9e3bd5  Yes (*)     /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libgcc_s.so.1
0x00007f5fac80d780  0x00007f5fac95affd  Yes         /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libc.so.6
#1 lore raw

FWIW: I've built my own uninative tarballs with khem's gcc-13 reviews and it's working fine for me since March and I'm using the same for kirkstone builds now which were just missing small fixes for llvm, nodejs, abseil-cpp to build my LuneOS images with gcc-13 on host (all 3 fixes sent to ML last week).

Quoted 88 lines · Changqing Li

Hi, Richard, Khem

With uninative enabled, I build cmake-native failed on host fedora38.

Host fedora38 have gcc 13, and uninative tarball with libstdc++ from gcc 12, which will have runtime error when run the compiled apps. There should be some incompatibility.

I noticed that Khem had an patch in mail list to upgrade oe-core gcc to 13, we need to update gcc to 13 and then update the uninative tarball to fix this failure.

Can I know is there any plan about upgrade gcc to 13, and will the uninative tarball be rebuilt after gcc is upgraded? Thanks.

Here is the failure:

$ g++ -g -isystem/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/usr/include -O2 -pipe
(quoted diff) +0 -7
-L/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/usr/lib
-L/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/lib
-Wl,--enable-new-dtags    -Wl,-rpath-link,/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath-link,/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/lib
-Wl,-rpath,/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath,/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/lib
 -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
-std=gnu++17 cmake_bootstrap_7352_test.cxx -o cmake_bootstrap_7352_test
$ gdb ./cmake_bootstrap_7352_test
GNU gdb (GDB) Fedora Linux 13.1-3.fc38
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./cmake_bootstrap_7352_test...
(gdb) r
Starting program: /build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/cmake_bootstrap_7352_test
warning: Error disabling address space randomization: Operation not permitted

This GDB supports auto-downloading debuginfo from the following URLs:
<https://debuginfod.fedoraproject.org/>Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Downloading separate debug info for system-supplied DSO at 0x7ffeaaffe000
Downloading separate debug info for /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6 Missing separate debuginfo for /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/7b/ff8bdd19faf549fb41f33504fa23bd0ae23ce8.debug Downloading separate debug info for /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libgcc_s.so.1 Missing separate debuginfo for /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libgcc_s.so.1
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/6e/9a3111b316bb6ec90cc2fff7af5a494d7e7589.debug [Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
(gdb) info s
#0 0x00007f5facbf9e6a in std::basic_ostream<char, std::char_traits<char> >::sentry::sentry(std::basic_ostream<char, std::char_traits<char> >&)

    () from /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6
#1  0x00007f5facbfa81c in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) ()
   from /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6
#2  0x00000000004012ca in std::operator<< <std::char_traits<char> > (__s=0x402010 "debug2", __out=...) at /usr/include/c++/13/ostream:667
#3  check_cxx14 () at cmake_bootstrap_7352_test.cxx:25
#4  0x0000000000401120 in main () at cmake_bootstrap_7352_test.cxx:79
(gdb) info sharedlibrary
From                To                  Syms Read   Shared Object Library
0x00007f5facce7000  0x00007f5facd0c145  Yes (*)     /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
0x00007f5facb67320  0x00007f5facc63692  Yes (*)     /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6
0x00007f5fac9f73a0  0x00007f5faca682f8  Yes         /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libm.so.6
0x00007f5fac9cd660  0x00007f5fac9e3bd5  Yes (*)     /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libgcc_s.so.1
0x00007f5fac80d780  0x00007f5fac95affd  Yes         /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libc.so.6

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#181580):
https://lists.openembedded.org/g/openembedded-core/message/181580
Mute This Topic: https://lists.openembedded.org/mt/99059205/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

I've recently upgraded by gentoo host to gcc-13.1.1_p20230520 and the just merged gcc-13.1.0 in oe-core isn't new enough for uninative again.

This new snapshot started to use ABI from GCC-13.2.0 (as
https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html says:
GCC 13.2.0: GLIBCXX_3.4.32, CXXABI_1.3.14) and now e.g. ninja-native fails to build with:
| /OE/build/poky/build/tmp/work/x86_64-linux/ninja-native/1.11.1-r0/git/./configure.py:26:
DeprecationWarning: 'pipes' is deprecated and slated fo
r removal in Python 3.13
| import pipes
| re2c:
/OE/build/poky/build/tmp/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6:
version `GLIBCXX_3.4.32' not found (required by re2c)

| bootstrapping ninja...
| Traceback (most recent call last):
|   File
"/OE/build/poky/build/tmp/work/x86_64-linux/ninja-native/1.11.1-r0/git/./configure.py",
line 480, in <module>
|     if has_re2c():
|        ^^^^^^^^^^
|   File
"/OE/build/poky/build/tmp/work/x86_64-linux/ninja-native/1.11.1-r0/git/./configure.py",
line 477, in has_re2c
|     return int(proc.communicate()[0], 10) >= 1103
|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ValueError: invalid literal for int() with base 10: b''

So make sure to keep your host gcc older than that or prepare your own uninative tarball with gcc recipes upgraded even more.

Quoted 100 lines · Martin Jansa via lists.openembedded.org

FWIW: I've built my own uninative tarballs with khem's gcc-13 reviews and it's working fine for me since March and I'm using the same for kirkstone builds now which were just missing small fixes for llvm, nodejs, abseil-cpp to build my LuneOS images with gcc-13 on host (all 3 fixes sent to ML last week).

Quoted 62 lines · Changqing Li

Hi, Richard, Khem

With uninative enabled, I build cmake-native failed on host fedora38.

Host fedora38 have gcc 13, and uninative tarball with libstdc++ from gcc 12, which will have runtime error when run the compiled apps. There should be some incompatibility.

I noticed that Khem had an patch in mail list to upgrade oe-core gcc to 13, we need to update gcc to 13 and then update the uninative tarball to fix this failure.

Can I know is there any plan about upgrade gcc to 13, and will the uninative tarball be rebuilt after gcc is upgraded? Thanks.

Here is the failure:

$ g++ -g -isystem/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/usr/include -O2 -pipe
(quoted diff) +0 -7
-L/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/usr/lib
-L/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/lib
-Wl,--enable-new-dtags    -Wl,-rpath-link,/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath-link,/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/lib
-Wl,-rpath,/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath,/build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/recipe-sysroot-native/lib
 -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
-std=gnu++17 cmake_bootstrap_7352_test.cxx -o cmake_bootstrap_7352_test
$ gdb ./cmake_bootstrap_7352_test
GNU gdb (GDB) Fedora Linux 13.1-3.fc38
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./cmake_bootstrap_7352_test...
(gdb) r
Starting program: /build/tmp-glibc/work/x86_64-linux/cmake-native/3.25.2-r0/cmake_bootstrap_7352_test
warning: Error disabling address space randomization: Operation not permitted

This GDB supports auto-downloading debuginfo from the following URLs:
<https://debuginfod.fedoraproject.org/>Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Downloading separate debug info for system-supplied DSO at 0x7ffeaaffe000
Downloading separate debug info for /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6 Missing separate debuginfo for /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/7b/ff8bdd19faf549fb41f33504fa23bd0ae23ce8.debug Downloading separate debug info for /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libgcc_s.so.1 Missing separate debuginfo for /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libgcc_s.so.1
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/6e/9a3111b316bb6ec90cc2fff7af5a494d7e7589.debug [Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
(gdb) info s
#0 0x00007f5facbf9e6a in std::basic_ostream<char, std::char_traits<char> >::sentry::sentry(std::basic_ostream<char, std::char_traits<char> >&)

Quoted 18 lines
    () from /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6
#1  0x00007f5facbfa81c in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) ()
   from /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6
#2  0x00000000004012ca in std::operator<< <std::char_traits<char> > (__s=0x402010 "debug2", __out=...) at /usr/include/c++/13/ostream:667
#3  check_cxx14 () at cmake_bootstrap_7352_test.cxx:25
#4  0x0000000000401120 in main () at cmake_bootstrap_7352_test.cxx:79
(gdb) info sharedlibrary
From                To                  Syms Read   Shared Object Library
0x00007f5facce7000  0x00007f5facd0c145  Yes (*)     /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
0x00007f5facb67320  0x00007f5facc63692  Yes (*)     /build/tmp-glibc/sysroots-uninative/x86_64-linux/usr/lib/libstdc++.so.6
0x00007f5fac9f73a0  0x00007f5faca682f8  Yes         /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libm.so.6
0x00007f5fac9cd660  0x00007f5fac9e3bd5  Yes (*)     /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libgcc_s.so.1
0x00007f5fac80d780  0x00007f5fac95affd  Yes         /build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/libc.so.6

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#181581):
https://lists.openembedded.org/g/openembedded-core/message/181581
Mute This Topic: https://lists.openembedded.org/mt/99059205/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-