annotate build/README.osol @ 322:71b69f569f52

Update CHANGELOG
author Chris Cannam
date Wed, 28 Sep 2011 16:25:13 +0100
parents 2e16d99867bd
children
rev   line source
cannam@291 1
cannam@291 2 The Vamp Plugin SDK -- Platform Notes for OpenSolaris with SunStudio Compilers
cannam@291 3 ==============================================================================
cannam@291 4
cannam@291 5 Building at the command line
cannam@291 6 ----------------------------
cannam@291 7
cannam@291 8 To build the SDK, example plugins, and command-line host using the
cannam@291 9 SunStudio C++ compiler (CC) with the Cstd standard library:
cannam@291 10
cannam@291 11 $ make -f build/Makefile.osol
cannam@291 12
cannam@291 13 You must have libsndfile (http://www.mega-nerd.com/libsndfile/)
cannam@291 14 installed in order to build the command-line host successfully. To
cannam@291 15 build only the SDK and examples:
cannam@291 16
cannam@291 17 $ make -f build/Makefile.osol sdk examples
cannam@291 18
cannam@291 19 See the comments at the top of Makefile.osol for more information about
cannam@291 20 the libraries and other targets that are built in this way.
cannam@291 21
cannam@291 22 To install the libraries:
cannam@291 23
cannam@291 24 $ make -f build/Makefile.osol install
cannam@291 25
cannam@291 26 with the appropriate privileges (via pfexec or sudo).
cannam@291 27
cannam@291 28
cannam@291 29 Installing the Example Plugins
cannam@291 30 ------------------------------
cannam@291 31
cannam@291 32 To install the example plugins so you can load them in Vamp hosts,
cannam@291 33 copy the files
cannam@291 34
cannam@291 35 examples/vamp-example-plugins.so
cannam@291 36 and
cannam@291 37 examples/vamp-example-plugins.cat
cannam@291 38
cannam@291 39 to
cannam@291 40 /usr/local/lib/vamp/
cannam@291 41 or
cannam@291 42 $HOME/vamp/
cannam@291 43
cannam@291 44
cannam@291 45 Plugin Linkage
cannam@291 46 --------------
cannam@291 47
cannam@291 48 Vamp plugins are distributed as dynamic libraries (.so files). A
cannam@291 49 properly packaged Vamp plugin library should export exactly one public
cannam@291 50 symbol, namely the Vamp API entry point vampGetPluginDescriptor.
cannam@291 51
cannam@291 52 The default for the Sun linker is to export all of the symbols in the
cannam@291 53 library. This will work (the host will be able to load the plugin),
cannam@291 54 but it unnecessarily pollutes the host's symbol namespace, it may
cannam@291 55 cause symbol collisions in some esoteric circumstances, and it
cannam@291 56 increases the amount of time the plugin takes to load.
cannam@291 57
cannam@291 58 To improve this behaviour, you can instruct the linker to export only
cannam@291 59 the one required symbol using a linker script. To do this, place the
cannam@291 60 text
cannam@291 61
cannam@291 62 {
cannam@291 63 global: vampGetPluginDescriptor;
cannam@291 64 local: *;
cannam@291 65 };
cannam@291 66
cannam@291 67 into a text file, and then use the -M mapfile option to the
cannam@291 68 linker to tell it to refer to this file. All other symbols will then
cannam@291 69 be properly hidden.
cannam@291 70
cannam@291 71 The Makefile included in this SDK uses this method to manage symbol
cannam@291 72 visibility for the included example plugins, using the file
cannam@291 73 build/vamp-plugin.map.
cannam@291 74
cannam@291 75
cannam@291 76 Test Your Plugins
cannam@291 77 -----------------
cannam@291 78
cannam@291 79 The Vamp Plugin Tester is a vital utility which you can use to test
cannam@291 80 your plugins for common problems. It can help you if you're having
cannam@291 81 problems getting your plugin to work at all, and you're strongly
cannam@291 82 advised to use it before you release anything. Download it from the
cannam@291 83 Vamp plugins site now!
cannam@291 84