Comments (2)
A Bit of Background
GN is what generates the build files for Ninja. In the terminal, we've been typing or pasting in commands to run different executable files which the shell of our operating system then reads and executes. Our operating system has a variable called $PATH
where it keeps a list of directories of all these files, separated by a colon. This resets every time your computer restarts or there's a new terminal instance.
Where to Look
When curious about what that list looks like, I like to use the echo
command in the terminal like so:
echo $PATH
We'll see something like /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
, which are the usual suspects for where to find commands. We edit this using export
. In the Aseprite Mac OS instructions, we used:
export PATH="${PWD}/depot_tools:${PATH}"
Which can be translated to:
"Dear shell,
Please check the directories in the$PATH
variable list for a command calledexport
.
Execute that to include thedepot_tools
directory found in the present working directory (PWD, which directory this command is being called from) in my$PATH
at the beginning. I want this directory searched first for commands until I close this terminal or restart my computer. Finally, put back all the directories that were in the$PATH
list at the end, so you know where else to look if a command isn't found indepot_tools
."
The Problem
Your shell has replied that it couldn't find gn
in all the directories listed in $PATH
, which should have included where the depot_tools
was installed after running the above command from the /home/your_user_name/deps
directory. When you run echo $PATH
, before the first colon should be /home/your_user_name/deps/depot_tools
with your actual user name substituted in, so your shell checks the first directory cloned with Git.
Troubleshoot
ls ~/deps/depot_tools/ | grep gn
This command will ask your shell to print all files whose names contain "gn" inside the correct directory. If you get a gn
in your response, move ahead to the PATH section. If nothing shows up, run:
ls ~/deps | grep depot_tools
to make sure depot_tools
was installed in the right place. If nothing again, you might have missed the step to cd
(change directories) to the newly made deps
and installed depot_tools
and skia
to your home directory by accident. The following commands will copy them from home
("~") to the deps
directory and delete the misplaced originals:
cp -R ~/depot_tools deps && rm -rf ~/depot_tools
cp -R ~/skia deps && rm -rf ~/skia
PATH to Success
Hopefully you are in the /home/your_user_name/deps/
directory. You can check with:
pwd
Run this command again:
export PATH="${PWD}/depot_tools:${PATH}"
and check again that the first entry matches /home/your_user_name/deps/depot_tools
with:
echo $PATH
I don't think it's important to clear out the wrong entries, they'll be gone after the terminal window is closed. The shell checks directories in the same order they are listed in the $PATH and when it finds what it wants.
Success!
You can now change directories back to the skia one with:
cd skia
Skip running the python script again, and try running the command that starts with gn
again! If it worked, you'll see something like:
Done. Made 60 targets from 44 files in 121ms
Hopefully this helps!
from skia.
I have the same issue on my musl libc install of Void Linux.
from skia.
Related Issues (20)
- Multiple errors in build. HOT 1
- fatal: remote error: Git repository not found HOT 1
- for m1 MacBook build failed proble
- Usr/local/include not included in build includes
- TypeError: a bytes-like object is required, not 'str'
- Build failure: set_sources_assignment_filter no longer included in gn
- Skia build failing (MacOS 12.3) HOT 1
- bin/fetch-gn returned non-zero exit status of 1 HOT 4
- Ninja build stage throwing an error because python is called HOT 3
- Failed to install emsdk when running git-sync-deps on RPi 4 HOT 4
- ninja: error: 'hb-aat-layout.cc' needed / missing HOT 4
- Updating the Skia windows compilation instructions in ReadMe HOT 1
- ninja: FAILED: libexpat.a HOT 2
- The super long command gives me IndesxError: list index out of range HOT 1
- Unable to build on windows 11 HOT 1
- Issue when running cmake for skia / ninja (autofit)
- Skia build cannot sync dependencies according to documentation.
- Ninja error while Building aseprite on source Code
- python3 tools/git-sync-deps not working HOT 2
- python error while compiling
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skia.