Skip to contentSkip to conversation

gn native do compile fails

DISCUSSION [email protected] 3 participants 4 messages Jan 13, 2023 – Jan 14, 2023

lore
Share & tools
lore
#0 lore raw

Can someone help me to solve this issue? I am not sure what can be the problem since me and my colleague did the exact same steps, and on his machine everything is done without any error and I am receiving constantly this one:

ERROR: gn-native-106.0.5249.119-r0 do_compile: Execution of '/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/temp/run.do_compile.2197284' failed with exit code 1
ERROR: Logfile of failure stored in: /home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/temp/log.do_compile.2197284
Log data follows:

| DEBUG: Executing shell function do_compile
| ninja: Entering directory `/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/chromium-106.0.5249.119/out/Release/gn_build'
| [1/195] CXX src/base/files/file_path_constants.o
| FAILED: src/base/files/file_path_constants.o
| clang++ -target x86_64-linux  -MMD -MF src/base/files/file_path_constants.o.d -I../../../tools/gn/src -I. -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++17 -c ../../../tools/gn/src/base/files/file_path_constants.cc -o src/base/files/file_path_constants.o
| ../../../tools/gn/src/base/files/file_path_constants.cc:7:10: fatal error: 'iterator' file not found
| #include <iterator>
|          ^~~~~~~~~~
| 1 error generated.
| [2/195] CXX src/base/command_line.o
| FAILED: src/base/command_line.o
| clang++ -target x86_64-linux  -MMD -MF src/base/command_line.o.d -I../../../tools/gn/src -I. -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++17 -c ../../../tools/gn/src/base/command_line.cc -o src/base/command_line.o
| In file included from ../../../tools/gn/src/base/command_line.cc:5:
| ../../../tools/gn/src/base/command_line.h:19:10: fatal error: 'map' file not found
| #include <map>
|          ^~~~~
| 1 error generated.
| [3/195] CXX src/base/environment.o
| FAILED: src/base/environment.o
| clang++ -target x86_64-linux  -MMD -MF src/base/environment.o.d -I../../../tools/gn/src -I. -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++17 -c ../../../tools/gn/src/base/environment.cc -o src/base/environment.o
| In file included from ../../../tools/gn/src/base/environment.cc:5:
| ../../../tools/gn/src/base/environment.h:8:10: fatal error: 'map' file not found
| #include <map>
|          ^~~~~
| 1 error generated.
| [4/195] CXX src/base/files/file_path.o
| FAILED: src/base/files/file_path.o
| clang++ -target x86_64-linux  -MMD -MF src/base/files/file_path.o.d -I../../../tools/gn/src -I. -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++17 -c ../../../tools/gn/src/base/files/file_path.cc -o src/base/files/file_path.o
| In file included from ../../../tools/gn/src/base/files/file_path.cc:5:
| ../../../tools/gn/src/base/files/file_path.h:107:10: fatal error: 'iosfwd' file not found
| #include <iosfwd>
|          ^~~~~~~~
| 1 error generated.
| [5/195] CXX src/base/files/file.o
| FAILED: src/base/files/file.o
| clang++ -target x86_64-linux  -MMD -MF src/base/files/file.o.d -I../../../tools/gn/src -I. -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++17 -c ../../../tools/gn/src/base/files/file.cc -o src/base/files/file.o
| In file included from ../../../tools/gn/src/base/files/file.cc:5:
| ../../../tools/gn/src/base/files/file.h:10:10: fatal error: 'string' file not found
| #include <string>
|          ^~~~~~~~
| 1 error generated.
| [6/195] CXX src/base/files/file_enumerator.o
| FAILED: src/base/files/file_enumerator.o
| clang++ -target x86_64-linux  -MMD -MF src/base/files/file_enumerator.o.d -I../../../tools/gn/src -I. -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++17 -c ../../../tools/gn/src/base/files/file_enumerator.cc -o src/base/files/file_enumerator.o
| In file included from ../../../tools/gn/src/base/files/file_enumerator.cc:5:
| ../../../tools/gn/src/base/files/file_enumerator.h:11:10: fatal error: 'vector' file not found
| #include <vector>
|          ^~~~~~~~
| 1 error generated.
| ninja: build stopped: subcommand failed.
| Traceback (most recent call last):
|   File "/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/chromium-106.0.5249.119/tools/gn/bootstrap/bootstrap.py", line 141, in <module>
|     sys.exit(main(sys.argv[1:]))
|   File "/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/chromium-106.0.5249.119/tools/gn/bootstrap/bootstrap.py", line 126, in main
|     subprocess.check_call(
|   File "/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/lib/python3.8/subprocess.py", line 364, in check_call
|     raise CalledProcessError(retcode, cmd)
| subprocess.CalledProcessError: Command '['ninja', '-C', '/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/chromium-106.0.5249.119/out/Release/gn_build', '-w', 'dupbuild=err', 'gn']' returned non-zero exit status 1.
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/temp/run.do_compile.2197284' failed with exit code 1

ERROR: Task (/home/jovanbosic/Yocto/meta-browser/meta-chromium/recipes-browser/chromium/gn-native_106.0.5249.119.bb:do_compile) failed with exit code '1'

Maybe there is a problem with some libraries?

#1 lore raw

you need to install C++ runtime or perhaps its there but clang is not able to find it. If you add libcxx-native to dependencies it might fix it.

Quoted 82 lines · On Thu, Jan 12, 2023 at 11:19 PM <[email protected]> wrote:

Can someone help me to solve this issue? I am not sure what can be the problem since me and my colleague did the exact same steps, and on his machine everything is done without any error and I am receiving constantly this one:

ERROR: gn-native-106.0.5249.119-r0 do_compile: Execution of '/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/temp/run.do_compile.2197284' failed with exit code 1
ERROR: Logfile of failure stored in: /home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/temp/log.do_compile.2197284
Log data follows:

| DEBUG: Executing shell function do_compile
| ninja: Entering directory `/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/chromium-106.0.5249.119/out/Release/gn_build'
| [1/195] CXX src/base/files/file_path_constants.o
| FAILED: src/base/files/file_path_constants.o
| clang++ -target x86_64-linux  -MMD -MF src/base/files/file_path_constants.o.d -I../../../tools/gn/src -I. -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++17 -c ../../../tools/gn/src/base/files/file_path_constants.cc -o src/base/files/file_path_constants.o
| ../../../tools/gn/src/base/files/file_path_constants.cc:7:10: fatal error: 'iterator' file not found
| #include <iterator>
|          ^~~~~~~~~~
| 1 error generated.
| [2/195] CXX src/base/command_line.o
| FAILED: src/base/command_line.o
| clang++ -target x86_64-linux  -MMD -MF src/base/command_line.o.d -I../../../tools/gn/src -I. -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++17 -c ../../../tools/gn/src/base/command_line.cc -o src/base/command_line.o
| In file included from ../../../tools/gn/src/base/command_line.cc:5:
| ../../../tools/gn/src/base/command_line.h:19:10: fatal error: 'map' file not found
| #include <map>
|          ^~~~~
| 1 error generated.
| [3/195] CXX src/base/environment.o
| FAILED: src/base/environment.o
| clang++ -target x86_64-linux  -MMD -MF src/base/environment.o.d -I../../../tools/gn/src -I. -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++17 -c ../../../tools/gn/src/base/environment.cc -o src/base/environment.o
| In file included from ../../../tools/gn/src/base/environment.cc:5:
| ../../../tools/gn/src/base/environment.h:8:10: fatal error: 'map' file not found
| #include <map>
|          ^~~~~
| 1 error generated.
| [4/195] CXX src/base/files/file_path.o
| FAILED: src/base/files/file_path.o
| clang++ -target x86_64-linux  -MMD -MF src/base/files/file_path.o.d -I../../../tools/gn/src -I. -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++17 -c ../../../tools/gn/src/base/files/file_path.cc -o src/base/files/file_path.o
| In file included from ../../../tools/gn/src/base/files/file_path.cc:5:
| ../../../tools/gn/src/base/files/file_path.h:107:10: fatal error: 'iosfwd' file not found
| #include <iosfwd>
|          ^~~~~~~~
| 1 error generated.
| [5/195] CXX src/base/files/file.o
| FAILED: src/base/files/file.o
| clang++ -target x86_64-linux  -MMD -MF src/base/files/file.o.d -I../../../tools/gn/src -I. -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++17 -c ../../../tools/gn/src/base/files/file.cc -o src/base/files/file.o
| In file included from ../../../tools/gn/src/base/files/file.cc:5:
| ../../../tools/gn/src/base/files/file.h:10:10: fatal error: 'string' file not found
| #include <string>
|          ^~~~~~~~
| 1 error generated.
| [6/195] CXX src/base/files/file_enumerator.o
| FAILED: src/base/files/file_enumerator.o
| clang++ -target x86_64-linux  -MMD -MF src/base/files/file_enumerator.o.d -I../../../tools/gn/src -I. -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/include -O2 -pipe -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -std=c++17 -c ../../../tools/gn/src/base/files/file_enumerator.cc -o src/base/files/file_enumerator.o
| In file included from ../../../tools/gn/src/base/files/file_enumerator.cc:5:
| ../../../tools/gn/src/base/files/file_enumerator.h:11:10: fatal error: 'vector' file not found
| #include <vector>
|          ^~~~~~~~
| 1 error generated.
| ninja: build stopped: subcommand failed.
| Traceback (most recent call last):
|   File "/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/chromium-106.0.5249.119/tools/gn/bootstrap/bootstrap.py", line 141, in <module>
|     sys.exit(main(sys.argv[1:]))
|   File "/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/chromium-106.0.5249.119/tools/gn/bootstrap/bootstrap.py", line 126, in main
|     subprocess.check_call(
|   File "/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/recipe-sysroot-native/usr/lib/python3.8/subprocess.py", line 364, in check_call
|     raise CalledProcessError(retcode, cmd)
| subprocess.CalledProcessError: Command '['ninja', '-C', '/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/chromium-106.0.5249.119/out/Release/gn_build', '-w', 'dupbuild=err', 'gn']' returned non-zero exit status 1.
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/jovanbosic/Yocto/build/tmp/work/x86_64-linux/gn-native/106.0.5249.119-r0/temp/run.do_compile.2197284' failed with exit code 1

ERROR: Task (/home/jovanbosic/Yocto/meta-browser/meta-chromium/recipes-browser/chromium/gn-native_106.0.5249.119.bb:do_compile) failed with exit code '1'

Maybe there is a problem with some libraries?

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
You automatically follow any topics you start or reply to. View/Reply Online (#58971): https://lists.yoctoproject.org/g/yocto/message/58971
Mute This Topic: https://lists.yoctoproject.org/mt/96241718/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

This is my gn-native_106.0.5.249.119.bb:

# gn-native contains the GN binary used to configure Chromium.
# It is not released separately, and each Chromium release is only expected to
# work with the GN version provided with it.

require chromium.inc

inherit native

S = "${WORKDIR}/chromium-${PV}"

# bootstrap.py --no_clean hardcodes the build location to out_bootstrap.
# Omitting --no_clean causes the script to create a temporary directory with a
# random name outside the build directory, so we choose the lesser of the two
# evils.
B = "${S}/out_bootstrap"

SRC_URI += " \
file://0001-Pass-no-static-libstdc-to-gen.py.patch \
"

# The build system expects the linker to be invoked via the compiler. If we use

# the default value for BUILD_LD, it will fail because it does not recognize
# some of the arguments passed to it.
BUILD_LD = "${CXX}"

# Use LLVM's ar rather than binutils'. Depending on the optimizations enabled

# in the build ar(1) may not be enough.
BUILD_AR = "llvm-ar"

DEPENDS = "clang-native ninja-native libcxx-native"
DEPENDS:append:runtime-llvm = " compiler-rt-native libcxx-native"
# Use libcxx headers for native parts
CXXFLAGS:append:runtime-llvm = " -isysroot=${STAGING_DIR_NATIVE} -stdlib=libc++"
# Use libgcc for native parts
LDFLAGS:append:runtime-llvm = " -rtlib=libgcc -unwindlib=libgcc -stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}"

do_configure[noexec] = "1"

do_compile() {
python3 ${S}/tools/gn/bootstrap/bootstrap.py --skip-generate-buildfiles }

do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/out/Release/gn ${D}${bindir}/gn }

INSANE_SKIP:${PN} += "already-stripped"

I have libcxx-native in dependencies and I have installed C++ runtime but I am seeing the same error.

#3 lore raw
Quoted 1 line · On 2023-01-13 02:43, jovanbosic95 via lists.yoctoproject.org wrote:

This is my gn-native_106.0.5.249.119.bb:

Aside from:
1. the version number in the file name, and
2. the DEPENDS of libcxx-native added to list
your file is the same as in

    meta-chromium/recipes-browser/chromium/gn-native_106.0.5249.119.bb

https://github.com/OSSystems/meta-browser/blob/master/meta-chromium/recipes-browser/chromium/gn-native_106.0.5249.119.bb.

and that works well on all the distros that I've tested.

What is it that that you're trying to do with a different version?

FWIW, on Ubuntu-22.04, your string header file is from:

$ dpkg -S /usr/include/c++/11/string
libstdc++-11-dev:amd64: /usr/include/c++/11/string

You and your co-worker might compare the output of dpkg -l or whatever lists your installed packages.

../Randy

Quoted 51 lines
# gn-native contains the GN binary used to configure Chromium.
# It is not released separately, and each Chromium release is only expected to
# work with the GN version provided with it.
require chromium.inc
inherit native
S = "${WORKDIR}/chromium-${PV}"
# bootstrap.py --no_clean hardcodes the build location to out_bootstrap.
# Omitting --no_clean causes the script to create a temporary directory with a
# random name outside the build directory, so we choose the lesser of the two
# evils.
B = "${S}/out_bootstrap"
SRC_URI += " \
         file://0001-Pass-no-static-libstdc-to-gen.py.patch \
"
# The build system expects the linker to be invoked via the compiler. If we use
# the default value for BUILD_LD, it will fail because it does not recognize
# some of the arguments passed to it.
BUILD_LD = "${CXX}"
# Use LLVM's ar rather than binutils'. Depending on the optimizations enabled
# in the build ar(1) may not be enough.
BUILD_AR = "llvm-ar"
DEPENDS = "clang-native ninja-native libcxx-native"
DEPENDS:append:runtime-llvm = " compiler-rt-native libcxx-native"
# Use libcxx headers for native parts
CXXFLAGS:append:runtime-llvm = " -isysroot=${STAGING_DIR_NATIVE} 
-stdlib=libc++"
# Use libgcc for native parts
LDFLAGS:append:runtime-llvm = " -rtlib=libgcc -unwindlib=libgcc 
-stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}"
do_configure[noexec] = "1"
do_compile() {
python3 ${S}/tools/gn/bootstrap/bootstrap.py --skip-generate-buildfiles
}
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/out/Release/gn ${D}${bindir}/gn
}
INSANE_SKIP:${PN} += "already-stripped"

I have libcxx-native in dependencies and I have installed C++ runtime but I am seeing the same error.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#58973): https://lists.yoctoproject.org/g/yocto/message/58973
Mute This Topic: https://lists.yoctoproject.org/mt/96241718/3616765
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
# Randy MacLeod
# Wind River Linux