Brian Paul | 4732a6b | 1998-07-29 01:15:40 +0000 | [diff] [blame] | 1 | |
| 2 | Info on using Mesa 3.0 with Linux Quake I and Quake II |
| 3 | |
| 4 | |
| 5 | |
| 6 | Disclaimer |
| 7 | ---------- |
| 8 | |
| 9 | I am _not_ a Quake expert by any means. I pretty much only run it to |
| 10 | test Mesa. There have been a lot of questions about Linux Quake and |
| 11 | Mesa so I'm trying to provide some useful info here. If this file |
| 12 | doesn't help you then you should look elsewhere for help. The Mesa |
| 13 | mailing list or the news://news.3dfx.com/3dfx.linux.glide newsgroup |
| 14 | might be good. |
| 15 | |
| 16 | Again, all the information I have is in this file. Please don't email |
| 17 | me with questions. |
| 18 | |
| 19 | If you have information to contribute to this file please send it to |
| 20 | me at brianp@elastic.avid.com |
| 21 | |
| 22 | |
| 23 | |
| 24 | Linux Quake |
| 25 | ----------- |
| 26 | |
| 27 | You can get Linux Quake from http://www.idsoftware.com/ |
| 28 | |
| 29 | Quake I and II for Linux were tested with, and include, Mesa 2.6. You |
| 30 | shouldn't have too many problems if you simply follow the instructions |
| 31 | in the Quake distribution. |
| 32 | |
| 33 | |
| 34 | |
| 35 | RedHat 5.0 Linux problems |
| 36 | ------------------------- |
| 37 | |
| 38 | RedHat Linux 5.x uses the GNU C library ("glibc" or "libc6") whereas |
| 39 | previous RedHat and other Linux distributions use "libc5" for its |
| 40 | runtime C library. |
| 41 | |
| 42 | Linux Quake I and II were compiled for libc5. If you compile Mesa |
| 43 | on a RedHat 5.x system the resulting libMesaGL.so file will not work |
| 44 | with Linux Quake because of the different C runtime libraries. |
| 45 | The symptom of this is a segmentation fault soon after starting Quake. |
| 46 | |
| 47 | If you want to use a newer version of Mesa (like 3.x) with Quake on |
| 48 | RedHat 5.x then read on. |
| 49 | |
| 50 | The solution to the C library problem is to force Mesa to use libc5. |
| 51 | libc5 is in /usr/i486-linux-libc5/lib on RedHat 5.x systems. |
| 52 | |
| 53 | Emil Briggs (briggs@tick.physics.ncsu.edu) nicely gave me the following |
| 54 | info: |
| 55 | |
| 56 | > I only know what works on a RedHat 5.0 distribution. RH5 includes |
| 57 | > a full set of libraries for both libc5 and glibc. The loader ld.so |
| 58 | > uses the libc5 libraries in /usr/i486-linux-libc5/lib for programs |
| 59 | > linked against libc5 while it uses the glibc libraries in /lib and |
| 60 | > /usr/lib for programs linked against glibc. |
| 61 | > |
| 62 | > Anyway I changed line 41 of mklib.glide to |
| 63 | > GLIDELIBS="-L/usr/local/glide/lib -lglide2x -L/usr/i486-linux-libc5/lib" |
| 64 | > |
| 65 | > And I started quake2 up with a script like this |
| 66 | > #!/bin/csh |
| 67 | > setenv LD_LIBRARY_PATH /usr/i486-linux-libc5/lib |
| 68 | > setenv MESA_GLX_FX f |
| 69 | > ./quake2 +set vid_ref gl |
| 70 | > kbd_mode -a |
| 71 | > reset |
| 72 | |
| 73 | |
| 74 | I've already patched the mklib.glide file. You'll have to start Quake |
| 75 | with the script shown above though. |
| 76 | |
| 77 | |
| 78 | |
Brian Paul | 04fa2f9 | 1998-07-29 01:18:05 +0000 | [diff] [blame] | 79 | ********************** |
| 80 | |
| 81 | Daryll Strauss writes: |
| 82 | |
| 83 | Here's my thoughts on the problem. On a RH 5.x system, you can NOT build |
| 84 | a libc5 executable or library. Red Hat just doesn't include the right |
| 85 | stuff to do it. |
| 86 | |
| 87 | Since Quake is a libc5 based application, you are in trouble. You need |
| 88 | libc5 libraries. |
| 89 | |
| 90 | What can you do about it? Well there's a package called gcc5 that does |
| 91 | MOST of the right stuff to compile with libc5. (It brings back older |
| 92 | header files, makes appropriate symbolic links for libraries, and sets |
| 93 | up the compiler to use the correct directories) You can find gcc5 here: |
| 94 | ftp://ecg.mit.edu/pub/linux/gcc5-1.0-1.i386.rpm |
| 95 | |
| 96 | No, this isn't quite enough. There are still a few tricks to getting |
| 97 | Mesa to compile as a libc5 application. First you have to make sure that |
| 98 | every compile uses gcc5 instead of gcc. Second, in some cases the link |
| 99 | line actually lists -L/usr/lib which breaks gcc5 (because it forces you |
| 100 | to use the glibc version of things) |
| 101 | |
| 102 | If you get all the stuff correctly compiled with gcc5 it should work. |
| 103 | I've run Mesa 3.0B6 and its demos in a window with my Rush on a Red Hat |
| 104 | 5.1 system. It is a big hassle, but it can be done. I've only made Quake |
| 105 | segfault, but I think that's from my libRush using the wrong libc. |
| 106 | |
| 107 | Yes, mixing libc5 and glibc is a major pain. I've been working to get |
| 108 | all my libraries compiling correctly with this setup. Someone should |
| 109 | make an RPM out of it and feed changes back to Brian once they get it |
| 110 | all working. If no one else has done so by the time I get the rest of my |
| 111 | stuff straightened out, I'll try to do it myself. |
| 112 | |
| 113 | - |Daryll |
| 114 | |
| 115 | |
| 116 | |
| 117 | ********************* |
| 118 | |
| 119 | David Bucciarelli (tech.hmw@plus.it) writes: |
| 120 | |
| 121 | I'm using the Mesa-3.0beta7 and the RedHat 5.1 and QuakeII is |
| 122 | working fine for me. I had only to make a small change to the |
| 123 | Mesa-3.0/mklib.glide file, from: |
| 124 | |
| 125 | |
| 126 | GLIDELIBS="-L/usr/local/glide/lib -lglide2x |
| 127 | -L/usr/i486-linux-libc5/lib -lm" |
| 128 | |
| 129 | to: |
| 130 | |
| 131 | GLIDELIBS="-L/usr/i486-linux-libc5/lib -lglide2x" |
| 132 | |
| 133 | and to make two symbolic links: |
| 134 | |
| 135 | [david@localhost Mesa]$ ln -s libMesaGL.so libMesaGL.so.2 |
| 136 | [david@localhost Mesa]$ ln -s libMesaGLU.so libMesaGLU.so.2 |
| 137 | |
| 138 | I'm using the Daryll's Linux glide rpm for the Voodoo2 and glibc (it |
| 139 | includes also the Glide for the libc5). I'm not using the /dev/3Dfx and |
| 140 | running QuakeII as root with the following env. var: |
| 141 | |
| 142 | export |
| 143 | LD_LIBRARY_PATH=/dsk1/home/david/src/gl/Mesa/lib:/usr/i486-linux-libc5/lib |
| 144 | |
| 145 | I think that all problems are related to the glibc, Quake will never |
| 146 | work if you get the following output: |
| 147 | |
| 148 | [david@localhost Mesa]$ ldd lib/libMesaGL.so |
| 149 | libglide2x.so => /usr/lib/libglide2x.so (0x400f8000) |
| 150 | libm.so.6 => /lib/libm.so.6 (0x40244000) |
| 151 | libc.so.6 => /lib/libc.so.6 (0x4025d000) |
| 152 | /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000) |
| 153 | |
| 154 | You must get the following outputs: |
| 155 | |
| 156 | [david@localhost Mesa]# ldd lib/libMesaGL.so |
| 157 | libglide2x.so => /usr/i486-linux-libc5/lib/libglide2x.so |
| 158 | (0x400f3000) |
| 159 | |
| 160 | [root@localhost quake2]# ldd quake2 |
| 161 | libdl.so.1 => /lib/libdl.so.1 (0x40005000) |
| 162 | libm.so.5 => /usr/i486-linux-libc5/lib/libm.so.5 (0x40008000) |
| 163 | libc.so.5 => /usr/i486-linux-libc5/lib/libc.so.5 (0x40010000) |
| 164 | |
| 165 | [root@localhost quake2]# ldd ref_gl.so |
| 166 | libMesaGL.so.2 => |
| 167 | /dsk1/home/david/src/gl/Mesa/lib/libMesaGL.so.2 (0x400eb000) |
| 168 | libglide2x.so => /usr/i486-linux-libc5/lib/libglide2x.so |
| 169 | (0x401d9000) |
| 170 | libX11.so.6 => /usr/i486-linux-libc5/lib/libX11.so.6 |
| 171 | (0x40324000) |
| 172 | libXext.so.6 => /usr/i486-linux-libc5/lib/libXext.so.6 |
| 173 | (0x403b7000) |
| 174 | libvga.so.1 => /usr/i486-linux-libc5/lib/libvga.so.1 |
| 175 | (0x403c1000) |
| 176 | libm.so.5 => /usr/i486-linux-libc5/lib/libm.so.5 (0x403f5000) |
| 177 | libc.so.5 => /usr/i486-linux-libc5/lib/libc.so.5 (0x403fd000) |
| 178 | |
| 179 | |
| 180 | *********************** |
| 181 | |
| 182 | Steve Davies (steve@one47.demon.co.uk) writes: |
| 183 | |
| 184 | |
| 185 | Try using: |
| 186 | |
| 187 | export LD_LIBRARY_PATH=/usr/i486-linux-libc5/lib |
| 188 | ./quake2 +set vid_ref gl |
| 189 | |
| 190 | to start the game... Works for me, but assumes that you have the |
| 191 | compatability libc5 RPMs installed. |
| 192 | |
| 193 | |
| 194 | *************************** |
| 195 | |
Brian Paul | a6922cb | 1998-08-23 15:26:26 +0000 | [diff] [blame] | 196 | WWW resources - you may find additional Linux Quake help at these URLs: |
| 197 | |
| 198 | |
| 199 | http://quake.medina.net/howto |
| 200 | |
| 201 | http://webpages.mr.net/bobz |
| 202 | |
| 203 | http://www.linuxgames.com/quake2/ |
Brian Paul | 04fa2f9 | 1998-07-29 01:18:05 +0000 | [diff] [blame] | 204 | |
| 205 | |
| 206 | |
Brian Paul | 4732a6b | 1998-07-29 01:15:40 +0000 | [diff] [blame] | 207 | ---------------------------------------------------------------------- |