[Mesa-dev] How to build 32-bit Mesa

Nicholas Miell nmiell at gmail.com
Sun Oct 8 00:54:06 UTC 2017

On 10/07/2017 10:53 AM, Marek Olšák wrote:
> Would you please share how you build 32-bit Mesa on Linux. I think it
> would be useful to everybody.

1) Name your build directories e.g. BUILD.x86_64 or BUILD.i686. Put them both in the same directory.

2) Put -m32 or -m64 in the CFLAGS and CXXFLAGS environment variables when invoking configure.

3) Set the LLVM_CONFIG environment variable to /usr/bin/llvm-config-32 or -64 when invoking configure

4) Invoke configure as "setarch i686 /path/to/configure" or "setarch x86_64 /path/to/configure"

5) Test binaries with LD_LIBRARY_PATH='/path/to/BUILD.${PLATFORM}/lib' LIBGL_DRIVERS_PATH='/path/to/BUILD.${PLATFORM}/lib/gallium' /path/to/whatever
   The single quotes are important, ${PLATFORM} gets expanded to x86_64 or i686 by ld-linux.so, not the shell.
   This allows you to run the Steam client with these variables set and both 32-bit and 64-bit games work automatically.

More information about the mesa-dev mailing list