question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ninja: error: unknown target 'gn'. I got the same error, can anyone tell me how to fix it?

See original GitHub issue
./tools/gn/bootstrap/bootstrap.py --skip-generate-buildfiles -j4 -o out/Default/
ninja: error: unknown target 'gn'
ninja: Entering directory `C:\Users\MACBOOK\ungoogled-chromium\build\src\out\Release\gn_build'
Traceback (most recent call last):
  File "./tools/gn/bootstrap/bootstrap.py", line 144, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./tools/gn/bootstrap/bootstrap.py", line 127, in main
    [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', '-j'+str(options.jobs), 'gn'])
  File "C:\tools\python2\lib\subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', '-C', 'C:\\Users\\MACBOOK\\ungoogled-chromium\\build\\src\\out\\Release\\gn_build', '-w', 'dupbuild=err', '-j4', 'gn']' returned non-zero exit status 1

i tried almost every tutorial but don’t know how to debug.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
teeminuscommented, Nov 23, 2022

Try using the Developer Command Prompt for VS.

0reactions
hoanghiep1x0commented, Nov 23, 2022

Sorry I already know where the problem is depot_tools and path run command ungoogled-software not by ungoogled-software-windows.

  1. is because python3 and depot_tools path of depot_tools on top position environment variable. according to instructions depot_tools is deprecated as google_chromium build.
  2. is because the windowkit version with the appropriate OS does not exist. windowkit/10/19045.2251 is loaded automatically while os is 20348.288.
  3. should run with “cmd.exe administrator”

C:\Users\Administrator>python --version Python 3.8.10 C:\Users\Administrator>where python C:\tools\python3\python.exe C:\Users\Administrator>python3 --version Python 3.8.10

system variable has been added as instructed: vs2019_install=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community WINDOWSSDKDIR=C:\Program Files (x86)\Windows Kits\10 GYP_MSVS_VERSION=2019

Note exists OS version build when installing with Microsoft Visual Studio. “C:\Program Files (x86)\Windows Kits\10\ + OS_VERSION”.

then run the command in cmd.exe (as administrator):

git clone --recurse-submodules https://github.com/ungoogled-software/ungoogled-chromium-windows.git

cd ungoogled-chromium-windows

py build.py

then it should work properly.

Sorry for wasting your time, thanks for your help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ninja: error: unknown target 'install' · Issue #1424 - GitHub
I'm trying into integrate aws-iot-device-sdk-embedded-C into Yocto. do_install failed with an error "ninja: error: unknown target 'install'".
Read more >
ninja: error: unknown target 'chrome_public_apk'
I try to build a full browser of Chromimum for Android, but fails. ... Anyone knows how to fix it?
Read more >
ninja target "uninstalled": unknown target (#30) · Issues
I'm trying to use then uninstalled environment, but I'm getting this error: ninja: Entering directory `build/' ninja: error: unknown target ...
Read more >
How to build chromium for Android - Stack Overflow
It seems that target is not built. In this link, it says to run build/gyp_chromium -DOS=android before running the ninja command. However, I...
Read more >
ninja: error: unknown target 'otapackage' - XDA Forums
ninja : error: unknown target 'otapackage' ... failures) but it didn't have any google services installed and it overwrote my TWRP recovery, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found