[Mesa-users] Compile + Use Mesa without X

Pekka Paalanen ppaalanen at gmail.com
Sun Feb 9 23:34:57 PST 2014


On Sat, 8 Feb 2014 00:15:39 +0100
Eric Nicolas <erik.nicolas at gmail.com> wrote:

> Hi,
> 
> After much more reading, I found that Wayland could be great for what I'm
> trying to build (instead of raw Mesa).
> But I ran in the same problem.
> 
> I'm trying to build Wayland on a X-less machine following instructions here
> :http://wayland.freedesktop.org/building.html
> Everything goes fine until the Mesa build:
> 
> ./autogen.sh --prefix=$WLD --enable-gles2 --disable-gallium-egl \
>       --with-egl-platforms=wayland,drm --enable-gbm --enable-shared-glapi \
>       --with-gallium-drivers=r300,r600,swrast,nouveau --disable-dri3
> 
> Which fails with missing packages x11, xest, xdamage, xfixes, x11-xcb,
> xcb-glx, xcb-dri2.
> 
> How the hell is Wayland supposed to replace X11 if... it requires X11
> when building it ???
> 
> I'm out of clues.
> 
> Please help ;)

Hi,

you have to disable more stuff in the Mesa build. I don't have the
exact configure flags at hand, though.

Basically you must disable building of libGL.so. Yes, you cannot build
the desktop OpenGL library without X11, because libGL.so's ABI must
contain also the GLX symbols, and GLX support needs X11 headers and
libs to build. This limitation is known, and I think it is addressed by
https://github.com/aritger/linux-opengl-abi-proposal once it gets
implemented by software vendors.

OpenGL ES 1 and 2 libraries do not have this problem.

However, the X11 requirement is "soft", in that you do need the X11
stuff to build if you want a libGL.so, and I think you also need the
X11 libs installed when you run a program using libGL.so, but you do
not need an X11 server running. All the X11 code will be there to just
make the linker happy, and it will not be used e.g. under Wayland.

This is also the source of confusion when people claim that desktop
OpenGL requires X11 and hence cannot work on Wayland. Desktop OpenGL
*does* work on Wayland, but you just need some useless X11 libraries on
the disk for it to load, until the new ABI is implemented by vendors and
used by applications.


Thanks,
pq


More information about the mesa-users mailing list