[Xquartz-dev] Building mesa

Jeremy Huddleston jeremyhu at apple.com
Sat Apr 21 17:29:33 PDT 2012


On Apr 21, 2012, at 11:29, Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:

> Hi,
> 
> I'm trying to build mesa (libGL.1.dylib) with debug info to be able to debug http://xquartz.macosforge.org/trac/ticket/512 . As an aside, valgrind is also an excellent debugging tool for getting to the bottom of such issues.

Thanks for the help.

> Anyway, my first problem was figuring out where mesa's git repository was :) After a while, I found git://people.freedesktop.org/~jeremyhu/mesa

Wrong repo.  git://anongit.freedesktop.org/mesa/mesa

2.7.2_beta5 has 8.0.1 with some additional patches.  You should use the 8.0 branch.

> I then configured mesa using
> 
>  export ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
>  export PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig"
>  export CFLAGS="-Wall -O0 -ggdb3 -arch i386 -arch x86_64 -pipe"
>  export LDFLAGS=$CFLAGS
>  export CXXFLAGS=$CFLAGS
>  ./configure --with-gallium-drivers= --prefix=/opt/X11 --disable-egl

Nope.  The autoconf path doesn't work on darwin.  You want to use the old 'make <config>' path.  Try this:

make clean
make darwin INSTALL_DIR=/opt/X11 CC=clang CXX=clang++ EXTRA_CFLAGS="-g3 -gdwarf-2 -O0"
sudo make install INSTALL_DIR=/opt/X11 

Check out configs/darwin





More information about the Xquartz-dev mailing list