Although Native Client modules are platform independent, the instructions for installing and building Native Client differ a bit between platforms. This page has details about the Linux environment.
For instructions on installing and using Native Client, see Getting Started. That page and others, such as Building Native Client, link to this page as needed.
Native Client has been tested with the following Linux configurations:
scons
On Debian-based distributions such as Ubuntu, you can use the following command to get Python 2.4:
sudo apt-get install python2.4
Or use Synaptic (sudo synaptic
)
for a friendlier interface to APT.
You can also download Python from http://www.python.org/download/.
The path to python
must have no spaces.
You can use the which
command
to see the path:
$ which python /usr/bin/python
Native Client works best in 32-bit browsers. For instructions on using a 32-bit browser on a 64-bit Linux system, search for [linux 32-bit 64-bit browser].
An alternative is to use NSPluginWrapper (version 1.1.2 or newer), which makes the Native Client plug-in work in 64-bit browsers. Here's an example of the command you'd use:
/usr/bin/nspluginwrapper -i ~/.mozilla/plugins/libnpGoogleNaClPlugin.so
You might have to rerun that command when you install a new version of the plug-in.
Note: Avoid NSPluginWrapper if you need to run modules that depend on NPAPI. The performance impact of NSPluginWrapper's NPAPI forwarding can be huge.
If you're using a 32-bit system and not building the toolchain, you shouldn't have to do anything to set up your environment, thanks to the software that comes with most Linux systems.
To build the toolchain,
you need texinfo
.
On Debian-based distributions such as Ubuntu,
you can get texinfo
with the following command:
sudo apt-get install texinfo
To build on 64-bit Linux, you first need to run the prep script. Run this
script every time you download a new version of Native Client. (You could
get away with running the script just once, but if the script changes, you
should run it again.) Note: The script is Ubuntu-specific —
using apt-get
and Ubuntu file locations, for example. It might
not work if you have another distribution of Linux. Here's how to run the
script:
cd install_dir/build/native_client/tools ./linux.x86_64.prep.sh
You can also build Native Client in 64-bit mode, which could then be used with 64-bit browsers.
You should be able to build some clients as 32-bit and some clients as 64-bit on the same 64-bit Linux machine. Building a single client as both 32-bit and 64-bit is currently untested. You must not build 32-bit and 64-bit versions of the toolchain in the same client.
platform=x86-64
to
your ./scons
command:
./scons --mode=opt-linux,nacl platform=x86-64
sudo apt-get install libsdl1.2-dev
Except as otherwise noted, the content of this page is licensed under a Creative Commons Attribution 2.5 license.