Mesa is an OpenGL compatible 3-D graphics library.
Download (HTTP): http://downloads.sourceforge.net/mesa3d/MesaLib-6.5.tar.bz2
Download MD5 sum: 61beda590bfc5b4a12e979d5f2d70d7a
Download size (including recommended download): 3.3 MB
Estimated disk space required (including recommended download): 823 MB
Estimated build time (including recommended download): 1.7 SBU
Xorg Libraries, Xorg Utilitites, and libdrm-2.0.1
It is not recommended to build a newer version of Mesa with XFree86 or Xorg-6.9.0.
MesaDemos-6.5 provides a demo and a diagnostic program to verify that GL is working properly.
MesaGLUT-6.5 provides a working libglut.
You should extract all three tarballs from the same toplevel directory. All three files will extract to the Mesa-6.5 directory.
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/mesalib
This package should only be built if you are installing Xorg-7.1. If you have installed or will be installing Xorg-6.9.0 or XFree86, it is provided by those packages and should not be installed here.
You will need to adjust the commands below to reflect the installation prefix of the X Window System. First, correct several hard coded directories in the source files with the following commands:
find . -type f -exec sed -i "s@/usr/X11R6@$XORG_PREFIX@g" {} \; && sed -i 's@lib/modules@lib/X11/modules@' src/glx/x11/dri_glx.c && sed -i 's@lib/modules@lib/X11/modules@' \ src/mesa/drivers/dri/Makefile.template
Fix an error with output redirection if /bin/sh is not the Bash shell on your system:
sed -i 's%>& /dev/null%>/dev/null%' src/mesa/drivers/dri/Makefile.template
Build MesaLib by running the following command:
make OPT_FLAGS="-O2 -fno-strict-aliasing" linux-dri-x86
This package does not come with a test suite.
Now, as the root user, issue the following commands to install MesaLib:
bin/installmesa $XORG_PREFIX
While still the root user, install the modules for Xorg-7.1 with the following commands.
mkdir -v -p $XORG_PREFIX/lib/X11/modules/dri && install -v -m755 lib/*dri* $XORG_PREFIX/lib/X11/modules/dri
If you've extracted the Demos package as well, then build the test programs with the following commands:
sed -i 's@-l$(GLUT_LIB)@@g' configs/default && cd progs/xdemos && make PROGS='glxinfo glxgears'
Install the demos as the root user:
install -v -m755 glxinfo glxgears $XORG_PREFIX/bin
Do not remove the Mesa source tree yet, it will be required to build the Xorg-Server-1.1.1.
Finally, if installing to any prefix other than /usr, you should create symlinks to the GL headers in /usr/include. Execute the following command as the root user:
ln -s -v $XORG_PREFIX/include/GL /usr/include
find...sed -i "s@/usr/X11R6@$XORG_PREFIX@"...: This command corrects several hard coded references to the X11R6 default installation path.
sed -i 's@lib/modules@lib/X11/modules@' src/glx/x11/dri_glx.c: This command corrects a hard coded reference to the module directory.
make OPT_FLAGS=... linux-dri-x86: A bug where OpenGL applications are shifted to the left by 50% can be worked around by adding -fno-strict-aliasing to the compiler flags. Also, the linux-dri-x86 target is specified to use a few other helpful flags in addition to the defaults. See the other targets in the configs directory if your architecture is not x86.
bin/installmesa: Mesa uses a custom installation script as opposed to the normal install make target.
install -v -m755 lib/*dri* $XORG_PREFIX/lib/X11/modules/dri: installs the DRI modules.
sed -i 's@-l$(GLUT_LIB)@@g' configs/default: disables linking against GLUT libraries for the demo programs.
make PROGS='glxinfo glxgears': build only the glxinfo and glxgears programs.
install -v -m755 glxinfo glxgears $XORG_PREFIX/bin: Installs only the glxinfo and glxgears programs.
Last updated on 2007-01-18 13:38:19 -0600