annotate src/vamp-plugin-sdk-2.5/build/README.linux @ 111:585a7be09763

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