1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY mesalib-download-http "http://downloads.sourceforge.net/mesa3d/MesaLib-&mesalib-version;.tar.bz2">
|
---|
8 | <!ENTITY mesalib-download-ftp " ">
|
---|
9 | <!ENTITY mesalib-md5sum "61beda590bfc5b4a12e979d5f2d70d7a">
|
---|
10 | <!ENTITY mesalib-size "3.3 MB">
|
---|
11 | <!ENTITY mesalib-buildsize "823 MB">
|
---|
12 | <!ENTITY mesalib-time "1.7 SBU">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="mesalib" xreflabel="MesaLib-&mesalib-version;">
|
---|
16 | <?dbhtml filename="mesalib.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>MesaLib-&mesalib-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="mesalib">
|
---|
26 | <primary sortas="a-MesaLib">MesaLib</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to MesaLib</title>
|
---|
31 |
|
---|
32 | <para><application>Mesa</application> is an OpenGL compatible 3-D graphics
|
---|
33 | library.</para>
|
---|
34 |
|
---|
35 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
36 | <itemizedlist spacing="compact">
|
---|
37 | <listitem>
|
---|
38 | <para>Download (HTTP): <ulink url="&mesalib-download-http;"/></para>
|
---|
39 | </listitem>
|
---|
40 | <listitem>
|
---|
41 | <para>Download (FTP): <ulink url="&mesalib-download-ftp;"/></para>
|
---|
42 | </listitem>
|
---|
43 | <listitem>
|
---|
44 | <para>Download MD5 sum: &mesalib-md5sum;</para>
|
---|
45 | </listitem>
|
---|
46 | <listitem>
|
---|
47 | <para>Download size (including recommended download):
|
---|
48 | &mesalib-size;</para>
|
---|
49 | </listitem>
|
---|
50 | <listitem>
|
---|
51 | <para>Estimated disk space required (including recommended download):
|
---|
52 | &mesalib-buildsize;</para>
|
---|
53 | </listitem>
|
---|
54 | <listitem>
|
---|
55 | <para>Estimated build time (including recommended download):
|
---|
56 | &mesalib-time;</para>
|
---|
57 | </listitem>
|
---|
58 | </itemizedlist>
|
---|
59 |
|
---|
60 | <bridgehead renderas="sect3">MesaLib Dependencies</bridgehead>
|
---|
61 |
|
---|
62 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
63 | <para role="required"><xref linkend="xorg7-lib"/>,
|
---|
64 | <xref linkend="xorg7-util"/>, and
|
---|
65 | <xref linkend="libdrm"/></para>
|
---|
66 |
|
---|
67 | <note>
|
---|
68 | <para>It is not recommended to build a newer version of
|
---|
69 | <application>Mesa</application> with <xref linkend="xfree86"/> or
|
---|
70 | <xref linkend="xorg"/>.</para>
|
---|
71 | </note>
|
---|
72 |
|
---|
73 | <bridgehead renderas="sect3">Recommended Download</bridgehead>
|
---|
74 | <para><ulink
|
---|
75 | url="http://downloads.sourceforge.net/mesa3d/MesaDemos-&mesalib-version;.tar.bz2">MesaDemos-&mesalib-version;</ulink>
|
---|
76 | provides a demo and a diagnostic program to verify that GL is working
|
---|
77 | properly.</para>
|
---|
78 |
|
---|
79 | <bridgehead renderas="sect3">Optional Download</bridgehead>
|
---|
80 | <para><ulink
|
---|
81 | url="http://downloads.sourceforge.net/mesa3d/MesaGLUT-&mesalib-version;.tar.bz2">MesaGLUT-&mesalib-version;</ulink>
|
---|
82 | provides a working <filename class='libraryfile'>libglut</filename>.</para>
|
---|
83 |
|
---|
84 | <note>
|
---|
85 | <para>You should extract all three tarballs from the same toplevel
|
---|
86 | directory. All three files will extract to the
|
---|
87 | <filename class="directory">Mesa-&mesalib-version;</filename>
|
---|
88 | directory.</para>
|
---|
89 | </note>
|
---|
90 |
|
---|
91 | <para condition="html" role="usernotes">User Notes:
|
---|
92 | <ulink url="&blfs-wiki;/mesalib"/></para>
|
---|
93 |
|
---|
94 | </sect2>
|
---|
95 |
|
---|
96 | <sect2 role="installation">
|
---|
97 | <title>Installation of MesaLib</title>
|
---|
98 |
|
---|
99 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
100 | href="../../xincludes/xorg7-only.xml"/>
|
---|
101 |
|
---|
102 | <para>You will need to adjust the commands below to reflect the
|
---|
103 | installation prefix of the X Window System. First, correct several
|
---|
104 | hard coded directories in the source files with the following
|
---|
105 | commands:</para>
|
---|
106 |
|
---|
107 | <screen><userinput>find . -type f -exec sed -i "s@/usr/X11R6@$XORG_PREFIX@g" {} \; &&
|
---|
108 | sed -i 's@lib/modules@lib/X11/modules@' src/glx/x11/dri_glx.c &&
|
---|
109 | sed -i 's@lib/modules@lib/X11/modules@' \
|
---|
110 | src/mesa/drivers/dri/Makefile.template</userinput></screen>
|
---|
111 |
|
---|
112 | <para>Fix an error with output redirection if <command>/bin/sh</command>
|
---|
113 | is not the <application>Bash</application> shell on your system:</para>
|
---|
114 |
|
---|
115 | <screen><userinput>sed -i 's%>& /dev/null%>/dev/null%' src/mesa/drivers/dri/Makefile.template</userinput></screen>
|
---|
116 |
|
---|
117 | <para>Build <application>MesaLib</application>
|
---|
118 | by running the following command:</para>
|
---|
119 |
|
---|
120 | <screen><userinput>make OPT_FLAGS="-O2 -fno-strict-aliasing" linux-dri-x86</userinput></screen>
|
---|
121 |
|
---|
122 | <para>This package does not come with a test suite.</para>
|
---|
123 |
|
---|
124 | <para>Now, as the <systemitem class="username">root</systemitem> user,
|
---|
125 | issue the following commands to install
|
---|
126 | <application>MesaLib</application>:</para>
|
---|
127 |
|
---|
128 | <screen role="root"><userinput>bin/installmesa $XORG_PREFIX</userinput></screen>
|
---|
129 |
|
---|
130 | <para>While still the root user, install the modules for
|
---|
131 | Xorg-&xorg7-version; with the following commands.</para>
|
---|
132 |
|
---|
133 | <screen role="root"><userinput>mkdir -v -p $XORG_PREFIX/lib/X11/modules/dri &&
|
---|
134 | install -v -m755 lib/*dri* $XORG_PREFIX/lib/X11/modules/dri</userinput></screen>
|
---|
135 |
|
---|
136 | <para>If you've extracted the Demos package as well, then
|
---|
137 | build the test programs with the following commands:</para>
|
---|
138 |
|
---|
139 | <screen><userinput>sed -i 's@-l$(GLUT_LIB)@@g' configs/default &&
|
---|
140 | cd progs/xdemos &&
|
---|
141 | make PROGS='glxinfo glxgears'</userinput></screen>
|
---|
142 |
|
---|
143 | <para>Install the demos as the
|
---|
144 | <systemitem class="username">root</systemitem> user:</para>
|
---|
145 |
|
---|
146 | <screen role="root"><userinput>install -v -m755 glxinfo glxgears $XORG_PREFIX/bin</userinput></screen>
|
---|
147 |
|
---|
148 | <note>
|
---|
149 | <para>Do not remove the Mesa source tree yet, it will be required to
|
---|
150 | build the <xref linkend="xorg7-server"/>.</para>
|
---|
151 | </note>
|
---|
152 |
|
---|
153 | <para>Finally, if installing to any prefix other than
|
---|
154 | <filename class="directory">/usr</filename>, you should create symlinks
|
---|
155 | to the GL headers in <filename class="directory">/usr/include</filename>.
|
---|
156 | Execute the following command as the
|
---|
157 | <systemitem class="username">root</systemitem> user:</para>
|
---|
158 |
|
---|
159 | <screen role="root"><userinput>ln -s -v $XORG_PREFIX/include/GL /usr/include</userinput></screen>
|
---|
160 |
|
---|
161 | </sect2>
|
---|
162 |
|
---|
163 | <sect2 role="commands">
|
---|
164 | <title>Command Explanations</title>
|
---|
165 |
|
---|
166 | <para><command>find...sed -i
|
---|
167 | "s@/usr/X11R6@$XORG_PREFIX@"...</command>:
|
---|
168 | This command corrects several hard coded references to the X11R6 default
|
---|
169 | installation path.</para>
|
---|
170 |
|
---|
171 | <para><command>sed -i 's@lib/modules@lib/X11/modules@'
|
---|
172 | src/glx/x11/dri_glx.c</command>: This command corrects a hard coded
|
---|
173 | reference to the module directory.</para>
|
---|
174 |
|
---|
175 | <para><command>make OPT_FLAGS=... linux-dri-x86</command>: A bug where
|
---|
176 | OpenGL applications are shifted to the left by 50% can be worked around
|
---|
177 | by adding <option>-fno-strict-aliasing</option> to the compiler flags.
|
---|
178 | Also, the <option>linux-dri-x86</option> target is specified to use a
|
---|
179 | few other helpful flags in addition to the defaults. See the other
|
---|
180 | targets in the <filename class="directory">configs</filename> directory
|
---|
181 | if your architecture is not x86.</para>
|
---|
182 |
|
---|
183 | <para><command>bin/installmesa</command>: Mesa uses a custom installation
|
---|
184 | script as opposed to the normal <parameter>install</parameter> make
|
---|
185 | target.</para>
|
---|
186 |
|
---|
187 | <para><command>install -v -m755 lib/*dri*
|
---|
188 | $XORG_PREFIX/lib/X11/modules/dri</command>:
|
---|
189 | installs the DRI modules.</para>
|
---|
190 |
|
---|
191 | <para><command>sed -i 's@-l$(GLUT_LIB)@@g' configs/default</command>:
|
---|
192 | disables linking against GLUT libraries for the demo programs.</para>
|
---|
193 |
|
---|
194 | <para><command>make PROGS='glxinfo glxgears'</command>: build only
|
---|
195 | the glxinfo and glxgears programs.</para>
|
---|
196 |
|
---|
197 | <para><command>install -v -m755 glxinfo glxgears
|
---|
198 | $XORG_PREFIX/bin</command>:
|
---|
199 | Installs only the glxinfo and glxgears programs.</para>
|
---|
200 |
|
---|
201 | </sect2>
|
---|
202 |
|
---|
203 | <sect2 role="content">
|
---|
204 | <title>Contents</title>
|
---|
205 |
|
---|
206 | <segmentedlist>
|
---|
207 | <segtitle>Installed Programs</segtitle>
|
---|
208 | <segtitle>Installed Libraries</segtitle>
|
---|
209 | <segtitle>Installed Directories</segtitle>
|
---|
210 |
|
---|
211 | <seglistitem>
|
---|
212 | <seg>glxgears and glxinfo</seg>
|
---|
213 | <seg>libGL.{so,a}, libGLU.{so,a}, libGLw.{so,a}, libglut.{so,a} and
|
---|
214 | *_dri.so</seg>
|
---|
215 | <seg>$XORG_PREFIX/lib/modules/dri</seg>
|
---|
216 | </seglistitem>
|
---|
217 | </segmentedlist>
|
---|
218 |
|
---|
219 | <variablelist>
|
---|
220 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
221 | <?dbfo list-presentation="list"?>
|
---|
222 | <?dbhtml list-presentation="table"?>
|
---|
223 |
|
---|
224 | <varlistentry id="glxgears">
|
---|
225 | <term><filename>glxgears</filename></term>
|
---|
226 | <listitem>
|
---|
227 | <para>a GL demo useful for troubleshooting graphics problems.</para>
|
---|
228 | <indexterm zone="mesalib glxgears">
|
---|
229 | <primary sortas="b-glxgears">glxgears</primary>
|
---|
230 | </indexterm>
|
---|
231 | </listitem>
|
---|
232 | </varlistentry>
|
---|
233 |
|
---|
234 | <varlistentry id="glxinfo">
|
---|
235 | <term><filename>glxinfo</filename></term>
|
---|
236 | <listitem>
|
---|
237 | <para>a diagnostic program that displays information about the
|
---|
238 | graphics hardware and installed GL libraries.</para>
|
---|
239 | <indexterm zone="mesalib glxinfo">
|
---|
240 | <primary sortas="b-glxinfo">glxinfo</primary>
|
---|
241 | </indexterm>
|
---|
242 | </listitem>
|
---|
243 | </varlistentry>
|
---|
244 |
|
---|
245 | </variablelist>
|
---|
246 |
|
---|
247 | </sect2>
|
---|
248 |
|
---|
249 | </sect1>
|
---|