/[svn]/web/trunk/www.linuxsampler.org/debian.html
ViewVC logotype

Annotation of /web/trunk/www.linuxsampler.org/debian.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2178 - (hide annotations) (download) (as text)
Fri Jun 3 14:41:39 2011 UTC (9 years, 1 month ago) by persson
File MIME type: text/html
File size: 14250 byte(s)
* changed CVS references to Subversion
1 schoenebeck 1674 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2     <html>
3     <head>
4     <meta content="text/html; charset=ISO-8859-1"
5     http-equiv="content-type">
6     <title>LinuxSampler for Debian</title>
7     <link rel="shortcut icon" href="http://download.linuxsampler.org/favicon.ico" type="image/x-icon">
8     <link rel="stylesheet" type="text/css" href="libgig/css/content.css" title="content" media="all">
9     </head>
10     <body>
11     <h2><center>LinuxSampler for Debian &nbsp; <img src="gfx/logos/debian.png"> &nbsp; HOWTO by Christian Schoenebeck&nbsp;</center></h2>
12     <br>
13     <center>February&nbsp;7th,&nbsp;2008</center><br>
14     <div style="background-color: #F4F4FF; margin: 1em 3em 1em 3em; padding: 1em 1em 1em 2.2em;">
15     <a href="#intro">1.&nbsp; Introduction</a><br>
16     <a href="#requirements">2.&nbsp; Requirements</a><br>
17     <a href="#build_backend">3.&nbsp; Building the Backend</a><br>
18     <a href="#benchmark">4.&nbsp; Benchmark</a><br>
19     <a href="#build_frontends">5.&nbsp; Building the Frontend(s) and Instrument Editor</a><br>
20     <a href="#houston">6.&nbsp; Troubleshooting</a><br>
21     <a href="#docs">7.&nbsp; Detailed Documentation</a><br>
22     <a href="#bugs">8.&nbsp; Bugs, Problems and Feature Requests</a><br>
23     <a href="#contact">9.&nbsp; Contact</a><br>
24     </div>
25 senoner 1983 <p>
26     <center>
27     <script type="text/javascript"><!--
28     google_ad_client = "pub-3408196773880325";
29     /* 728x90, created 8/3/09 */
30     google_ad_slot = "7744776541";
31     google_ad_width = 728;
32     google_ad_height = 90;
33     //-->
34     </script>
35     <script type="text/javascript"
36     src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
37     </script>
38     </center>
39     </p>
40 schoenebeck 1674
41     <a name="intro"></a>
42     <h3>1.&nbsp; Introduction</h3>
43     There are two ways to install LS &amp; friends on your Debian system. You can
44     either <a href="http://linuxsampler.org/downloads.html">download</a> and
45     install our precompiled Debian binary packages (x86 only), or you can compile
46     those Debian packages by yourself. Our precompiled Debian packages are cooked
47     for the latest Debian <i>stable</i> distribution (a.k.a. <i>"etch"</i>).
48     Installing them is pretty easy. Just download the latest versions of the
49     Debian binary packages from our server and install them (as root) with:
50     <pre>
51     dpkg -i REPLACE_BY_DEB_FILE
52     </pre>
53     However we recommend you to recompile at least libgig and LinuxSampler
54     (the backend) by yourself, to get the maximum performance out of your box
55     (because libgig and LinuxSampler are the software components which take the
56     most of your machine's resources under heavy setups which you're probably
57     going to do). Another reason at the moment for you to recompile them is when
58     you have an old machine that doesn't support
59     <a href="http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions">SSE</a>
60     instructions. Because the latest Debian binary packages were accidently
61     compiled with using
62     <a href="http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions">SSE</a>
63     floating point instructions (see
64     <a href="https://bugs.linuxsampler.org/cgi-bin/show_bug.cgi?id=71">bug report #71</a>).
65     In the latter case, linuxsampler would die with a
66     <i>"FATAL ERROR: Illegal instruction (SIGILL) occured!"</i> error message.
67     We're going to address this Debian binary issue with the next
68     LS (LinuxSampler) release. And of course, if you don't have a x86 based
69     system, you currently have to build the Debian packages by yourself as
70     well.<br>
71     <br>
72     So this HOWTO is focused on how to cook optimized Debian packages of
73     LS &amp; friends for your specific system. Of course you could also
74     compile everything the old fashioned way, that is:
75     <pre>
76     cd SOURCEDIR
77     make -f Makefile.cvs
78     ./configure
79     make
80     su
81     make install
82     </pre>
83     But many users who use a Debian based system (e.g. Ubuntu) prefer
84     (building and) installing Debian packages, since it's cleaner for their
85     environment and, which is probably more important to you, the Debian
86     packaging mechanism takes care of compile time and runtime library
87     dependencies etc.
88    
89     <a name="requirements"></a>
90     <h3>2.&nbsp; Requirements</h3>
91     <ul>
92     <li>g++ (the GNU C++ compiler, 4.x recommended)</li>
93     <li>debhelper (Debian package build tools)</li>
94     <li>pkg-config (manages compiler and linker flags for libraries)</li>
95     <li>automake (automatic Makefile builder, 1.5 or higher required)</li>
96     <li>autoconf (automatic configure script builder)</li>
97     <li>libtool (generic library build tool)</li>
98     <li>fakeroot (required to build Debian packages as ordinary user)</li>
99     <li>couple more ... :-)</li>
100     </ul>
101     Each of the software components you're going to compile will have additional
102     requirements, but we'll address this later. The ones mentioned above are
103     absolute prerequisites for continueing, so make sure you have them installed.
104     If not, do so now (as root):
105     <pre>
106     apt-get install g++ debhelper pkg-config automake1.8 libtool fakeroot
107     </pre>
108     If this is the first Debian packages you're going to build, you may wonder
109     about the <i>fakeroot</i> tool. This is needed to "fool" the Debian
110     packaging tools that we're compiling as root. Because usually you don't
111     actually want to compile things as root, but the Debian packaging scripts
112     expect it.
113    
114     <a name="build_backend"></a>
115     <h3>3.&nbsp; Building the Backend</h3>
116 persson 2178 Grab the source code files of libgig (e.g. from our Subversion server, as
117 schoenebeck 1674 described on the
118     <a href="http://linuxsampler.org/downloads.html">downloads site</a>). Then you
119 schoenebeck 1856 should optimize the compilation flags for your machine. This really depends
120 schoenebeck 1674 on what kind of CPU and other hardware you use. Open the file <i>debian/rules</i> of
121     the libgig sources in a text editor and watch out for the following line:
122     <pre>
123     ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
124     </pre>
125 schoenebeck 1856 This is the line where you'll place all your optimization options. Remove the
126     arguments --host and --build which are only meant for cross compilation and
127     prefix the line with your preferred optimization flags. So, for a Pentium4
128 schoenebeck 1674 machine it could look like:
129     <pre>
130     CXXFLAGS="-O3 -msse -march=pentium4 -mfpmath=sse -ffast-math -fomit-frame-pointer -funroll-loops" ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
131     </pre>
132 schoenebeck 1856 save the file and finally you can start the build process (as ordinary user) with:
133 schoenebeck 1674 <pre>
134     dpkg-buildpackage -rfakeroot -b
135     </pre>
136     from the libgig source directory, which should compile and build the .deb
137     files for you. In case it immediately aborts with the following error
138     message:
139     <pre>
140     Unmet build dependencies: ...
141     </pre>
142 schoenebeck 1856 Simply install the requested packages with "apt-get install" (or whatever you
143     prefer for package installation) and call the dpkg-buildpackage command
144     again. After a minute or so it should have left 3 .deb files one directory
145     above your libgig source directory. Install those 3 .deb files now, i.e. with
146 schoenebeck 1674 dpkg (as root):
147     <pre>
148     dpkg -i libgig_3.2.1-1_i386.deb libgig-dev_3.2.1-1_i386.deb
149     dpkg -i gigtools_3.2.1-1_i386.deb
150     </pre>
151 schoenebeck 1856 and now repeat these steps for LS. That is grab the LS sources, edit the
152     debian/rules files at the similar configure line. The only difference with LS
153 schoenebeck 1674 is that you have much more options now. For example on a recent Pentium4 machine,
154     the LS compile time options in LS's <i>debian/rules</i> file could become:
155     <pre>
156     CXXFLAGS="-O3 -msse -march=pentium4 -mfpmath=sse -ffast-math -fomit-frame-pointer -funroll-loops" ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-refill-streams=2 --enable-stream-size=320000 --enable-preload-samples=65536 --enable-max-voices=200 --enable-max-streams=220
157     </pre>
158 schoenebeck 1856 Just to let you know the difference: the options you apply to the "CXXFLAGS"
159 schoenebeck 1674 variable are options of the compiler (usually the GNU compiler,
160     see "man gcc" for all available gcc options). The parameters after
161 schoenebeck 1856 the "./configure" token are LS specific compile time options, i.e. the amount
162     of disk streams etc. For a full list of LS's compile time options and brief
163 schoenebeck 1674 explanations of them you can call:
164     <pre>
165     ./configure --help
166     </pre>
167 schoenebeck 1856 from LS's source directory. So after you modified the configure line in LS's
168 schoenebeck 1674 <i>debian/rules</i> file, you can once again call:
169     <pre>
170     dpkg-buildpackage -rfakeroot -b
171     </pre>
172 schoenebeck 1856 to get the LS packages cooked. This time it should take a bit longer. Once
173 schoenebeck 1674 again you'll get 3 Debian packages (<i>liblinuxsampler</i>, <i>liblinuxsampler-dev</i> and
174     <i>linuxsampler</i>). Install those 3 new LS packages again e.g. with "dpkg -i" like
175     already explained above with libgig.<br>
176     <br>
177     And that's it!</br>
178     <br>
179 persson 2178 The good thing: if you grabbed the sources of libgig and LS from Subversion, you only
180 schoenebeck 1674 have to call:
181     <pre>
182 persson 2178 svn update
183 schoenebeck 1674 dpkg-buildpackage -rfakeroot -b
184     </pre>
185 schoenebeck 1856 once in a while from the source directory to conveniently compile the latest
186     version with your personal optimizations and configuration parameters for
187 persson 2178 your system, because "svn update" updates your local source files to the
188     latest bleeding edge version from our Subversion server but won't touch your
189 schoenebeck 1674 modifications!
190     <br>
191     The problematic part is to find good compile time options for your specific
192     system. Unfortunately there is no real recipe for that, it always requires
193     to play around a bit with the various options. A little help on this however is
194     described next.
195    
196     <a name="benchmark"></a>
197     <h3>4.&nbsp; Benchmark</h3>
198     You're most probably unsure which gcc (compiler) flags to use.
199     As said, this always means a bit playing around. For that you can use our stripped
200 schoenebeck 1856 down benchmark, which is located in the "benchmarks" directory of the LS
201     sources. The good thing about the benchmark: it's really light-weight, that
202     is it's a benchmark of our full gig sampling engine, but it doesn't depend on
203     any MIDI or audio drivers, nor does it require to load any sounds or to
204 schoenebeck 1674 handle with automake / ./configure crap and compiles really fast.<br>
205     <br>
206     Here's how it goes:
207     <ol>
208     <li>
209     adjust the file <i>benchmarks/Makefile</i> in the LS source directory with the
210     CFLAGS (pretty much the same as CXXFLAGS) of your choice
211     </li>
212     <li>
213     call "make" from the benchmarks/ directory
214     </li>
215     <li>
216     run the compiled binary "benchmarks/gigsynth"
217     </li>
218     </ol>
219     which will print you out benchmark values for your system on the console.
220 schoenebeck 1856 There are different kind of so called "synthesis modes", i.e. one with filter
221 schoenebeck 1674 on, one with filter off, one with resampling on, one with no resampling, etc.
222     each will shoot its own benchmark result.<br>
223     <br>
224 schoenebeck 1856 So that way you can easily and quickly play around with CFLAGS (a.k.a
225 schoenebeck 1674 CXXFLAGS) and figure out which one is beloved by your machine.
226    
227     <a name="build_frontends"></a>
228     <h3>5.&nbsp; Building the Frontend(s) and Instrument Editor</h3>
229     <b>QSampler:</b> Building the QSampler Debian package is pretty much the same
230     process are described above for the backend. However usually you don't need
231     to take the hassle to optimize the compile time flags as thoroughly as you
232     would do for the backend. Since the frontend doesn't use much resources
233     anyway. Note however that you need to cook <b>and install</b> the liblscp Debian
234     packages <b>before</b> starting to build the QSampler package.<br>
235     <br>
236     <b>JSampler:</b> Many users prefer to use JSampler instead of QSampler,
237     since it currently provides more features and has a very slick skin based
238     user interface. Unfortunately JSampler hasn't been debianized yet, so there
239     is no way at the moment to build JSampler and jlscp Debian packages yet.
240     But this certainly going to change as soon as the GPL transition of the
241     Java SDK has been completed. So for now please use either the precompiled
242     JSampler .jar file (e.g. from our
243     <a href="http://linuxsampler.org/downloads.html">downloads site</a>) or
244     refer to the
245     <a href="http://linuxsampler.org/jsampler/manual/html/jsampler.html#BUILDING_FROM_SOURCE">
246     build instructions</a> of the JSampler documentation.<br>
247     <br>
248     <b>gigedit:</b> This is the graphical instrument editor for .gig files.
249     Once again, building Debian packages of gigedit is similar to the
250     other software components. Just note that you should build gigedit
251     <b>after</b> you compiled <b>and installed</b> libgig and linuxsampler.
252     Otherwise gigedit might just be compiled as a stand-alone editor, that is
253     you might not use it in conjunction with LS &amp; friends. If you have
254     any trouble getting gigedit to work with LS, please refer to the
255     <a href="http://download.linuxsampler.org/doc/gigedit/quickstart/gigedit_quickstart.html#live_editing">
256     "live mode"</a> chapter of the gigedit documentation and its respective
257     <a href="http://download.linuxsampler.org/doc/gigedit/quickstart/gigedit_quickstart.html#live_trouble">
258     trouble shooting</a> section.
259    
260     <a name="houston"></a>
261     <h3>6.&nbsp; Troubleshooting</h3>
262     <ul>
263     <li>
264     <div style="background-color: #FFF2F2;">
265     <u>Problem:</u> required libgig version not found
266     </div>
267     <div style="background-color: #F2FFF2;">
268     <u>Reason / Solution:</u>
269     make sure you don't have another, old version of libgig installed at another place ( e.g. under /usr/local )
270     </div>
271     </li>
272     </ul>
273    
274     <a name="docs"></a>
275     <h3>7.&nbsp; Detailed Documentation</h3>
276     You find more detailed documentation about our software, i.e. about JSampler
277     or gigedit on our official <a href="http://linuxsampler.org/documentation.html">
278     LinuxSampler documentation site</a>.
279    
280     <a name="bugs"></a>
281     <h3>8.&nbsp; Bugs, Problems and Feature Requests</h3>
282     Our Forum is a good place to ask for help:<br>
283     <br>
284 schoenebeck 1856 &nbsp;&nbsp;&nbsp;&nbsp;<a href="http://bb.linuxsampler.org">http://bb.linuxsampler.org</a><br>
285 schoenebeck 1674 <br>
286     We have a dedicated forum section for
287     newbies and support.<br>
288     <br>
289     No software is perfect, nor is ours, if you found bugs, please
290     report them using our bug tracking system:<br>
291     <br>
292     &nbsp;&nbsp;&nbsp;&nbsp;<a href="http://bugs.linuxsampler.org/">http://bugs.linuxsampler.org/</a>
293    
294     <a name="contact"></a>
295     <h3>9.&nbsp; Contact</h3>
296     If you have questions or want to help us to improve the sampler, please
297     subscribe to the <a href="http://www.linuxsampler.org/developers.html">
298     LinuxSampler Developer's mailing list</a>. If you want to contact a
299     certain developer instead, your can find our email addresses here:<br>
300     <br>
301     &nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.linuxsampler.org/developers.html">http://www.linuxsampler.org/developers.html</a>
302     <br><br>
303     That's it, enjoy!<br>
304     <br>
305    
306     </body>
307     </html>

  ViewVC Help
Powered by ViewVC