1 {{+bindTo:partials.standard_nacl_article}}
3 <section id=
"download-the-native-client-sdk">
4 <span id=
"download"></span><h1 id=
"download-the-native-client-sdk"><span id=
"download"></span>Download the Native Client SDK
</h1>
5 <p>To build Native Client modules, you must download and install the Native Client
6 Software Development Kit (SDK). This page provides an overview of the Native
7 Client SDK, and instructions for how to download and install the SDK.
</p>
9 <a class=
"button-nacl button-download" href=
"http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">Download SDK Zip File
</a>
10 </div><h2 id=
"overview">Overview
</h2>
11 <p>The Native Client SDK includes the following:
</p>
12 <ul class=
"small-gap">
13 <li><strong>Support for multiple Pepper versions
</strong> to compile for specific minimum
14 versions of Chrome.
</li>
15 <li><strong>Update utility
</strong> to download new bundles that are available, as well as new
16 versions of existing bundles.
</li>
17 <li><strong>Toolchains
</strong> to compile for Portable Native Client (PNaCl), traditional
18 Native Client (NaCl), and for compiling architecture-specific Native Client
19 applications with glibc.
</li>
20 <li><strong>Examples
</strong> Including C or C++ source files and header files illustrating
21 how to use NaCl and Pepper, and Makefiles to build the example with each of
23 <li><strong>Tools
</strong> for validating Native Client modules and running modules from the
26 <p>Follow the steps below to download and install the Native Client SDK.
</p>
27 <h2 id=
"prerequisites">Prerequisites
</h2>
28 <ul class=
"small-gap">
29 <li><p class=
"first"><strong>Python
2.6 or
2.7:
</strong> Make sure that the Python executable is in your path.
30 Python
2.7 is preferred. Python
3.x is not yet supported.
</p>
31 <ul class=
"small-gap">
32 <li>On Mac and Linux, Python is likely preinstalled. Run the command
“<code>python
33 -V
</code>” in a terminal window, and make sure that the version you have is
2.6.x
35 <li>On Windows, you may need to install Python. Go to
36 <a class=
"reference external" href=
"http://www.python.org/download/">http://www.python.org/download/
</a> and
37 select the latest
2.x version. In addition, be sure to add the Python
38 directory (for example,
<code>C:\python27
</code>) to the PATH
<a class=
"reference external" href=
"http://en.wikipedia.org/wiki/Environment_variable">environment
40 “<code>python -V
</code>” from a command line to verify that you properly configured
41 the PATH variable.
</li>
44 <li><strong>Make:
</strong> On the Mac, you need to install the
<code>make
</code> command on your system
45 before you can build and run the examples in the SDK. One easy way to get
46 <code>make
</code>, along with several other useful tools, is to install
47 <a class=
"reference external" href=
"https://developer.apple.com/technologies/tools/">Xcode Developer Tools
</a>.
48 After installing Xcode, go to the XCode menu, open the Preferences dialog box
49 then select Downloads and Components. Verify that Command Line Tools are
50 installed. If you
’d rather not install Xcode, you can download and build an
51 <a class=
"reference external" href=
"http://mac.softpedia.com/dyn-postdownload.php?p=44632&t=4&i=1">open source version
</a> of
<code>make
</code>.
52 To build the command you may also need to download and install
53 <a class=
"reference external" href=
"https://github.com/kennethreitz/osx-gcc-installer">gcc
</a>.
</li>
55 <h2 id=
"installing-the-sdk">Installing the SDK
</h2>
57 <li><p class=
"first">Download the SDK update zip file:
<a class=
"reference external" href=
"http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">nacl_sdk.zip
</a>.
</p>
59 <li><p class=
"first">Unzip the file:
</p>
60 <ul class=
"small-gap">
61 <li><p class=
"first">On Mac/Linux, run the command
“<code>unzip nacl_sdk.zip
</code>” in a terminal
64 <li><p class=
"first">On Windows, right-click on the .zip file and select
“Extract All...
”. A
65 dialog box will open; enter a location and click
“Extract
”.
</p>
68 <p>A directory is created called
<code>nacl_sdk
</code> with the following files and
70 <ul class=
"small-gap">
71 <li><p class=
"first"><code>naclsdk
</code> (and
<code>naclsdk.bat
</code> for Windows)
— the update utility,
72 which is the command you run to download and update bundles.
</p>
74 <li><p class=
"first"><code>sdk_cache
</code> — a directory with a manifest file that lists the bundles
75 you have already downloaded.
</p>
77 <li><p class=
"first"><code>sdk_tools
</code> — the code run by the
<code>naclsdk
</code> command.
</p>
82 <h2 id=
"installing-bundles">Installing bundles
</h2>
84 <li><p class=
"first">To see the SDK bundles that are available for download, go to the
85 <code>nacl_sdk
</code> directory and run
<code>naclsdk
</code> with the
“<code>list
</code>” command. The
86 SDK includes a separate bundle for each version of Chrome/Pepper.
</p>
88 <pre class=
"prettyprint">
93 <pre class=
"prettyprint">
97 <p>You should see output similar to this:
</p>
98 <pre class=
"prettyprint">
105 pepper_31 (post_stable)
106 pepper_32 (post_stable)
107 pepper_33 (post_stable)
108 pepper_34 (post_stable)
112 pepper_canary (canary)
113 bionic_canary (canary)
115 <p>The sample output above shows that several bundles are available for
116 download, and that you have already installed the latest revision of the
117 <code>sdk_tools
</code> bundle. (It was included in the zip file you downloaded.) Each
118 bundle is labeled post-stable, stable, beta, dev, or canary. These labels
119 usually correspond to the current versions of Chrome.
</p>
120 <p>We recommend that you download and use a
“stable
” bundle, because
121 applications developed with
“stable
” bundles can be used by all current
122 Chrome users. This is because Native Client is designed to be
123 backward-compatible (for example, applications developed with the
124 <code>pepper_31
</code> bundle can run in Chrome
31, Chrome
32, etc.).
</p>
126 <li><p class=
"first">Run
<code>naclsdk
</code> with the
“update
” command to download recommended bundles.
</p>
128 <pre class=
"prettyprint">
132 <pre class=
"prettyprint">
135 <p>By default,
<code>naclsdk
</code> only downloads bundles that are recommended
—
136 generally those that are
“stable.
” Continuing with the earlier example, the
137 “update
” command would only download the
<code>pepper_35
</code> bundle, since the
138 bundles
<code>pepper_36
</code> and greater are not yet stable. If you want the
139 <code>pepper_36
</code> bundle, you must ask for it explicitly:
</p>
140 <pre class=
"prettyprint">
141 $ ./naclsdk update pepper_36
147 <div>You never need to update the
<code>sdk_tools
</code> bundle. It is updated
148 automatically (if necessary) whenever you run
<code>naclsdk
</code>.
</div></blockquote>
151 <h2 id=
"updating-bundles">Updating bundles
</h2>
153 <li><p class=
"first">Run
<code>naclsdk
</code> with the
“list
” command. This shows you the list of available
154 bundles and verifies which bundles you have installed.
</p>
156 <pre class=
"prettyprint">
160 <pre class=
"prettyprint">
163 <p>If an update is available, you
’ll see something like this.:
</p>
164 <pre class=
"prettyprint">
171 pepper_31 (post_stable)
172 pepper_32 (post_stable)
173 pepper_33 (post_stable)
174 pepper_34 (post_stable)
175 I* pepper_35 (stable)
178 pepper_canary (canary)
179 bionic_canary (canary)
181 <p>An asterisk next to a bundle indicates that there is an update available it.
182 If you run
“<code>naclsdk update
</code>” now, it warns you with a message similar to
184 <pre class=
"prettyprint">
185 WARNING: pepper_35 already exists, but has an update available. Run update
186 with the --force option to overwrite the existing directory. Warning: This
187 will overwrite any modifications you have made within this directory.
190 <li><p class=
"first">To download and install the new bundle, run:
</p>
192 <pre class=
"prettyprint">
193 $ ./naclsdk update --force
196 <pre class=
"prettyprint">
197 > naclsdk update --force
201 <h2 id=
"help-with-the-naclsdk-utility">Help with the
<code>naclsdk
</code> utility
</h2>
203 <li><p class=
"first">For more information about the
<code>naclsdk
</code> utility, run:
</p>
205 <pre class=
"prettyprint">
209 <pre class=
"prettyprint">
214 <p><strong>Next steps:
</strong></p>
215 <ul class=
"small-gap">
216 <li>Browse through the
<a class=
"reference external" href=
"release-notes">Release Notes
</a> for important
217 information about the SDK and new bundles.
</li>
218 <li>If you
’re just starting with Native Client, we recommend reading the
219 <a class=
"reference external" href=
"../overview">Technical Overview
</a> and walking through the
220 <a class=
"reference external" href=
"/devguide/tutorial/tutorial-part1">Getting Started Tutorial
</a>.
</li>
221 <li>If you
’d rather dive into information about the toolchains, see
222 <a class=
"reference external" href=
"/devguide/devcycle/building">Building Native Client Modules
</a>.
</li>
226 {{/partials.standard_nacl_article}}