User Tools

Site Tools


wiki:development:glx-xlib-workaround

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
wiki:development:glx-xlib-workaround [2020/06/02 19:11]
uli42 [Matlab 2019b]
wiki:development:glx-xlib-workaround [2020/08/20 20:24]
uli42 add helper script with LD_PRELOAD
Line 13: Line 13:
  
 ==== Mesa 19 and newer ==== ==== Mesa 19 and newer ====
-Please note: the instructions below are valid for olter Mesa releases. In Mesa 19 //meson// is recommended for building. Please consult https://mesa3d.org/llvmpipe.html for a basic compilation instruction. Since those instructions will not work out of the box (Error: "gallium-xlib conflicts+Please note: the instructions below are valid for older Mesa releases. In Mesa 19 //meson// is recommended for building. Please consult https://mesa3d.org/llvmpipe.html for a basic compilation instruction. Since those instructions will not work out of the box (Error: "gallium-xlib conflicts
 with any dri driver") as of Mesa 19.3.2 you need to call //meson// with some further parameters like this: with any dri driver") as of Mesa 19.3.2 you need to call //meson// with some further parameters like this:
 <code> <code>
Line 35: Line 35:
 <code> <code>
 #!/bin/sh #!/bin/sh
-LD_LIBRARY_PATH=<your directory>/libgl-xlib exec "$@"+LD_LIBRARY_PATH=<your directory>/libgl-xlib:${LD_LIBRARY_PATH} exec "$@"
 </code> </code>
  
Line 42: Line 42:
 $ x2goglx glxinfo $ x2goglx glxinfo
 </code> </code>
 +
 +Some software modifies LD_LIBRARY_PATH itself. In that case you might be successful with LD_PRELOAD. Instead of setting LD_LIBRARY_PATH point to a directory you set LD_PRELOAD to point to the generated library itself:
 +<code>
 +#!/bin/sh
 +LD_PRELOAD=<your directory>/libgl-xlib/libGL.so exec "$@"
 +</code>
 +
 ==== Ubuntu 14.04 ==== ==== Ubuntu 14.04 ====
  
Line 97: Line 104:
  
 Compile like this: Compile like this:
-```+<code>
 meson -D glx=gallium-xlib -D gallium-drivers=swrast -D platforms=x11 -D dri3=false -D dri-drivers="" -D vulkan-drivers="" -D buildtype=release -D optimization=3 -Dprefix=/usr/local/mesa-20.1.0/ meson -D glx=gallium-xlib -D gallium-drivers=swrast -D platforms=x11 -D dri3=false -D dri-drivers="" -D vulkan-drivers="" -D buildtype=release -D optimization=3 -Dprefix=/usr/local/mesa-20.1.0/
-```+</code>
  
 To make Matlab load the new driver modify Matlab's lib search path: To make Matlab load the new driver modify Matlab's lib search path:
 cp $MATLAB_DIRECTORY/bin/.matlab7rc.sh ~ cp $MATLAB_DIRECTORY/bin/.matlab7rc.sh ~
  
-Edit the file ~/.matlab7rc.sh, find the glnxa* section and add the path to you mesa library, e.g. /usr/local/mesa-20.1.0/lib/x86_64-linux-gnuto LDPATH_PREFIX+Edit the file ~/.matlab7rc.sh, find the glnxa* section and add ''/usr/local/mesa-20.1.0/lib/x86_64-linux-gnu'' to LDPATH_PREFIX
  
 Add to your .profile: export MESA_GL_VERSION_OVERRIDE=3.0 Add to your .profile: export MESA_GL_VERSION_OVERRIDE=3.0
wiki/development/glx-xlib-workaround.txt ยท Last modified: 2021/10/25 21:01 by uli42