101 |
Grab the source code files of libgig (e.g. from our CVS server, as |
Grab the source code files of libgig (e.g. from our CVS server, as |
102 |
described on the |
described on the |
103 |
<a href="http://linuxsampler.org/downloads.html">downloads site</a>). Then you |
<a href="http://linuxsampler.org/downloads.html">downloads site</a>). Then you |
104 |
should optimize the compilation flags for your machine. This really depends |
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 |
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: |
the libgig sources in a text editor and watch out for the following line: |
107 |
<pre> |
<pre> |
108 |
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info |
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info |
109 |
</pre> |
</pre> |
110 |
This is the line where you'll place all your optimization options. Remove the |
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 |
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 |
prefix the line with your preferred optimization flags. So, for a Pentium4 |
113 |
machine it could look like: |
machine it could look like: |
114 |
<pre> |
<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 |
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> |
</pre> |
117 |
save the file and finally you can start the build process (as ordinary user) with: |
save the file and finally you can start the build process (as ordinary user) with: |
118 |
<pre> |
<pre> |
119 |
dpkg-buildpackage -rfakeroot -b |
dpkg-buildpackage -rfakeroot -b |
120 |
</pre> |
</pre> |
124 |
<pre> |
<pre> |
125 |
Unmet build dependencies: ... |
Unmet build dependencies: ... |
126 |
</pre> |
</pre> |
127 |
Simply install the requested packages with "apt-get install" (or whatever you |
Simply install the requested packages with "apt-get install" (or whatever you |
128 |
prefer for package installation) and call the dpkg-buildpackage command |
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 |
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 |
above your libgig source directory. Install those 3 .deb files now, i.e. with |
131 |
dpkg (as root): |
dpkg (as root): |
132 |
<pre> |
<pre> |
133 |
dpkg -i libgig_3.2.1-1_i386.deb libgig-dev_3.2.1-1_i386.deb |
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 |
dpkg -i gigtools_3.2.1-1_i386.deb |
135 |
</pre> |
</pre> |
136 |
and now repeat these steps for LS. That is grab the LS sources, edit the |
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 |
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, |
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: |
the LS compile time options in LS's <i>debian/rules</i> file could become: |
140 |
<pre> |
<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 |
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> |
</pre> |
143 |
Just to let you know the difference: the options you apply to the "CXXFLAGS" |
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, |
variable are options of the compiler (usually the GNU compiler, |
145 |
see "man gcc" for all available gcc options). The parameters after |
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 |
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 |
of disk streams etc. For a full list of LS's compile time options and brief |
148 |
explanations of them you can call: |
explanations of them you can call: |
149 |
<pre> |
<pre> |
150 |
./configure --help |
./configure --help |
151 |
</pre> |
</pre> |
152 |
from LS's source directory. So after you modified the configure line in LS's |
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: |
<i>debian/rules</i> file, you can once again call: |
154 |
<pre> |
<pre> |
155 |
dpkg-buildpackage -rfakeroot -b |
dpkg-buildpackage -rfakeroot -b |
156 |
</pre> |
</pre> |
157 |
to get the LS packages cooked. This time it should take a bit longer. Once |
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 |
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 |
<i>linuxsampler</i>). Install those 3 new LS packages again e.g. with "dpkg -i" like |
160 |
already explained above with libgig.<br> |
already explained above with libgig.<br> |
161 |
<br> |
<br> |
162 |
And that's it!</br> |
And that's it!</br> |
163 |
<br> |
<br> |
164 |
The good thing: if you grabbed the sources of libgig and LS from CVS, you only |
The good thing: if you grabbed the sources of libgig and LS from CVS, you only |
165 |
have to call: |
have to call: |
166 |
<pre> |
<pre> |
167 |
cvs update |
cvs update |
168 |
dpkg-buildpackage -rfakeroot -b |
dpkg-buildpackage -rfakeroot -b |
169 |
</pre> |
</pre> |
170 |
once in a while from the source directory to conveniently compile the latest |
once in a while from the source directory to conveniently compile the latest |
171 |
version with your personal optimizations and configuration parameters for |
version with your personal optimizations and configuration parameters for |
172 |
your system, because "cvs update" updates your local source files to the |
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 |
latest bleeding edge version from our CVS server but won't touch your |
174 |
modifications! |
modifications! |
175 |
<br> |
<br> |
176 |
The problematic part is to find good compile time options for your specific |
The problematic part is to find good compile time options for your specific |
182 |
<h3>4. Benchmark</h3> |
<h3>4. Benchmark</h3> |
183 |
You're most probably unsure which gcc (compiler) flags to use. |
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 |
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 |
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 |
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 |
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 |
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> |
handle with automake / ./configure crap and compiles really fast.<br> |
190 |
<br> |
<br> |
191 |
Here's how it goes: |
Here's how it goes: |
202 |
</li> |
</li> |
203 |
</ol> |
</ol> |
204 |
which will print you out benchmark values for your system on the console. |
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 |
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. |
on, one with filter off, one with resampling on, one with no resampling, etc. |
207 |
each will shoot its own benchmark result.<br> |
each will shoot its own benchmark result.<br> |
208 |
<br> |
<br> |
209 |
So that way you can easily and quickly play around with CFLAGS (a.k.a |
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. |
CXXFLAGS) and figure out which one is beloved by your machine. |
211 |
|
|
212 |
<a name="build_frontends"></a> |
<a name="build_frontends"></a> |
266 |
<h3>8. Bugs, Problems and Feature Requests</h3> |
<h3>8. Bugs, Problems and Feature Requests</h3> |
267 |
Our Forum is a good place to ask for help:<br> |
Our Forum is a good place to ask for help:<br> |
268 |
<br> |
<br> |
269 |
<a href="https://bb.linuxsampler.org">https://bb.linuxsampler.org</a><br> |
<a href="http://bb.linuxsampler.org">http://bb.linuxsampler.org</a><br> |
270 |
<br> |
<br> |
271 |
We have a dedicated forum section for |
We have a dedicated forum section for |
272 |
newbies and support.<br> |
newbies and support.<br> |