annotate src/vamp-plugin-sdk-2.5/build/README.linux @ 23:619f715526df sv_v2.1

Update Vamp plugin SDK to 2.5
author Chris Cannam
date Thu, 09 May 2013 10:52:46 +0100
parents
children
rev   line source
Chris@23 1
Chris@23 2 The Vamp Plugin SDK -- Platform Notes for Linux and other GNU platforms
Chris@23 3 =======================================================================
Chris@23 4
Chris@23 5 Building at the command line
Chris@23 6 ----------------------------
Chris@23 7
Chris@23 8 To build the SDK, example plugins, and command-line host:
Chris@23 9
Chris@23 10 $ ./configure
Chris@23 11 $ make
Chris@23 12
Chris@23 13 To install after a successful make, run "make install" as root (or via
Chris@23 14 sudo).
Chris@23 15
Chris@23 16
Chris@23 17 Installing the Example Plugins
Chris@23 18 ------------------------------
Chris@23 19
Chris@23 20 To install the example plugins so you can load them in Vamp hosts,
Chris@23 21 copy the files
Chris@23 22
Chris@23 23 examples/vamp-example-plugins.so
Chris@23 24 and
Chris@23 25 examples/vamp-example-plugins.cat
Chris@23 26
Chris@23 27 to
Chris@23 28 /usr/local/lib/vamp/
Chris@23 29 or
Chris@23 30 $HOME/vamp/
Chris@23 31
Chris@23 32
Chris@23 33 Plugin Linkage
Chris@23 34 --------------
Chris@23 35
Chris@23 36 Vamp plugins are distributed as dynamic libraries (.so files). A
Chris@23 37 properly packaged Vamp plugin library should export exactly one public
Chris@23 38 symbol, namely the Vamp API entry point vampGetPluginDescriptor.
Chris@23 39
Chris@23 40 The default for the GNU linker is to export all of the symbols in the
Chris@23 41 library. This will work (the host will be able to load the plugin),
Chris@23 42 but it unnecessarily pollutes the host's symbol namespace, it may
Chris@23 43 cause symbol collisions in some esoteric circumstances, and it
Chris@23 44 increases the amount of time the plugin takes to load.
Chris@23 45
Chris@23 46 To improve this behaviour, you can instruct the linker to export only
Chris@23 47 the one required symbol using a linker script. To do this, place the
Chris@23 48 text
Chris@23 49
Chris@23 50 {
Chris@23 51 global: vampGetPluginDescriptor;
Chris@23 52 local: *;
Chris@23 53 };
Chris@23 54
Chris@23 55 into a text file, and then use the --version-script option to the
Chris@23 56 linker to tell it to refer to this file. All other symbols will then
Chris@23 57 be properly hidden.
Chris@23 58
Chris@23 59 The Makefile included in this SDK uses this method to manage symbol
Chris@23 60 visibility for the included example plugins, using the file
Chris@23 61 build/vamp-plugin.map. There are other methods that will work too,
Chris@23 62 but this one is simple and has the advantage of requiring no changes
Chris@23 63 to the code.
Chris@23 64
Chris@23 65
Chris@23 66 Test Your Plugins
Chris@23 67 -----------------
Chris@23 68
Chris@23 69 The Vamp Plugin Tester is a vital utility which you can use to test
Chris@23 70 your plugins for common problems. It can help you if you're having
Chris@23 71 problems getting your plugin to work at all, and you're strongly
Chris@23 72 advised to use it before you release anything. Download it from the
Chris@23 73 Vamp plugins site now!
Chris@23 74