<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15124</bug_id>
          
          <creation_ts>2023-05-19 14:31:18 +0000</creation_ts>
          <short_desc>cmake-native fails to prepend c++ compiler after pulling the newest kirkstone/master with gcc13 on host</short_desc>
          <delta_ts>2023-06-08 09:35:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>4.0.10</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.3 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jakub">malyjak</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>95575</commentid>
    <comment_count>0</comment_count>
    <who name="Jakub">malyjak</who>
    <bug_when>2023-05-19 14:31:18 +0000</bug_when>
    <thetext>Before I had no issues compiling my project using kirkstone branches but after updating today to the newest commits (after more than half year) I&apos;m getting this error while building cmake-native from the poky recipe:

```
ERROR: cmake-native-3.22.3-r0 do_configure: ExecutionError(&apos;/home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/temp/run.do_configure.1423904&apos;, 7, None, None)
ERROR: Logfile of failure stored in: /home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/temp/log.do_configure.1423904
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are [&apos;/home/user/Projects/yocto/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot&apos;, &apos;virtual:native:/home/user/Projects/yocto/poky/meta/recipes-core/ncurses/ncurses_6.3+20220423.bb:do_populate_sysroot&apos;, &apos;virtual:native:/home/user/Projects/yocto/poky/meta/recipes-core/zlib/zlib_1.2.11.bb:do_populate_sysroot&apos;, &apos;virtual:native:/home/user/Projects/yocto/poky/meta/recipes-extended/bzip2/bzip2_1.0.8.bb:do_populate_sysroot&apos;, &apos;virtual:native:/home/user/Projects/yocto/poky/meta/recipes-extended/xz/xz_5.2.6.bb:do_populate_sysroot&apos;, &apos;virtual:native:/home/user/Projects/yocto/poky/meta/recipes-extended/zstd/zstd_1.5.2.bb:do_populate_sysroot&apos;, &apos;virtual:native:/home/user/Projects/yocto/poky/meta/recipes-support/curl/curl_7.82.0.bb:do_populate_sysroot&apos;]
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: [&apos;quilt-native&apos;, &apos;ncurses-native&apos;, &apos;zlib-native&apos;, &apos;bzip2-native&apos;, &apos;xz-native&apos;, &apos;zstd-native&apos;, &apos;curl-native&apos;, &apos;openssl-native&apos;, &apos;libtool-native&apos;, &apos;gettext-minimal-native&apos;, &apos;perl-native&apos;, &apos;texinfo-dummy-native&apos;, &apos;make-native&apos;, &apos;gdbm-native&apos;]
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_configure
| ---------------------------------------------
| Source directory: /home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/cmake-3.22.3
| Binary directory: /home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/build
| Prefix directory: /home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/recipe-sysroot-native/usr
| System:           Linux
| Generator:        Unix Makefiles
| Doing parallel make: 8
|
| ---------------------------------------------
| CMake 3.22.3, Copyright 2000-2021 Kitware, Inc. and Contributors
| C compiler on this system is: gcc -isystem/home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/recipe-sysroot-native/usr/include -O2 -pipe
| ---------------------------------------------
| Error when bootstrapping CMake:
| Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
| Please specify one using environment variable CXX.
| The C++ flags are &quot;-isystem/home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/recipe-sysroot-native/usr/include -O2 -pipe&quot;.
| They can be changed using the environment variable CXXFLAGS.
| See cmake_bootstrap.log for compilers attempted.
| ---------------------------------------------
| Log of errors: /home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/build/Bootstrap.cmk/cmake_bootstrap.log
| ---------------------------------------------
| WARNING: /home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/temp/run.do_configure.1423904:143 exit 7 from &apos;/home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/cmake-3.22.3/configure --verbose --prefix=/home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/recipe-sysroot-native/usr --parallel=8 -- -DCMAKE_LIBRARY_PATH=/home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/recipe-sysroot-native/usr/lib -DBUILD_CursesDialog=1 -DCMAKE_USE_SYSTEM_LIBRARIES=1-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=0 -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 -DHAVE_SYS_ACL_H=0 -DCURL_LIBRARIES=-lcurl&apos;
| WARNING: Backtrace (BB generated script):
|       #1: do_configure, /home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/temp/run.do_configure.1423904, line 143
|       #2: main, /home/user/Builds/swupdate-rpi/tmp/work/x86_64-linux/cmake-native/3.22.3-r0/temp/run.do_configure.1423904, line 150
ERROR: Task (/home/user/Projects/yocto/poky/meta/recipes-devtools/cmake/cmake-native_3.22.3.bb:do_configure) failed with exit code &apos;1&apos;
```

It seems like gcc is properly prepended to CFLAGS but for some reason g++ isn&apos;t in case of CXXFLAGS. My build system is:

```
OS: Garuda Linux x86_64
Host: VMware Virtual Platform
Kernel: 6.3.2-zen1-1-zen
```

And it has:
```
gcc (GCC) 13.1.1 20230429
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
```
g++ (GCC) 13.1.1 20230429
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```

All was working just well yesterday before the pull.
I also tried to rebuild from scratch but the same error is being generated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95586</commentid>
    <comment_count>1</comment_count>
    <who name="Jakub">malyjak</who>
    <bug_when>2023-05-24 11:26:46 +0000</bug_when>
    <thetext>I found no change in the Poky / OE repository that would break it. As I assumed, this is OS specific bug. I switched back to supported Ubuntu LTS for building yocto and everything works as well. Please close this issues since it&apos;s for unsupported host.

Best,

Jakub</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95592</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-05-25 14:41:32 +0000</bug_when>
    <thetext>This is a general problem encountered when the host gcc is version 13.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95648</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2023-06-08 09:35:01 +0000</bug_when>
    <thetext>Resolved with an upgrade to uninative: https://git.yoctoproject.org/poky/commit/?id=6ebe71a52eae6b539560aa6a1ea12964dd10ed1e</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>