2018-02-10 23:37:42 +00:00
2020-01-22 00:59:16 +00:00
<!DOCTYPE html>
2017-09-20 02:35:05 +00:00
2021-04-10 04:00:37 +00:00
< html >
2017-09-20 02:35:05 +00:00
< head >
2020-01-22 00:59:16 +00:00
< meta charset = "utf-8" / >
2021-06-22 00:16:40 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" / > < meta name = "generator" content = "Docutils 0.17.1: http://docutils.sourceforge.net/" / >
2017-09-20 02:35:05 +00:00
< title > Build Instructions — Shaka Packager documentation< / title >
2021-06-22 00:16:40 +00:00
< link rel = "stylesheet" type = "text/css" href = "_static/pygments.css" / >
< link rel = "stylesheet" type = "text/css" href = "_static/sphinxdoc_new.css" / >
2020-01-22 00:59:16 +00:00
< link rel = "stylesheet" type = "text/css" href = "_static/graphviz.css" / >
< link rel = "stylesheet" type = "text/css" href = "_static/table_styling.css" / >
2021-06-22 00:16:40 +00:00
< script data-url_root = "./" id = "documentation_options" src = "_static/documentation_options.js" > < / script >
2021-04-10 04:00:37 +00:00
< script src = "_static/jquery.js" > < / script >
< script src = "_static/underscore.js" > < / script >
< script src = "_static/doctools.js" > < / script >
2017-09-20 02:35:05 +00:00
< link rel = "index" title = "Index" href = "genindex.html" / >
< link rel = "search" title = "Search" href = "search.html" / >
< link rel = "next" title = "Using Docker" href = "docker_instructions.html" / >
< link rel = "prev" title = "Shaka Packager Library" href = "library.html" / >
2020-01-22 00:59:16 +00:00
< / head > < body >
2017-09-20 02:35:05 +00:00
< div class = "related" role = "navigation" aria-label = "related navigation" >
< h3 > Navigation< / h3 >
< ul >
< li class = "right" style = "margin-right: 10px" >
< a href = "genindex.html" title = "General Index"
accesskey="I">index< / a > < / li >
< li class = "right" >
< a href = "docker_instructions.html" title = "Using Docker"
accesskey="N">next< / a > |< / li >
< li class = "right" >
< a href = "library.html" title = "Shaka Packager Library"
accesskey="P">previous< / a > |< / li >
2021-04-10 04:00:37 +00:00
< li class = "nav-item nav-item-0" > < a href = "index.html" > Shaka Packager documentation< / a > » < / li >
< li class = "nav-item nav-item-this" > < a href = "" > Build Instructions< / a > < / li >
2017-09-20 02:35:05 +00:00
< / ul >
2021-04-10 04:00:37 +00:00
< / div >
2017-09-20 02:35:05 +00:00
< div class = "document" >
< div class = "documentwrapper" >
< div class = "bodywrapper" >
< div class = "body" role = "main" >
2021-06-22 00:16:40 +00:00
< section id = "build-instructions" >
2020-01-22 00:59:16 +00:00
< h1 > Build Instructions< a class = "headerlink" href = "#build-instructions" title = "Permalink to this headline" > ¶< / a > < / h1 >
2017-09-20 02:35:05 +00:00
< p > Shaka Packager supports building on Windows, Mac and Linux host systems.< / p >
2021-06-22 00:16:40 +00:00
< section id = "linux-build-dependencies" >
2020-01-22 00:59:16 +00:00
< h2 > Linux build dependencies< a class = "headerlink" href = "#linux-build-dependencies" title = "Permalink to this headline" > ¶< / a > < / h2 >
2017-09-20 02:35:05 +00:00
< p > Most development is done on Ubuntu (currently 14.04, Trusty Tahr). The
dependencies mentioned here are only for Ubuntu. There are some instructions
for < a class = "reference external" href = "#notes-for-other-linux-distros" > other distros below< / a > .< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > sudo apt-get update
2017-09-20 02:35:05 +00:00
sudo apt-get install build-essential curl git python
< / pre > < / div >
< / div >
2020-01-22 00:59:16 +00:00
< p > Note that < code class = "docutils literal notranslate" > < span class = "pre" > Git< / span > < / code > must be v1.7.5 or above.< / p >
2021-06-22 00:16:40 +00:00
< / section >
< section id = "mac-system-requirements" >
2020-01-22 00:59:16 +00:00
< h2 > Mac system requirements< a class = "headerlink" href = "#mac-system-requirements" title = "Permalink to this headline" > ¶< / a > < / h2 >
2017-09-20 02:35:05 +00:00
< ul >
2020-01-22 00:59:16 +00:00
< li > < p > < a class = "reference external" href = "https://developer.apple.com/xcode" > Xcode< / a > 7.3+.< / p > < / li >
< li > < p > The OS X 10.10 SDK or later. Run< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ ls < span class = "sb" > `< / span > xcode-select -p< span class = "sb" > `< / span > /Platforms/MacOSX.platform/Developer/SDKs
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
< p > to check whether you have it.< / p >
< / li >
2021-04-10 04:00:37 +00:00
< li > < p > Note that there is a known problem with 10.15 SDK or later right now. You
can workaround it by using 10.14 SDK. See
< a class = "reference external" href = "https://github.com/google/shaka-packager/issues/660#issuecomment-552576341" > #660< / a >
for details.< / p > < / li >
2017-09-20 02:35:05 +00:00
< / ul >
2021-06-22 00:16:40 +00:00
< / section >
< section id = "windows-system-requirements" >
2020-01-22 00:59:16 +00:00
< h2 > Windows system requirements< a class = "headerlink" href = "#windows-system-requirements" title = "Permalink to this headline" > ¶< / a > < / h2 >
2017-09-20 02:35:05 +00:00
< ul class = "simple" >
2021-06-22 00:16:40 +00:00
< li > < p > Visual Studio 2015 Update 3, 2017, or 2019. (See below.)< / p > < / li >
2020-01-22 00:59:16 +00:00
< li > < p > Windows 7 or newer.< / p > < / li >
2017-09-20 02:35:05 +00:00
< / ul >
< p > Install Visual Studio 2015 Update 3 or later - Community Edition should work if
its license is appropriate for you. Use the Custom Install option and select:< / p >
< ul class = "simple" >
2020-01-22 00:59:16 +00:00
< li > < p > Visual C++, which will select three sub-categories including MFC< / p > < / li >
< li > < p > Universal Windows Apps Development Tools > Tools (1.4.1) and Windows 10 SDK
(10.0.14393)< / p > < / li >
2017-09-20 02:35:05 +00:00
< / ul >
2021-06-22 00:16:40 +00:00
< p > If using VS 2017 or VS 2019, you must set the following environment variables,
with versions and paths adjusted to match your actual system:< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "nv" > GYP_MSVS_VERSION< / span > < span class = "o" > =< / span > < span class = "s2" > " 2019" < / span >
< span class = "nv" > GYP_MSVS_OVERRIDE_PATH< / span > < span class = "o" > =< / span > < span class = "s2" > " C:/Program Files (x86)/Microsoft Visual Studio/2019/Community" < / span >
< / pre > < / div >
2017-09-20 02:35:05 +00:00
< / div >
2021-06-22 00:16:40 +00:00
< / section >
< section id = "install-depot-tools" >
2020-01-22 00:59:16 +00:00
< h2 > Install < code class = "docutils literal notranslate" > < span class = "pre" > depot_tools< / span > < / code > < a class = "headerlink" href = "#install-depot-tools" title = "Permalink to this headline" > ¶< / a > < / h2 >
2021-06-22 00:16:40 +00:00
< section id = "linux-and-mac" >
2020-01-22 00:59:16 +00:00
< h3 > Linux and Mac< a class = "headerlink" href = "#linux-and-mac" title = "Permalink to this headline" > ¶< / a > < / h3 >
< p > Clone the < code class = "docutils literal notranslate" > < span class = "pre" > depot_tools< / span > < / code > repository from Chromium:< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
2020-01-22 00:59:16 +00:00
< p > Add < code class = "docutils literal notranslate" > < span class = "pre" > depot_tools< / span > < / code > to the end of your PATH (you will probably want to put this
in your < code class = "docutils literal notranslate" > < span class = "pre" > ~/.bashrc< / span > < / code > or < code class = "docutils literal notranslate" > < span class = "pre" > ~/.zshrc< / span > < / code > ). Assuming you cloned < code class = "docutils literal notranslate" > < span class = "pre" > depot_tools< / span > < / code > to
< code class = "docutils literal notranslate" > < span class = "pre" > /path/to/depot_tools< / span > < / code > :< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ < span class = "nb" > export< / span > < span class = "nv" > PATH< / span > < span class = "o" > =< / span > < span class = "s2" > " < / span > < span class = "nv" > $PATH< / span > < span class = "s2" > :/path/to/depot_tools" < / span >
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
2021-06-22 00:16:40 +00:00
< / section >
< section id = "windows" >
2020-01-22 00:59:16 +00:00
< h3 > Windows< a class = "headerlink" href = "#windows" title = "Permalink to this headline" > ¶< / a > < / h3 >
2017-09-20 02:35:05 +00:00
< p > Download the
< a class = "reference external" href = "https://storage.googleapis.com/chrome-infra/depot_tools.zip" > depot_tools bundle< / a >
and extract it somewhere.< / p >
2021-04-10 04:00:37 +00:00
< p > < strong > WARNING: DO NOT< / strong > use drag-n-drop or copy-n-paste extract from Explorer,
2017-09-20 02:35:05 +00:00
this will not extract the hidden “.git” folder which is necessary for
depot_tools to autoupdate itself. You can use “Extract all…” from the context
menu though.< / p >
< p > Add depot_tools to the start of your PATH (must be ahead of any installs of
Python). Assuming you unzipped the bundle to C:\src\depot_tools, open:< / p >
< p > Control Panel → System and Security → System → Advanced system settings< / p >
< p > If you have Administrator access, Modify the PATH system variable and
2020-01-22 00:59:16 +00:00
put < code class = "docutils literal notranslate" > < span class = "pre" > C:\src\depot_tools< / span > < / code > at the front (or at least in front of any directory
2017-09-20 02:35:05 +00:00
that might already have a copy of Python or Git).< / p >
2018-02-10 23:37:42 +00:00
< p > If you don’ t have Administrator access, you can add a user-level PATH
2020-01-22 00:59:16 +00:00
environment variable and put < code class = "docutils literal notranslate" > < span class = "pre" > C:\src\depot_tools< / span > < / code > at the front, but
2017-09-20 02:35:05 +00:00
if your system PATH has a Python in it, you will be out of luck.< / p >
< p > Also, add a DEPOT_TOOLS_WIN_TOOLCHAIN system variable in the same way, and set
it to 0. This tells depot_tools to use your locally installed version of Visual
Studio (by default, depot_tools will try to use a google-internal version).< / p >
< p > From a cmd.exe shell, run the command gclient (without arguments). On first
run, gclient will install all the Windows-specific bits needed to work with
the code, including msysgit and python.< / p >
< ul class = "simple" >
2020-01-22 00:59:16 +00:00
< li > < p > If you run gclient from a non-cmd shell (e.g., cygwin, PowerShell),
2017-09-20 02:35:05 +00:00
it may appear to run properly, but msysgit, python, and other tools
2020-01-22 00:59:16 +00:00
may not get installed correctly.< / p > < / li >
< li > < p > If you see strange errors with the file system on the first run of gclient,
2017-09-20 02:35:05 +00:00
you may want to
2020-01-22 00:59:16 +00:00
< a class = "reference external" href = "http://tortoisesvn.tigris.org/faq.html#cantmove2" > disable Windows Indexing< / a > .< / p > < / li >
2017-09-20 02:35:05 +00:00
< / ul >
2021-06-22 00:16:40 +00:00
< / section >
< / section >
< section id = "get-the-code" >
2020-01-22 00:59:16 +00:00
< h2 > Get the code< a class = "headerlink" href = "#get-the-code" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > Create a < code class = "docutils literal notranslate" > < span class = "pre" > shaka_packager< / span > < / code > directory for the checkout and change to it (you can
2017-09-20 02:35:05 +00:00
call this whatever you like and put it wherever you like, as long as the full
path has no spaces):< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ mkdir shaka_packager < span class = "o" > & & < / span > < span class = "nb" > cd< / span > shaka_packager
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
2020-01-22 00:59:16 +00:00
< p > Run the < code class = "docutils literal notranslate" > < span class = "pre" > gclient< / span > < / code > tool from < code class = "docutils literal notranslate" > < span class = "pre" > depot_tools< / span > < / code > to check out the code and its
2017-09-20 02:35:05 +00:00
dependencies.< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ gclient config https://www.github.com/google/shaka-packager.git --name< span class = "o" > =< / span > src --unmanaged
2017-09-20 02:35:05 +00:00
$ gclient sync
< / pre > < / div >
< / div >
2018-02-10 23:37:42 +00:00
< p > To sync to a particular commit or version, add the ‘ -r < revision> ’ flag to
2020-01-22 00:59:16 +00:00
< code class = "docutils literal notranslate" > < span class = "pre" > gclient< / span > < span class = "pre" > sync< / span > < / code > , e.g.< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ gclient sync -r 4cb5326355e1559d60b46167740e04624d0d2f51
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ gclient sync -r v1.2.0
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
2018-02-10 23:37:42 +00:00
< p > If you don’ t want the full repo history, you can save some time by adding the
2020-01-22 00:59:16 +00:00
< code class = "docutils literal notranslate" > < span class = "pre" > --no-history< / span > < / code > flag to < code class = "docutils literal notranslate" > < span class = "pre" > gclient< / span > < span class = "pre" > sync< / span > < / code > .< / p >
< p > When the above commands completes, it will have created a hidden < code class = "docutils literal notranslate" > < span class = "pre" > .gclient< / span > < / code > file
and a directory called < code class = "docutils literal notranslate" > < span class = "pre" > src< / span > < / code > in the working directory. The remaining
instructions assume you have switched to the < code class = "docutils literal notranslate" > < span class = "pre" > src< / span > < / code > directory:< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ < span class = "nb" > cd< / span > src
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
2021-06-22 00:16:40 +00:00
< section id = "build-shaka-packager" >
2020-01-22 00:59:16 +00:00
< h3 > Build Shaka Packager< a class = "headerlink" href = "#build-shaka-packager" title = "Permalink to this headline" > ¶< / a > < / h3 >
2021-06-22 00:16:40 +00:00
< section id = "id1" >
2020-01-22 00:59:16 +00:00
< h4 > Linux and Mac< a class = "headerlink" href = "#id1" title = "Permalink to this headline" > ¶< / a > < / h4 >
2017-09-20 02:35:05 +00:00
< p > Shaka Packager uses < a class = "reference external" href = "https://ninja-build.org" > Ninja< / a > as its main build tool,
which is bundled in depot_tools.< / p >
2020-01-22 00:59:16 +00:00
< p > To build the code, run < code class = "docutils literal notranslate" > < span class = "pre" > ninja< / span > < / code > command:< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ ninja -C out/Release
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
2020-01-22 00:59:16 +00:00
< p > If you want to build debug code, replace < code class = "docutils literal notranslate" > < span class = "pre" > Release< / span > < / code > above with < code class = "docutils literal notranslate" > < span class = "pre" > Debug< / span > < / code > .< / p >
2017-09-20 02:35:05 +00:00
< p > We also provide a mechanism to change build settings, for example,
2020-01-22 00:59:16 +00:00
you can change build system to < code class = "docutils literal notranslate" > < span class = "pre" > make< / span > < / code > by overriding < code class = "docutils literal notranslate" > < span class = "pre" > GYP_GENERATORS< / span > < / code > :< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ < span class = "nv" > GYP_GENERATORS< / span > < span class = "o" > =< / span > < span class = "s1" > ' make' < / span > gclient runhooks
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
2020-01-22 00:59:16 +00:00
< p > Another example, you can also disable clang by overriding < code class = "docutils literal notranslate" > < span class = "pre" > GYP_DEFINES< / span > < / code > :< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ < span class = "nv" > GYP_DEFINES< / span > < span class = "o" > =< / span > < span class = "s1" > ' clang=0' < / span > gclient runhooks
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
2021-06-22 00:16:40 +00:00
< / section >
< section id = "id2" >
2020-01-22 00:59:16 +00:00
< h4 > Windows< a class = "headerlink" href = "#id2" title = "Permalink to this headline" > ¶< / a > < / h4 >
< p > The instructions are similar, except that Windows allows using either < code class = "docutils literal notranslate" > < span class = "pre" > /< / span > < / code > or < code class = "docutils literal notranslate" > < span class = "pre" > \< / span > < / code >
2017-09-20 02:35:05 +00:00
as path separator:< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ ninja -C out/Release
2017-09-20 02:35:05 +00:00
$ ninja -C out< span class = "se" > \R< / span > elease
< / pre > < / div >
< / div >
< p > Also, unlike Linux / Mac, 32-bit is chosen by default even if the system is
64-bit. 64-bit has to be enabled explicitly and the output directory is
2020-01-22 00:59:16 +00:00
configured to < code class = "docutils literal notranslate" > < span class = "pre" > out/%CONFIGURATION%_x64< / span > < / code > , i.e.:< / p >
2021-04-10 04:00:37 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ SET < span class = "nv" > GYP_DEFINES< / span > < span class = "o" > =< / span > < span class = "s1" > ' target_arch=x64' < / span >
$ gclient runhooks
2017-09-20 02:35:05 +00:00
$ ninja -C out/Release_x64
< / pre > < / div >
< / div >
2021-06-22 00:16:40 +00:00
< / section >
< / section >
< section id = "build-artifacts" >
2020-01-22 00:59:16 +00:00
< h3 > Build artifacts< a class = "headerlink" href = "#build-artifacts" title = "Permalink to this headline" > ¶< / a > < / h3 >
2017-09-20 02:35:05 +00:00
< p > After a successful build, you can find build artifacts including the main
2020-01-22 00:59:16 +00:00
< code class = "docutils literal notranslate" > < span class = "pre" > packager< / span > < / code > binary in build output directory (< code class = "docutils literal notranslate" > < span class = "pre" > out/Release< / span > < / code > or < code class = "docutils literal notranslate" > < span class = "pre" > out/Release_x64< / span > < / code >
2017-09-20 02:35:05 +00:00
for release build).< / p >
2017-10-24 22:51:02 +00:00
< p > See < a class = "reference external" href = "https://google.github.io/shaka-packager/html/" > Shaka Packager Documentation< / a >
2020-01-22 00:59:16 +00:00
on how to use < code class = "docutils literal notranslate" > < span class = "pre" > Shaka< / span > < span class = "pre" > Packager< / span > < / code > .< / p >
2021-06-22 00:16:40 +00:00
< / section >
< section id = "update-your-checkout" >
2020-01-22 00:59:16 +00:00
< h3 > Update your checkout< a class = "headerlink" href = "#update-your-checkout" title = "Permalink to this headline" > ¶< / a > < / h3 >
2017-09-20 02:35:05 +00:00
< p > To update an existing checkout, you can run< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ git pull origin master --rebase
2017-09-20 02:35:05 +00:00
$ gclient sync
< / pre > < / div >
< / div >
< p > The first command updates the primary Packager source repository and rebases on
2020-01-22 00:59:16 +00:00
top of tip-of-tree (aka the Git branch < code class = "docutils literal notranslate" > < span class = "pre" > origin/master< / span > < / code > ). You can also use other
2017-09-20 02:35:05 +00:00
common Git commands to update the repo.< / p >
< p > The second command syncs dependencies to the appropriate versions and re-runs
hooks as needed.< / p >
2021-06-22 00:16:40 +00:00
< / section >
< / section >
< section id = "cross-compiling-for-arm-on-ubuntu-host" >
2020-01-22 00:59:16 +00:00
< h2 > Cross compiling for ARM on Ubuntu host< a class = "headerlink" href = "#cross-compiling-for-arm-on-ubuntu-host" title = "Permalink to this headline" > ¶< / a > < / h2 >
2017-09-20 02:35:05 +00:00
< p > The install-build-deps script can be used to install all the compiler
and library dependencies directly from Ubuntu:< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ ./packager/build/install-build-deps.sh
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
2020-01-22 00:59:16 +00:00
< p > Install sysroot image and others using < code class = "docutils literal notranslate" > < span class = "pre" > gclient< / span > < / code > :< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ < span class = "nv" > GYP_CROSSCOMPILE< / span > < span class = "o" > =< / span > < span class = "m" > 1< / span > < span class = "nv" > GYP_DEFINES< / span > < span class = "o" > =< / span > < span class = "s2" > " target_arch=arm" < / span > gclient runhooks
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
< p > The build command is the same as in Ubuntu:< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ ninja -C out/Release
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
2021-06-22 00:16:40 +00:00
< / section >
< section id = "notes-for-other-linux-distros" >
2020-01-22 00:59:16 +00:00
< h2 > Notes for other linux distros< a class = "headerlink" href = "#notes-for-other-linux-distros" title = "Permalink to this headline" > ¶< / a > < / h2 >
2021-06-22 00:16:40 +00:00
< section id = "alpine-linux" >
2020-01-22 00:59:16 +00:00
< h3 > Alpine Linux< a class = "headerlink" href = "#alpine-linux" title = "Permalink to this headline" > ¶< / a > < / h3 >
< p > Use < code class = "docutils literal notranslate" > < span class = "pre" > apk< / span > < / code > command to install dependencies:< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ apk add --no-cache bash build-base curl findutils git ninja python < span class = "se" > \< / span >
2018-12-20 22:38:40 +00:00
bsd-compat-headers linux-headers libexecinfo-dev
2018-08-20 17:47:59 +00:00
< / pre > < / div >
< / div >
< p > Alpine uses musl which does not have mallinfo defined in malloc.h. It is
required by one of Shaka Packager’ s dependency. To workaround the problem, a
dummy structure has to be defined in /usr/include/malloc.h, e.g.< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ sed -i < span class = "se" > \< / span >
2018-08-20 17:47:59 +00:00
< span class = "s1" > ' /malloc_usable_size/a \\nstruct mallinfo {\n int arena;\n int hblkhd;\n int uordblks;\n};' < / span > < span class = "se" > \< / span >
/usr/include/malloc.h
< / pre > < / div >
< / div >
< p > We also need to disable clang and some other features to make it work with musl:< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "nb" > export< / span > < span class = "nv" > GYP_DEFINES< / span > < span class = "o" > =< / span > < span class = "s1" > ' clang=0 use_experimental_allocator_shim=0 use_allocator=none musl=1' < / span >
2018-08-20 17:47:59 +00:00
< / pre > < / div >
< / div >
2021-06-22 00:16:40 +00:00
< / section >
< section id = "arch-linux" >
2020-01-22 00:59:16 +00:00
< h3 > Arch Linux< a class = "headerlink" href = "#arch-linux" title = "Permalink to this headline" > ¶< / a > < / h3 >
< p > Instead of running < code class = "docutils literal notranslate" > < span class = "pre" > sudo< / span > < span class = "pre" > apt-get< / span > < span class = "pre" > install< / span > < / code > to install build dependencies, run:< / p >
2021-04-10 04:00:37 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ sudo pacman -Sy --needed python2 git curl gcc gcc-libs make
2017-09-20 02:35:05 +00:00
$ sudo ln -sf python2 /usr/bin/python
< / pre > < / div >
< / div >
< p > Clang requires libtinfo.so.5 which is not available by default on Arch Linux.
You can get libtinfo from ncurses5-compat-libs in AUR:< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ git clone https://aur.archlinux.org/ncurses5-compat-libs.git
2017-09-20 02:35:05 +00:00
$ < span class = "nb" > cd< / span > ncurses5-compat-libs
$ gpg --keyserver pgp.mit.edu --recv-keys F7E48EDB
$ makepkg -si
< / pre > < / div >
< / div >
2018-08-20 17:47:59 +00:00
< p > Optionally, disable clang to build with gcc:< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ < span class = "nb" > export< / span > < span class = "nv" > GYP_DEFINES< / span > < span class = "o" > =< / span > < span class = "s1" > ' clang=0' < / span >
2018-08-20 17:47:59 +00:00
< / pre > < / div >
< / div >
2021-06-22 00:16:40 +00:00
< / section >
< section id = "debian" >
2020-01-22 00:59:16 +00:00
< h3 > Debian< a class = "headerlink" href = "#debian" title = "Permalink to this headline" > ¶< / a > < / h3 >
2017-09-20 02:35:05 +00:00
< p > Same as Ubuntu.< / p >
2021-06-22 00:16:40 +00:00
< / section >
< section id = "fedora" >
2020-01-22 00:59:16 +00:00
< h3 > Fedora< a class = "headerlink" href = "#fedora" title = "Permalink to this headline" > ¶< / a > < / h3 >
< p > Instead of running < code class = "docutils literal notranslate" > < span class = "pre" > sudo< / span > < span class = "pre" > apt-get< / span > < span class = "pre" > install< / span > < / code > to install build dependencies, run:< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ su -c < span class = "s1" > ' yum install -y git python git curl gcc-c++ findutils bzip2 \< / span >
2017-09-20 02:35:05 +00:00
< span class = "s1" > ncurses-compat-libs' < / span >
< / pre > < / div >
< / div >
2021-06-22 00:16:40 +00:00
< / section >
< section id = "opensuse" >
2020-01-22 00:59:16 +00:00
< h3 > OpenSUSE< a class = "headerlink" href = "#opensuse" title = "Permalink to this headline" > ¶< / a > < / h3 >
< p > Use < code class = "docutils literal notranslate" > < span class = "pre" > zypper< / span > < / code > command to install dependencies:< / p >
2021-06-22 00:16:40 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > sudo zypper < span class = "k" > in< / span > git python python-xml git curl gcc-c++ tar libncurses5
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
2021-06-22 00:16:40 +00:00
< / section >
< / section >
< section id = "tips-tricks-and-troubleshooting" >
2020-01-22 00:59:16 +00:00
< h2 > Tips, tricks, and troubleshooting< a class = "headerlink" href = "#tips-tricks-and-troubleshooting" title = "Permalink to this headline" > ¶< / a > < / h2 >
2021-06-22 00:16:40 +00:00
< section id = "xcode-license-agreement" >
2020-01-22 00:59:16 +00:00
< h3 > Xcode license agreement< a class = "headerlink" href = "#xcode-license-agreement" title = "Permalink to this headline" > ¶< / a > < / h3 >
2018-08-16 00:35:22 +00:00
< p > If you are getting the error< / p >
2017-09-20 02:35:05 +00:00
< blockquote >
2020-01-22 00:59:16 +00:00
< div > < p > Agreeing to the Xcode/iOS license requires admin privileges, please re-run as
root via sudo.< / p >
< / div > < / blockquote >
2018-08-16 00:35:22 +00:00
< p > the Xcode license has not been accepted yet which (contrary to the message) any
2017-09-20 02:35:05 +00:00
user can do by running:< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ xcodebuild -license
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
< p > Only accepting for all users of the machine requires root:< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ sudo xcodebuild -license
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
2021-06-22 00:16:40 +00:00
< / section >
< section id = "missing-curl-ca-bundle" >
2020-01-22 00:59:16 +00:00
< h3 > Missing curl CA bundle< a class = "headerlink" href = "#missing-curl-ca-bundle" title = "Permalink to this headline" > ¶< / a > < / h3 >
2018-08-16 00:35:22 +00:00
< p > If you are getting the error< / p >
< blockquote >
2020-01-22 00:59:16 +00:00
< div > < p > gyp: Call to ‘ config/mac/find_curl_ca_bundle.sh’ returned exit status 1 …< / p >
< / div > < / blockquote >
2018-08-16 00:35:22 +00:00
< p > curl CA bundle is not able to be located. Installing curl with openssl should
resolve the issue:< / p >
2020-01-22 00:59:16 +00:00
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ brew install curl --with-openssl
2018-08-16 00:35:22 +00:00
< / pre > < / div >
< / div >
2021-06-22 00:16:40 +00:00
< / section >
< section id = "using-an-ide" >
2021-04-10 04:00:37 +00:00
< h3 > Using an IDE< a class = "headerlink" href = "#using-an-ide" title = "Permalink to this headline" > ¶< / a > < / h3 >
< p > No specific instructions are available.< / p >
< p > You might find Gyp generators helpful. Output is not guaranteed to work.
Manual editing might be necessary.< / p >
< p > To generate CMakeLists.txt in out/Release and out/Debug use:< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ < span class = "nv" > GYP_GENERATORS< / span > < span class = "o" > =< / span > cmake gclient runhooks
< / pre > < / div >
< / div >
< p > To generate IDE project files in out/Release and out/Debug use:< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ < span class = "nv" > GYP_GENERATORS< / span > < span class = "o" > =< / span > eclipse gclient runhooks
$ < span class = "nv" > GYP_GENERATORS< / span > < span class = "o" > =< / span > xcode gclient runhooks
$ < span class = "nv" > GYP_GENERATORS< / span > < span class = "o" > =< / span > xcode_test gclient runhooks
$ < span class = "nv" > GYP_GENERATORS< / span > < span class = "o" > =< / span > msvs gclient runhooks
$ < span class = "nv" > GYP_GENERATORS< / span > < span class = "o" > =< / span > msvs_test gclient runhooks
< / pre > < / div >
< / div >
2021-06-22 00:16:40 +00:00
< / section >
< / section >
< section id = "contributing" >
2020-01-22 00:59:16 +00:00
< h2 > Contributing< a class = "headerlink" href = "#contributing" title = "Permalink to this headline" > ¶< / a > < / h2 >
2017-09-20 02:35:05 +00:00
< p > If you have improvements or fixes, we would love to have your contributions.
See https://github.com/google/shaka-packager/blob/master/CONTRIBUTING.md for
details.< / p >
< p > We have continue integration tests setup on pull requests. You can also verify
locally by running the tests manually.< / p >
< p > If you know which tests are affected by your change, you can limit which tests
2020-01-22 00:59:16 +00:00
are run using the < code class = "docutils literal notranslate" > < span class = "pre" > --gtest_filter< / span > < / code > arg, e.g.:< / p >
< div class = "highlight-shell notranslate" > < div class = "highlight" > < pre > < span > < / span > $ out/Debug/mp4_unittest --gtest_filter< span class = "o" > =< / span > < span class = "s2" > " MP4MediaParserTest.*" < / span >
2017-09-20 02:35:05 +00:00
< / pre > < / div >
< / div >
< p > You can find out more about GoogleTest at its
< a class = "reference external" href = "https://github.com/google/googletest" > GitHub page< / a > .< / p >
2021-06-22 00:16:40 +00:00
< / section >
< / section >
2017-09-20 02:35:05 +00:00
2021-04-10 04:00:37 +00:00
< div class = "clearer" > < / div >
2017-09-20 02:35:05 +00:00
< / div >
< / div >
< / div >
2021-04-10 04:00:37 +00:00
< div class = "sphinxsidebar" role = "navigation" aria-label = "main navigation" >
< div class = "sphinxsidebarwrapper" >
< h3 > < a href = "index.html" > Table of Contents< / a > < / h3 >
< ul >
< li > < a class = "reference internal" href = "#" > Build Instructions< / a > < ul >
< li > < a class = "reference internal" href = "#linux-build-dependencies" > Linux build dependencies< / a > < / li >
< li > < a class = "reference internal" href = "#mac-system-requirements" > Mac system requirements< / a > < / li >
< li > < a class = "reference internal" href = "#windows-system-requirements" > Windows system requirements< / a > < / li >
< li > < a class = "reference internal" href = "#install-depot-tools" > Install < code class = "docutils literal notranslate" > < span class = "pre" > depot_tools< / span > < / code > < / a > < ul >
< li > < a class = "reference internal" href = "#linux-and-mac" > Linux and Mac< / a > < / li >
< li > < a class = "reference internal" href = "#windows" > Windows< / a > < / li >
< / ul >
< / li >
< li > < a class = "reference internal" href = "#get-the-code" > Get the code< / a > < ul >
< li > < a class = "reference internal" href = "#build-shaka-packager" > Build Shaka Packager< / a > < ul >
< li > < a class = "reference internal" href = "#id1" > Linux and Mac< / a > < / li >
< li > < a class = "reference internal" href = "#id2" > Windows< / a > < / li >
< / ul >
< / li >
< li > < a class = "reference internal" href = "#build-artifacts" > Build artifacts< / a > < / li >
< li > < a class = "reference internal" href = "#update-your-checkout" > Update your checkout< / a > < / li >
< / ul >
< / li >
< li > < a class = "reference internal" href = "#cross-compiling-for-arm-on-ubuntu-host" > Cross compiling for ARM on Ubuntu host< / a > < / li >
< li > < a class = "reference internal" href = "#notes-for-other-linux-distros" > Notes for other linux distros< / a > < ul >
< li > < a class = "reference internal" href = "#alpine-linux" > Alpine Linux< / a > < / li >
< li > < a class = "reference internal" href = "#arch-linux" > Arch Linux< / a > < / li >
< li > < a class = "reference internal" href = "#debian" > Debian< / a > < / li >
< li > < a class = "reference internal" href = "#fedora" > Fedora< / a > < / li >
< li > < a class = "reference internal" href = "#opensuse" > OpenSUSE< / a > < / li >
< / ul >
< / li >
< li > < a class = "reference internal" href = "#tips-tricks-and-troubleshooting" > Tips, tricks, and troubleshooting< / a > < ul >
< li > < a class = "reference internal" href = "#xcode-license-agreement" > Xcode license agreement< / a > < / li >
< li > < a class = "reference internal" href = "#missing-curl-ca-bundle" > Missing curl CA bundle< / a > < / li >
< li > < a class = "reference internal" href = "#using-an-ide" > Using an IDE< / a > < / li >
< / ul >
< / li >
< li > < a class = "reference internal" href = "#contributing" > Contributing< / a > < / li >
< / ul >
< / li >
< / ul >
< h4 > Previous topic< / h4 >
< p class = "topless" > < a href = "library.html"
title="previous chapter">Shaka Packager Library< / a > < / p >
< h4 > Next topic< / h4 >
< p class = "topless" > < a href = "docker_instructions.html"
title="next chapter">Using Docker< / a > < / p >
< div role = "note" aria-label = "source link" >
< h3 > This Page< / h3 >
< ul class = "this-page-menu" >
< li > < a href = "_sources/build_instructions.md.txt"
rel="nofollow">Show Source< / a > < / li >
< / ul >
< / div >
< div id = "searchbox" style = "display: none" role = "search" >
< h3 id = "searchlabel" > Quick search< / h3 >
< div class = "searchformwrapper" >
< form class = "search" action = "search.html" method = "get" >
< input type = "text" name = "q" aria-labelledby = "searchlabel" / >
< input type = "submit" value = "Go" / >
< / form >
< / div >
< / div >
< script > $ ( '#searchbox' ) . show ( 0 ) ; < / script >
< / div >
< / div >
2017-09-20 02:35:05 +00:00
< div class = "clearer" > < / div >
< / div >
< div class = "related" role = "navigation" aria-label = "related navigation" >
< h3 > Navigation< / h3 >
< ul >
< li class = "right" style = "margin-right: 10px" >
< a href = "genindex.html" title = "General Index"
>index< / a > < / li >
< li class = "right" >
< a href = "docker_instructions.html" title = "Using Docker"
>next< / a > |< / li >
< li class = "right" >
< a href = "library.html" title = "Shaka Packager Library"
>previous< / a > |< / li >
2021-04-10 04:00:37 +00:00
< li class = "nav-item nav-item-0" > < a href = "index.html" > Shaka Packager documentation< / a > » < / li >
< li class = "nav-item nav-item-this" > < a href = "" > Build Instructions< / a > < / li >
2017-09-20 02:35:05 +00:00
< / ul >
< / div >
< div class = "footer" role = "contentinfo" >
© Copyright 2017, Google.
2021-06-22 00:16:40 +00:00
Created using < a href = "https://www.sphinx-doc.org/" > Sphinx< / a > 4.0.2.
2017-09-20 02:35:05 +00:00
< / div >
< / body >
< / html >