annotate src/vamp-plugin-sdk-2.4/build/README.linux @ 160:cff480c41f97

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