view build/README.linux @ 239:cc467e52da4c

* Add platform README files
author cannam
date Mon, 10 Nov 2008 12:39:19 +0000
parents
children 683f4bc92a69
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, first edit
the Makefile to suit your platform according to the comments in it,
then run "make".

Note that you must have libsndfile
(http://www.mega-nerd.com/libsndfile/) installed in order to build the
command-line host successfully.  To build only the SDK and examples,
run "make sdk examples" instead of just "make".


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.