DSL Tips and Tricks :: A quick guide on compiling XOrg 7.0 on DSL



Since mesa depends on libdrm and libdrm in turn depends on glproto, xf86vidmodeproto, libXxf86vm & libXmu I decided to run the build_from_tarballs script until libXmu and stop there to build libdrm and mesa before continuing.

The tarball script will not run with prefix=/usr, presumeably because it would overwrite the few files tinyX uses there, so I used /usr/local. The tarball script runs fine to libXmu and libdrm compiles fine but mesa complains that it cannot find various header files which are actually in /usr/local/include.

I could copy the header files into /usr/include but I guess it would be cleaner to do this "properly". I believe the following will let mesa know where library and package config files are:

Code Sample
# export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

but how do you do this for header files?

Some info here: http://www.network-theory.co.uk/docs/gccintro/gccintro_23.html
though it says gcc should auto-search the local dir...

Somehow I seem to remember doing `ln -s /usr/local/include/X11 /usr/include/X11` at one time though (maybe I left out a step?).  But I'm pretty sure that I build libdrm and libmesa before building X (I assume they just used the headers)

So... I managed to compile mesa after switching from mesalib-6.5.3 to mesalib-6.5.2 - it seems mesa was looking for a driver, nouveau.drm, that wasn't present in libdrm-2.3.0.

This time I use --prefix=/usr/local and after compiling mesa with "make linux-dri-x86", the build_from_tarballs script runs from beginning to end without error - although I did not use the -m /path-to-mesa-sources/ switch.

As a test (I need to go back and compile with the -m switch), I tried to run X without a .conf file and got this:

Code Sample
X Protocol Version 11, Revision 0, Release 7.2
Build Operating System: Linux 2.4.26 i686
Module Loader present
Unable to locate/open config file
Matrox Graphics, Inc. MGA 2164W [Millennium II] AGP rev 0
New driver is "mga"
LoadModule: "glx"
Failed to load module "glx" (module does not exist, 0)
...
Fatal server error:
Cannot run in framebuffer mode


I'm guessing the glx module is missing either because I did not use the -m switch or because I did not build mesa using make "make linux-x86"

Any other ideas would be welcome

Use "Xorg -configure" and try with that conf it produces..
Where are your X modules?

Your fatal error is "cannot run in fb mode".  I also experienced this problem... apparently to use the "auto xorgconfig" in current XOrg, you can't be using fb (which DSL uses) and so you need to specify a xorg.conf .

For your glx problem.. I'm also assuming it's because you built without -m (since glx = opengl).

And it did look like your problem was another one of the "version incompatiblilty" situations -- nice to see you solved it.

Next Page...
original here.