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