Tidy ups of mapping code
[nativeclient.git] / documentation / platform-linux.html
blob7100c571dd3ef2d61eb569a28162d544d7f1452d
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>Platform Details: Linux</title>
6 <link href="stylesheet.css" type="text/css" rel="stylesheet"></link>
7 </head>
9 <body>
11 <div id="toplink">
12 <a href="../README.html">Back to README</a>
13 </div>
15 <h1>Platform Details: Linux</h1>
17 <p>
18 Although Native Client modules are platform independent,
19 the instructions for installing and building Native Client
20 differ a bit between platforms.
21 This page has details about the Linux environment.
22 </p>
24 <p>
25 For instructions on installing and using Native Client,
26 see <a href="getting_started.html">Getting Started</a>.
27 That page and others,
28 such as <a href="building.html">Building Native Client</a>,
29 link to this page as needed.
30 </p>
32 <h3>
33 Contents:
34 </h3>
36 <ul>
37 <li><a href="#testedconfigs">Tested configurations</a> </li>
38 <li> <a href="#run">Running on Linux</a>
39 <ul>
40 <li><a href="#run-python">Getting Python</a> </li>
41 <li><a href="#run-pythonpath">Checking the Python path</a> </li>
42 <li><a href="#run-64bit">64-bit Linux: 32-bit vs. 64-bit browsers</a>
43 </li>
44 </ul></li>
45 <li> <a href="#dev">Developing on Linux</a>
46 <ul>
47 <li><a href="#dev-env">Setting up your development environment</a></li>
48 <li><a href="#dev-64bit">64-bit Linux: prep script</a></li>
49 </ul></li>
50 </ul>
52 <h2> <a name="testedconfigs" id="testedconfigs"> </a> Tested configurations </h2>
53 <p>
54 Native Client has been tested with the following Linux configurations:
55 </p>
57 <ul>
58 <li> OS
59 <ul>
60 <li> Ubuntu 8.04 <!-- and soon 8.10 --> (Hardy Heron): 32-bit and 64-bit </li>
61 </ul></li>
62 <li> Browser
63 <ul>
64 <li> Firefox 3 </li>
65 </ul> </li>
66 <li> Python
67 <ul>
68 <li> 2.4 </li>
69 <li> 2.5 </li>
70 </ul> </li>
71 </ul>
74 <h2><a name="run" id="run"> </a> Running on Linux </h2>
76 <h3><a name="run-python" id="run-python"> </a> Getting Python </h3>
78 <p>
79 On Debian-based distributions such as Ubuntu,
80 you can use the following command to get Python 2.4:
81 </p>
83 <pre class="platform-linux">
84 <kbd>sudo apt-get install python2.4</kbd>
85 </pre>
87 <p>
88 Or use Synaptic (<code>sudo synaptic</code>)
89 for a friendlier interface to APT.
90 </p>
92 <p>
93 You can also download Python from
94 <a href="http://www.python.org/download/">http://www.python.org/download/</a>.
95 </p>
97 <h3><a name="run-pythonpath" id="run-pythonpath"> </a> Checking the Python path </h3>
99 <p>
100 The path to <code>python</code> must have <b>no spaces</b>.
101 You can use the <code>which</code> command
102 to see the path:
103 </p>
105 <pre>
106 $ <kbd>which python</kbd>
107 /usr/bin/python
108 </pre>
110 <h3><a name="run-64bit" id="run-64bit"> </a> 64-bit Linux: 32-bit vs. 64-bit browsers </h3>
113 Native Client works best in 32-bit browsers.
114 For instructions on using a 32-bit browser on a 64-bit Linux system, search for
115 [<a href="http://www.google.com/search?&amp;q=linux+32-bit+64-bit+browser">linux 32-bit 64-bit browser</a>].
116 </p>
119 An alternative is to use
120 <a href="http://gwenole.beauchesne.info/en/projects/nspluginwrapper">NSPluginWrapper</a>
121 (version 1.1.2 or newer),
122 which makes the Native Client plug-in work
123 in 64-bit browsers.
124 Here's an example of the command you'd use:
125 </p>
127 <pre>
128 <kbd>/usr/bin/nspluginwrapper -i ~/.mozilla/plugins/libnpGoogleNaClPlugin.so</kbd>
129 </pre>
132 You might have to rerun that command
133 when you install a new version of the plug-in.
134 </p>
137 <strong>Note:</strong>
138 Avoid NSPluginWrapper if you need to run modules that depend on NPAPI.
139 The performance impact of NSPluginWrapper's NPAPI forwarding can be huge.
140 </p>
142 <h2><a name="dev"> </a> Developing on Linux </h2>
144 <h3><a name="dev-env" id="dev-env"> </a> Setting up your development environment </h3>
147 If you're using a 32-bit system,
148 you shouldn't have to do anything to set up your environment,
149 thanks to the software that comes with
150 most Linux systems.
151 </p>
154 If you're using a 64-bit system,
155 you need to run a prep script.
156 </p>
158 <h3><a name="dev-64bit" id="dev-64bit"> </a> 64-bit Linux: prep script </h3>
161 To build on 64-bit Linux, you first need to run the prep script.
162 Run this script
163 every time you download a new version of Native Client.
164 (You could get away with running the script just once,
165 but if the script changes,
166 you should run it again.)
167 Here's how to run the script:
168 </p>
170 <pre class="platform-linux">
171 <kbd>cd <em>install_dir</em>/nacl/googleclient/native_client/tools</kbd>
172 <kbd>./linux.x86_64.prep.sh</kbd>
173 </pre>
176 <b>Note:</b>
177 The script is Ubuntu-specific &mdash;
178 using <code>apt-get</code> and Ubuntu file locations, for example.
179 It might not work
180 if you have another distribution of Linux.
181 </p>
185 <p id="license">
186 Except as otherwise
187 <a href="http://code.google.com/policies.html#restrictions">noted</a>,
188 the content of this page is licensed under a
189 <a href="http://creativecommons.org/licenses/by/2.5/">Creative Commons
190 Attribution 2.5 license</a>.
191 </p>
193 </body>
194 </html>