view build/README.linux @ 523:e0ff22b3c888 c++11-mutex

Toward making PluginAdapterBase::Impl actually thread-safe!
author Chris Cannam
date Fri, 16 Aug 2019 10:18:37 +0100
parents 2e16d99867bd
children
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.


Test Your Plugins
-----------------

The Vamp Plugin Tester is a vital utility which you can use to test
your plugins for common problems.  It can help you if you're having
problems getting your plugin to work at all, and you're strongly
advised to use it before you release anything.  Download it from the
Vamp plugins site now!