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