Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ninja: fatal: chdir to '/out/Release' - No such file or directory

Tags:

ninja

i get source code (chrome) by

$ glient sync

ran all the command request :

     - gclient config ......
  - GYP_GENERATORS ...
  - build/intall-build-desp.......
  - GYP_DEFINES....
  - etc...

but when i try to build chromedriver like this :

lolo@ssa-workstation:~/work$ ninja -C /out/Release chromedriver

i get always this message

ninja: Entering directory `/out/Release'
ninja: fatal: chdir to '/out/Release' - No such file or directory`

please any help ?

like image 832
Lazhar Avatar asked Nov 11 '22 05:11

Lazhar


1 Answers

Just found what worked for me (Mac OS X Catalina 10.15.2) - source

(Note: Probably you'll have to replace ios or iphonesimulator with chromedriver as I was building chromium for iOS)

You have to enter src folder (after you used fetch - fetch ios in my case) and use gn args out/Debug-iphonesimulator (or replace out/Debug-iphonesimulator with your chosen out/ directory) to open up an editor (vi editor in my case) to set the following gn variables and regenerate:

# Set to true if you have a valid code signing key.
ios_enable_code_signing = false
target_os = "ios"
# Set to "x86", "x64", "arm", "armv7", "arm64". "x86" and "x64" will create a
# build to run on the iOS simulator (and set use_ios_simulator = true), all
# others are for an iOS device.
target_cpu = "x64"
# Release vs debug build.
is_debug = true

After that you would be able to run your command without problems (but be sure that depot_tools are in your $PATH)

I run autoninja -C out/Debug-iphonesimulator gn_all and it worked like a charm :)

For reference I used official documentation from here and here

There is another option to use GYP instead of gn on same documentation page (I didn't try by myself, but it could help someone anyway):

In the directory where you are going to check out the code, create a chromium.gyp_env to set the build to use iOS targets:

cat > chromium.gyp_env <<EOF
{
  "GYP_DEFINES": "OS=ios",
  "GYP_GENERATORS": "ninja,xcode-ninja",
}
EOF

If you aren't set up to sign iOS build products via a developer account, you should instead use:

cat > chromium.gyp_env <<EOF
{
  "GYP_DEFINES": "OS=ios chromium_ios_signing=0",
  "GYP_GENERATORS": "ninja,xcode-ninja",
}
EOF

Hope this could save someone a lot of time looking for answer :)

like image 134
Dmytro Holysh Avatar answered Jan 04 '23 03:01

Dmytro Holysh