Questions tagged [gn]

For questions related to Google's GN build system.

Google's GN is a meta build system for generating low-level ninja build scripts. The name GN derives from "Generate-Ninja". GN is used by major Google projects such as Chromium, Skia and Fuchsia.

Reference: https://gn.googlesource.com/gn/

96 questions
13
votes
6 answers

How to build with targets with Google Chromium GN?

I'm trying to build the executable target for ChromeDriver from source with GN, which I installed in a directory on my PATH with Depot Tools, but when I run gn BUILD.gn I'm getting this error: gn.py: Could not find checkout in any parent of the…
legel
  • 2,507
  • 3
  • 23
  • 22
9
votes
2 answers

How to build crashpad for Qt application

I am developing Qt application and I would like to use crashpad to report crashes. I have downloaded sources and built them. Now I would like to link those statically to my application. When I go to out folder I see a lot of .a files. Which one…
RuLoViC
  • 825
  • 7
  • 23
5
votes
2 answers

The file libswiftCore.dylib doesn’t have the correct code signature

I know this question is asked many time and people's proposed many solutions. In my case, I have tried all of them. what I tried is FYI: I can't use xcode for the build. Reason: I am working on chromium ios code everything build using GN build…
Muhammad Shauket
  • 2,643
  • 19
  • 40
5
votes
1 answer

How to set a global compile flag in gn so it'll appear in the ninja files?

How to add a things like -O2 or a custom -DSOMETHING so they appear in cflags and defines of the *.ninja files? Recompiling this: https://webrtc.org/native-code/development/ It has changed the build system. Now the first build step is: gn gen…
Velkan
  • 7,067
  • 6
  • 43
  • 87
4
votes
1 answer

gn scripts are run with the wrong Python version ("a bytes-like object is required, not 'str'")

When building Chromium or libwebrtc with gn on macOS (Catalina 10.15), I get errors from the Python build scripts about bytes and str. For example: src [heads/master●] % gn gen out/ios_64 --args='target_os="ios" target_cpu="arm64"' ERROR at…
Lynn
  • 10,425
  • 43
  • 75
4
votes
2 answers

How to include a shared library in chromium's gn file?

(Q1)I have a test.so with some functions that I need to use.I've surveyed for a while but no answers. Could anyone have some advise of how to include a shared library in gn file of chromium project? Many thanks. Below is the content of my gn…
hsnu_976
  • 71
  • 1
  • 5
4
votes
2 answers

error while setting up chromium

i am getting following error while setting up chromium from source code. when i run gn gen out/Default gn gen out/Default ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code. pkgresult =…
LearningC
  • 3,182
  • 1
  • 12
  • 19
3
votes
4 answers

How to build dynamic (shared) libraries of crashpad?

Crashpad is an error reporting system for c++ apps. https://chromium.googlesource.com/crashpad/crashpad/+/HEAD/doc/developing.md build instructions are $ cd ~/crashpad/crashpad $ gn gen out/Default $ ninja -C out/Default I can build predefined…
2
votes
0 answers

How to convert CMake project to gn (BUILD.gn)?

I working with custom fork of Chromium, and need introduce some //third_party dependency , which is CMake based project. Because Chromium uses gn and BUILD.gn as basic "make file" I can't understand how I can build CMake project with context of…
user1503944
  • 387
  • 2
  • 16
2
votes
1 answer

ESP32: gn.py: Could not find checkout in any parent of the current path. This must be run inside a checkout

complying an ESP32 project using the MATTER protocol from the github project: Connectedhomeip (https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/esp32) im using ubuntu 20.02, tried using python 3.8 and 3.9 no…
2
votes
1 answer

How can I minimize the Chromium build files?

When I performed a release build of Chromium in a Windows environment according to the following procedure, the file size was 48GB. https://chromium.googlesource.com/chromium/src/+/main/docs/windows_build_instructions.md However, the file installed…
2
votes
1 answer

how to add new dependency for android to chromium?

I want to build Chromium for android and I want to add new dependency Amplitude to Chromium. so I changed third_party/android_deps/build.gradle file to this: dependencies { ... compile 'com.amplitude:android-sdk:2.23.2' ... } After that…
hamid
  • 694
  • 1
  • 8
  • 20
2
votes
1 answer

How do I build Google Crashpad into Shared (Dynamic) Libraries?

Problem Summary I'm trying to integrate Google Crashpad, (successor of Google Breakpad) a crash reporting system, into a software suite that links to all of its external libraries dynamically. My problem is that the default of Crashpad is to build…
Evan L
  • 91
  • 8
2
votes
1 answer

how can i create project by chromium gn tools?

install depot_tool then following the gn guide and standalone guide, but i always get error "gn.py: Could not find checkout in any parent of the current path." so my problem is : how to create the gn project which is not using chromium sub project,…
Centny
  • 31
  • 3
2
votes
0 answers

(Chromium for Android)How to add a prebuild shared library(.so) without source code by GN/NINJA?

I'm working on the source code of chromium for android: trying to develop some features in Webkit. What I've done: (1)Create test.cpp/test.h in "third_party/WebKit/Source/core/frame": test.cpp includes addlib.h calls the summation function in…
hsnu_976
  • 71
  • 1
  • 5
1
2 3 4 5 6 7