This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:development:glx-xlib-workaround [2020/01/23 18:28] uli42 [Mesa 19 and newer] |
wiki:development:glx-xlib-workaround [2020/08/20 21:37] uli42 [Wrappers] |
||
---|---|---|---|
Line 11: | Line 11: | ||
Use a wrapper/ | Use a wrapper/ | ||
+ | ==== Compile ==== | ||
+ | The general way to build the required library is this (see also https:// | ||
+ | * download and extract tarball from mesa3d.org. Try with the newest and go down to older versions if you have problems with the newer one | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
- | ===== Mesa 19 and newer ===== | + | ==== Wrappers === |
- | Please note: the instructions below are not current anymore since Mesa now mainly uses meson for building. Please consult https:// | + | Now you should find a libGL.so in '' |
- | with any dri driver" | + | |
+ | Copy '' | ||
+ | |||
+ | '' | ||
+ | < | ||
+ | #!/bin/sh | ||
+ | LD_LIBRARY_PATH=< | ||
+ | </ | ||
+ | |||
+ | '' | ||
+ | < | ||
+ | #!/bin/sh | ||
+ | LD_PRELOAD=< | ||
+ | </ | ||
+ | |||
+ | Make them executable and test them: | ||
+ | < | ||
+ | $ chmod u+rx x2goglx* | ||
+ | $ x2goglx glxinfo | ||
+ | $ x2goglx2 glxinfo | ||
+ | </ | ||
+ | |||
+ | Watch the output of the two glxinfo calls. You should see references to your mesa version and you should also see it reporting "GLX version: 1.4" | ||
+ | |||
+ | Instead of creating the scripts mentioned above you can also add this to your .bashrc (or the config of your favourite shell): | ||
+ | < | ||
+ | export LD_LIBRARY_PATH=< | ||
+ | </ | ||
+ | |||
+ | ==== Usage === | ||
+ | Now you can use one of these created wrapper scripts to run your application: | ||
+ | |||
+ | If you still cannot succeed you can try to find your if your application needs some special treatment. If so, please add the solution to the end of this page or post it to the mailinglist for some to add it. | ||
+ | |||
+ | |||
+ | ===== Versions / Platforms ===== | ||
+ | The following chapters give some hints on how to compile the library on various combinations of platforms and mesa versions. | ||
+ | ==== Mesa 19 and newer ==== | ||
+ | Please note: the instructions below are valid for older Mesa releases. In Mesa 19 //meson// is recommended | ||
+ | with any dri driver" | ||
< | < | ||
$ meson -D glx=gallium-xlib -D gallium-drivers=swrast -D platforms=x11 -D dri3=false -D dri-drivers="" | $ meson -D glx=gallium-xlib -D gallium-drivers=swrast -D platforms=x11 -D dri3=false -D dri-drivers="" | ||
Line 29: | Line 76: | ||
$ meson -D glx=gallium-xlib -D gallium-drivers=swrast -D platforms=x11 -D dri3=false -D dri-drivers="" | $ meson -D glx=gallium-xlib -D gallium-drivers=swrast -D platforms=x11 -D dri3=false -D dri-drivers="" | ||
$ ninja | $ ninja | ||
- | $ LD_LIBRARY_PATH=`pwd`/ | + | $ LD_LIBRARY_PATH=`pwd`/ |
</ | </ | ||
+ | |||
==== Ubuntu 14.04 ==== | ==== Ubuntu 14.04 ==== | ||
Line 83: | Line 131: | ||
ebuild "/ | ebuild "/ | ||
</ | </ | ||
+ | |||
+ | ===== Applications ===== | ||
+ | ==== Matlab 2019b ==== | ||
+ | |||
+ | Compile like this: | ||
+ | < | ||
+ | meson -D glx=gallium-xlib -D gallium-drivers=swrast -D platforms=x11 -D dri3=false -D dri-drivers="" | ||
+ | </ | ||
+ | |||
+ | To make Matlab load the new driver modify Matlab' | ||
+ | cp $MATLAB_DIRECTORY/ | ||
+ | |||
+ | Edit the file ~/ | ||
+ | |||
+ | Add to your .profile: export MESA_GL_VERSION_OVERRIDE=3.0 |