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 6.6KB

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