Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

install.html 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <HTML>
  2. <TITLE>Compilation and Installation</TITLE>
  3. <link rel="stylesheet" type="text/css" href="mesa.css"></head>
  4. <BODY>
  5. <H1>Compilation and Installation</H1>
  6. <ol>
  7. <li><a href="#unix-x11">Unix / X11</a>
  8. <li><a href="#windows">Windows</a>
  9. <li><a href="#vms">VMS</a>
  10. <li><a href="#other">Other</a>
  11. </ol>
  12. <a name="unix-x11">
  13. <H2>1. Unix/X11 Compilation and Installation</H1>
  14. <p>
  15. Mesa uses a rather conventional Makefile system.
  16. A GNU autoconf/automake system used to be included, but was discarded
  17. in Mesa 5.1 because:
  18. </p>
  19. <ul>
  20. <li>It seldom worked on IRIX, Solaris, AIX, etc.
  21. <li>It was very compilicated
  22. <li>Nobody maintained it
  23. <li>libtool was just too weird
  24. </ul>
  25. <p>
  26. If someone strongly feels that Mesa should have a autoconf/automake
  27. system and wants to contribute one and maintain it, we'll consider
  28. adding it again.
  29. </p>
  30. <p>
  31. In Mesa 6.1 we modified the conventional Makefile system.
  32. Instead of specifying all the various system configurations in the
  33. Make-config file, there's a directory named <code>configs/</code> which
  34. has an individual file for each configuration.
  35. One of the configs gets copied to <code>configs/current</code>, which
  36. is then included by all Makefiles.
  37. </p>
  38. <h3>1.1 Compilation</h3>
  39. <p>
  40. Note: if you've obtained Mesa through CVS, do this first:
  41. </p>
  42. <pre>
  43. cd Mesa
  44. chmod a+x bin/mklib
  45. </pre>
  46. <p>
  47. Just type <b>make</b> in the top-level directory.
  48. You'll see a list of supported system configurations.
  49. Choose one from the list (such as linux-x86), and type:
  50. </p>
  51. <pre>
  52. make linux-x86
  53. </pre>
  54. <p>
  55. If you want to rebuild for a different configuration run
  56. <code>make realclean</code> before rebuilding.
  57. </p>
  58. <h3>1.2 The libraries</h3>
  59. <p>
  60. When compilation has finished, look in the top-level <b>lib/</b> directory.
  61. You'll see a set of library files similar to this:
  62. </p>
  63. <pre>
  64. lrwxrwxrwx 1 brian users 10 Mar 26 07:53 libGL.so -> libGL.so.1*
  65. lrwxrwxrwx 1 brian users 19 Mar 26 07:53 libGL.so.1 -> libGL.so.1.5.060100*
  66. -rwxr-xr-x 1 brian users 3375861 Mar 26 07:53 libGL.so.1.5.060100*
  67. lrwxrwxrwx 1 brian users 11 Mar 26 07:53 libGLU.so -> libGLU.so.1*
  68. lrwxrwxrwx 1 brian users 20 Mar 26 07:53 libGLU.so.1 -> libGLU.so.1.3.060100*
  69. -rwxr-xr-x 1 brian users 549269 Mar 26 07:53 libGLU.so.1.3.060100*
  70. lrwxrwxrwx 1 brian users 12 Mar 26 07:53 libglut.so -> libglut.so.3*
  71. lrwxrwxrwx 1 brian users 16 Mar 26 07:53 libglut.so.3 -> libglut.so.3.7.1*
  72. -rwxr-xr-x 1 brian users 597754 Mar 26 07:53 libglut.so.3.7.1*
  73. lrwxrwxrwx 1 brian users 11 Mar 26 08:04 libGLw.so -> libGLw.so.1*
  74. lrwxrwxrwx 1 brian users 15 Mar 26 08:04 libGLw.so.1 -> libGLw.so.1.0.0*
  75. -rwxr-xr-x 1 brian users 20750 Mar 26 08:04 libGLw.so.1.0.0*
  76. lrwxrwxrwx 1 brian users 14 Mar 26 07:53 libOSMesa.so -> libOSMesa.so.6*
  77. lrwxrwxrwx 1 brian users 23 Mar 26 07:53 libOSMesa.so.6 -> libOSMesa.so.6.1.060100*
  78. -rwxr-xr-x 1 brian users 23871 Mar 26 07:53 libOSMesa.so.6.1.060100*
  79. </pre>
  80. <p>
  81. <b>libGL</b> is the main OpenGL library (i.e. Mesa).
  82. <br>
  83. <b>libGLU</b> is the OpenGL Utility library.
  84. <br>
  85. <b>libglut</b> is the GLUT library.
  86. <br>
  87. <b>libGLw</b> is the Xt/Motif OpenGL drawing area widget library.
  88. <br>
  89. <b>libOSMesa</b> is the OSMesa (Off-Screen) interface library.
  90. </p>
  91. <h3>1.3 Running the demos</h3>
  92. <p>
  93. If you downloaded/unpacked the MesaDemos-x.y.z.tar.gz archive or
  94. obtained Mesa from CVS, the <b>progs/</b> directory will contain a
  95. bunch of demonstration programs.
  96. </p>
  97. <p>
  98. Before running a demo, you may have to set an environment variable
  99. (such as <b>LD_LIBRARY_PATH</b> on Linux) to indicate where the
  100. libraries are located. For example:
  101. <p>
  102. <blockquote>
  103. <b>cd</b> into the Mesa <b>lib/</b> directory.
  104. <br>
  105. <b>setenv LD_LIBRARY_PATH ${cwd}</b> (if using csh or tcsh shell)
  106. <br>
  107. or,
  108. <br>
  109. <b>export LD_LIBRARY_PATH=${PWD}</b> (if using bash or sh shell)
  110. </blockquote>
  111. <p>
  112. Next, change to the Mesa/demos/ directory:
  113. </p>
  114. <blockquote>
  115. <b>cd ../progs/demos</b>
  116. </blockquote>
  117. <p>
  118. Run a demo such as gears:
  119. </p>
  120. <blockquote>
  121. <b>./gears</b>
  122. </blockquote>
  123. <p>
  124. If this doesn't work, try the <b>Mesa/progs/xdemos/glxinfo</b> program
  125. and see that it prints the expected Mesa version number.
  126. </p>
  127. <p>
  128. If you're using Linux or a similar OS, verify that the demo program is
  129. being linked with the proper library files:
  130. </p>
  131. <blockquote>
  132. <b>ldd gears</b>
  133. </blockquote>
  134. <p>
  135. You should see something like this:
  136. </p>
  137. <pre>
  138. libglut.so.3 => /home/brian/Mesa/lib/libglut.so.3 (0x40013000)
  139. libGLU.so.1 => /home/brian/Mesa/lib/libGLU.so.1 (0x40051000)
  140. libGL.so.1 => /home/brian/Mesa/lib/libGL.so.1 (0x400e0000)
  141. libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
  142. libm.so.6 => /lib/i686/libm.so.6 (0x403da000)
  143. libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x403fc000)
  144. libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x404da000)
  145. libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x404f1000)
  146. libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40543000)
  147. libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4054b000)
  148. libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x405fd000)
  149. libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40605000)
  150. libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40613000)
  151. /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
  152. libdl.so.2 => /lib/libdl.so.2 (0x40644000)
  153. libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40647000)
  154. libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40650000)
  155. </pre>
  156. <p>
  157. Retrace your steps if this doesn't look right.
  158. </p>
  159. <H3>1.4 Installing the header and library files</H3>
  160. <p>
  161. The standard location for the OpenGL header files on Unix-type systems is
  162. in <code>/usr/include/GL/</code>.
  163. The standard location for the libraries is <code>/usr/lib/</code>.
  164. For more information see, the
  165. <a href="http://oss.sgi.com/projects/ogl-sample/ABI/" target="_parent">
  166. Linux/OpenGL ABI specification</a>.
  167. </p>
  168. <p>
  169. If you'd like Mesa to co-exist with another implementation of OpenGL that's
  170. already installed, you'll have to choose different directories, like
  171. <code>/usr/local/include/GL/</code> and <code>/usr/local/lib/</code>.
  172. </p>
  173. <p>
  174. To install Mesa's headers and libraries, run <code>make install</code>
  175. You'll be prompted to enter alternative directories for the headers
  176. and libraries.
  177. </p>
  178. <p>
  179. Note: at runtime, you can set the LD_LIBRARY_PATH (on Linux) to switch
  180. between the Mesa libs and another vendor libs whenever you want.
  181. This is a handy way to compare multiple OpenGL implementations.
  182. </p>
  183. <a name="windows">
  184. <H2>2. Windows Compilation and Installation</H1>
  185. <p>
  186. Please see the <a href="README.WIN32">README.WIN32</a> file.
  187. </p>
  188. <a name="vms">
  189. <H2>3. VMS Compilation and Installation</H1>
  190. <p>
  191. Please see the <a href="README.VMS">README.VMS</a> file.
  192. </p>
  193. <a name="other">
  194. <H2>4. Other systems</H1>
  195. <p>
  196. Documentation for other environments (some may be very out of date):
  197. </p>
  198. <UL>
  199. <LI><A HREF="README.GGI">README.GGI</A> - GGI
  200. <LI><A HREF="README.3DFX">README.3DFX</A> - 3Dfx/Glide driver
  201. <LI><A HREF="README.AMIWIN">README.AMIWIN</A> - Amiga Amiwin
  202. <LI><A HREF="README.BEOS">README.BEOS</A> - BeOS
  203. <LI><A HREF="README.D3D">README.D3D</A> - Direct3D driver
  204. <LI><A HREF="README.DJ">README.DJ</A> - DJGPP
  205. <LI><A HREF="README.LYNXOS">README.LYNXOS</A> - LynxOS
  206. <LI><A HREF="README.MINGW32">README.MINGW32</A> - Mingw32
  207. <LI><A HREF="README.NeXT">README.NeXT</A> - NeXT
  208. <LI><A HREF="README.OpenStep">README.OpenStep</A> - OpenStep
  209. <LI><A HREF="README.OS2">README.OS2</A> - OS/2
  210. <LI><A HREF="README.WINDML">README.WINDML</A> - WindML
  211. </UL>
  212. </body>
  213. </html>