annotate src/vamp-plugin-sdk-2.4/build/README.linux @ 12:b7bda433d832

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