Installation

Standard install procedure

To install Player in the default location (/usr/local), follow these steps:

  1. Download the latest Player source tarball (player-<version>.tgz) from SourceForge.

  2. Uncompress and expand the tarball:
    $ tar xzvf player-<version>.tgz

  3. `cd' into Player's source directory:
    $ cd player-<version>

  4. To configure Player with default settings:
    $ ./configure

  5. Compile Player:
    $ make

  6. Install Player. By default, Player will be installed in /usr/local so you need to become root for this step. Remember to return to your normal user ID afterwards.
    $ make install
    Executables (e.g., the Player utilities) are in /usr/local/bin, libraries (e.g., libplayercore, libplayerdrivers) are in /usr/local/lib, and so on.

pkg-config paths

The pkg-config meta-data files (they have the extension .pc) are installed by default to /usr/local/lib/pkgconfig. On some systems (notably RedHat), this directory is not in the default search path for pkg-config. You can check like so:

$ pkg-config --libs playercore

You should get something like (exact results vary by system):

-lplayercore -lltdl -lpthread -lplayererror

If instead you get this:

Package playercore was not found in the pkg-config search path.
Perhaps you should add the directory containing `playercore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'playercore' found

then you need to add /usr/local/lib/pkgconfig to your PKG_CONFIG_PATH. E.g., in bash:

$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

Otherwise you will not be able to compile programs that use any of Player's libraries.

Customized installations

Player follows the standard GNU autotools conventions for build and install options. To see a list of all the available configuration options, do this:

./configure --help

The --prefix option

The most important option is --prefix, used to change the installation directory from the default (which varies from system to system, but is usually /usr/local). Prefixes must be absolute paths, i.e. a complete path starting with a '/'.

For example, you might want to install Player in your home directory because you don't have root access:

$ ./configure --prefix=/home/gerkey/ps
$ make
$ make install

Now the executables are in /home/gerkey/ps/bin, the libraries are in /home/gerkey/ps/lib, and so on.

Note:
You may have to change various environment variables if you install Player somewhere other than the default location. Variables that may need modification include: PATH, LD_LIBRARY_PATH (or DYLD_LIBRARY_PATH on Mac OS X), and PKG_CONFIG_PATH. More information on local installations can be found here.

Selecting which drivers to build

By default, all drivers that can be built on your system will be compiled and linked into libplayerdrivers. The configure script determines which drivers will be built by running tests against your system to see which prerequisites are satisfied. You'll see output during these tests telling you what's going on. A summary is printed by configure when it's done, telling you which drivers will not be built, and why. You can check the file config.log for detailed information about which tests failed and why.

You can override this default behavior by passing options to configure to disable the compilation of certain drivers. For every driver foo, you can pass --disable-foo to configure. For example, to prevent compilation of the sicklms200 driver:

$ ./configure --disable-sicklms200

You can also pass --enable-foo to enable a driver foo that has been disabled by default. But keep in mind that such a driver is probably disabled for a reason; don't be surprised if it does not compile. And note that --enable-foo will not force compilation of a driver whose prerequisites have not been met.

A special option is provided to disable all drivers: --disable-alldrivers. This option is useful, for example, when building a small-footprint Player binary to run on an embedded system. You can combine this option with any number of --enable-foo options to get just the drivers you want without having to enumerate the ones that you don't want. For example, to build just the p2os and sicklms200 drivers:

$ ./configure --disable-alldrivers --enable-p2os --enable-sicklms200

The order of these options on the command line does not matter. The --disable-alldrivers option, if present anywhere on the command line, is processed first. Then any --enable-foo options are processed.


Last updated 12 September 2005 21:38:45