All of lore.kernel.org
 help / color / mirror / Atom feed
* gn native do compile fails
@ 2023-01-13  7:19 jovanbosic95
  2023-01-13  7:23 ` [yocto] " Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: jovanbosic95 @ 2023-01-13  7:19 UTC (permalink / raw)
  To: yocto

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

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?

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

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

* Re: [yocto] gn native do compile fails
  2023-01-13  7:19 gn native do compile fails jovanbosic95
@ 2023-01-13  7:23 ` Khem Raj
  2023-01-13  7:43   ` jovanbosic95
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2023-01-13  7:23 UTC (permalink / raw)
  To: jovanbosic95; +Cc: yocto

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.

On Thu, Jan 12, 2023 at 11:19 PM <jovanbosic95@gmail.com> 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: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: gn native do compile fails
  2023-01-13  7:23 ` [yocto] " Khem Raj
@ 2023-01-13  7:43   ` jovanbosic95
  2023-01-14  1:24     ` [yocto] " Randy MacLeod
  0 siblings, 1 reply; 4+ messages in thread
From: jovanbosic95 @ 2023-01-13  7:43 UTC (permalink / raw)
  To: yocto

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

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.

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

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

* Re: [yocto] gn native do compile fails
  2023-01-13  7:43   ` jovanbosic95
@ 2023-01-14  1:24     ` Randy MacLeod
  0 siblings, 0 replies; 4+ messages in thread
From: Randy MacLeod @ 2023-01-14  1:24 UTC (permalink / raw)
  To: jovanbosic95, yocto

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


> 
> # 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: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [randy.macleod@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 

-- 
# Randy MacLeod
# Wind River Linux



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

end of thread, other threads:[~2023-01-14  1:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13  7:19 gn native do compile fails jovanbosic95
2023-01-13  7:23 ` [yocto] " Khem Raj
2023-01-13  7:43   ` jovanbosic95
2023-01-14  1:24     ` [yocto] " Randy MacLeod

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.