view build/README.linux @ 274:33feff966de3

* Fix an infinite loop that occurs with some features
author cannam
date Fri, 12 Dec 2008 14:28:42 +0000
parents 683f4bc92a69
children 2e16d99867bd
line wrap: on
line source

The Vamp Plugin SDK -- Platform Notes for Linux and other GNU platforms
=======================================================================

Building at the command line
----------------------------

To build the SDK, example plugins, and command-line host:

$ ./configure
$ make

To install after a successful make, run "make install" as root (or via
sudo).


Installing the Example Plugins
------------------------------

To install the example plugins so you can load them in Vamp hosts,
copy the files

   examples/vamp-example-plugins.so
and
   examples/vamp-example-plugins.cat

to
   /usr/local/lib/vamp/
or 
   $HOME/vamp/


Plugin Linkage
--------------

Vamp plugins are distributed as dynamic libraries (.so files).  A
properly packaged Vamp plugin library should export exactly one public
symbol, namely the Vamp API entry point vampGetPluginDescriptor.

The default for the GNU linker is to export all of the symbols in the
library.  This will work (the host will be able to load the plugin),
but it unnecessarily pollutes the host's symbol namespace, it may
cause symbol collisions in some esoteric circumstances, and it
increases the amount of time the plugin takes to load.

To improve this behaviour, you can instruct the linker to export only
the one required symbol using a linker script.  To do this, place the
text

{
	global: vampGetPluginDescriptor;
	local: *;
};

into a text file, and then use the --version-script option to the
linker to tell it to refer to this file.  All other symbols will then
be properly hidden.

The Makefile included in this SDK uses this method to manage symbol
visibility for the included example plugins, using the file
build/vamp-plugin.map.  There are other methods that will work too,
but this one is simple and has the advantage of requiring no changes
to the code.