[Mesa-users] [mesa-users] Configuring mesa-11.2.2 llvmpipe with non-standard paths
Chuck Atkins
chuck.atkins at kitware.com
Wed Jun 29 19:10:11 UTC 2016
I almost forgot about this issue! Your libGL is the result of conflicting
options for competing Xlib GLX implementations. I actually fixed this in
upstream and configure options for glx are a bit more sane now in the
upcoming 12.0 release. Basically try some different configure options
followed by a bit of surgery after the installation (note that these are
the configure options we use with Mesa):
./configure \
--enable-opengl --disable-gles1 --disable-gles2 \
--disable-va --disable-gbm --disable-xvmc --disable-vdpau \
--enable-shared-glapi \
--disable-texture-float \
--disable-dri --with-dri-drivers= \
--enable-gallium-llvm --disable-llvm-shared-libs \
--with-gallium-drivers=swrast \
--disable-egl --disable-gbm --with-egl-platforms= \
--disable-gallium-osmesa --enable-glx --enable-xlib-glx \
--with-llvm-prefix=${BASELIBS_PREFIX}/llvm-3.8 \
--prefix=${BASELIBS_PREFIX}/mesa-11.2-glx
make -jwhatever install
What you'll end up with in the install directory is a bit of a mess
though. If you look in there, you'll see both libGL.so.1.5.0 and
libGL.so.1.6.0 with associated symlinks mixed for both. Delete the
libGL.so.1 symlink and the libGL.so.1.6.0 library and then re-create the
symlink for libGL.so.1 -> libGL.so.1.5.0. The resulting install tree after
all this should give you a working libGL.so that correctly sees llvmpipe.
All this is fixed in upstream now, see:
https://bugs.freedesktop.org/show_bug.cgi?id=94086
and
https://cgit.freedesktop.org/mesa/mesa/commit/?id=a92910ae37878b441ecb1c488f0a40d80a48f6fe
12.0 you can just give --enable-glx and the correct backend will be chosen
but for the current release you still have to get your hands a bit dirty.
- Chuck
On Wed, Jun 29, 2016 at 12:41 PM, Edson Contreras Cárdenas <
edrecon at gmail.com> wrote:
> Hi Chuck, thanks for your quick response. I'm sending you the output of
> configure and glxinfo. And yes, it is similiar.
>
> BASELIBS_PREFIX="/remote/sharedLibs"
>
> PKG_CONFIG_PATH=${BASELIBS_PREFIX}/libxcb/lib/pkgconfig:${BASELIBS_PREFIX}/libdrm/lib/pkgconfig:${BASELIBS_PREFIX}/libxshmfence/lib/pkgconfig:${BASELIBS_PREFIX}/libva/lib/pkgconfig
>
> [edsonc at mesa-tests]:/remote/sharedLibsSrc/mesa11.2-build>../mesa-11.2.2/configure
> \
> --prefix=${BASELIBS_PREFIX}/mesa-11.2-glx \
> --with-llvm-prefix=${BASELIBS_PREFIX}/llvm-3.8 \
> --with-gnu-ld \
> --enable-gallium-llvm=yes \
> --enable-sysfs \
> --enable-xlib-glx \
> --enable-glx \
> --enable-texture-float \
> --disable-dri \
> --disable-dri3 \
> --disable-egl \
> --disable-llvm-shared-libs \
> --with-gallium-drivers="swrast"
>
> Output is:
>
> prefix: /remote/sharedLibs/mesa-11.2-glx
> exec_prefix: ${prefix}
> libdir: ${exec_prefix}/lib
> includedir: ${prefix}/include
>
> OpenGL: yes (ES1: yes ES2: yes)
>
> OSMesa: no
>
> GLX: Xlib-based
>
> EGL: no
>
> llvm: yes
> llvm-config: /remote/sharedLibs/llvm-3.8/bin/llvm-config
> llvm-version: 3.8.0
>
> Gallium drivers: swrast
> Gallium st: mesa
>
> Shader cache: yes
> With SHA1 from: libgcrypt
>
> Shared libs: yes
> Static libs: no
> Shared-glapi: yes
>
> CFLAGS: -g -O2 -Wall -std=c99
> -Werror=implicit-function-declaration -Werror=missing-prototypes
> -fno-strict-aliasing -fno-math-errno -fno-trapping-math -fno-builtin-memcmp
> CXXFLAGS: -g -O2 -Wall -fno-strict-aliasing
> -fno-builtin-memcmp
> Macros: -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
> -D_GNU_SOURCE -DUSE_SSE41 -DNDEBUG -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM
> -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_MKOSTEMP
> -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DHAVE_SHA1 -DHAVE_SYSFS
> -DUSE_XSHM -DMESA_EGL_NO_X11_HEADERS -DHAVE_LLVM=0x0308
> -DMESA_LLVM_VERSION_PATCH=0
>
> LLVM_CFLAGS: -I/remote/sharedLibs/llvm-3.8/include
> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
> LLVM_CXXFLAGS: -I/remote/sharedLibs/llvm-3.8/include -W
> -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers
> -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor
> -Wno-comment -std=c++11 -fno-rtti -D__STDC_CONSTANT_MACROS
> -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
> LLVM_CPPFLAGS: -I/remote/sharedLibs/llvm-3.8/include
> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
> LLVM_LDFLAGS: -L/remote/sharedLibs/llvm-3.8/lib
>
> PYTHON2: python2
>
> Run 'make' to build Mesa
>
> Then, after a 'gmake -j20' and a 'gmake install' the output of the
> glxinfo is:
>
> [edsonc at mesa-tests]:~>setenv LD_LIBRARY_PATH
> /remote/sharedLibs/mesa-11.2.2-glx/lib:$LD_LIBRARY_PATH
>
> [edsonc at mesa-tests]:~>ldd /usr/bin/glxinfo
> linux-vdso.so.1 => (0x00007fffc5bff000)
> libGLU.so.1 => /usr/lib64/libGLU.so.1 (0x00002ad1e0157000)
> libGL.so.1 => /remote/sharedLibs/mesa-11.2.2-glx/lib/libGL.so.1
> (0x00002ad1e03d7000)
> libm.so.6 => /lib64/libm.so.6 (0x00002ad1e0a4f000)
> libX11.so.6 => /usr/lib64/libX11.so.6 (0x00002ad1e0cd3000)
> libXext.so.6 => /usr/lib64/libXext.so.6 (0x00002ad1e1011000)
> libc.so.6 => /lib64/libc.so.6 (0x00002ad1e1223000)
> libstdc++.so.6 => /remote/baseLibs/libstdc++.so.6 (0x00002ad1e15b7000)
> libgcc_s.so.1 => /remote/baseLibs/libgcc_s.so.1 (0x00002ad1e1932000)
> libgcrypt.so.11 => /lib64/libgcrypt.so.11 (0x00002ad1e1b48000)
> libglapi.so.0 => /remote/sharedLibs/mesa-11.2-glx/lib/libglapi.so.0
> (0x00002ad1e1dbe000)
> libxcb.so.1 => /remote/sharedLibs/libxcb/lib/libxcb.so.1
> (0x00002ad1e2024000)
> libXau.so.6 => /usr/lib64/libXau.so.6 (0x00002ad1e2249000)
> libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00002ad1e244d000)
> libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ad1e2652000)
> libdl.so.2 => /lib64/libdl.so.2 (0x00002ad1e286f000)
> /lib64/ld-linux-x86-64.so.2 (0x00002ad1dff35000)
> libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x00002ad1e2a74000)
>
> [edsonc at mesa-tests]:~>glxinfo | grep -i "opengl"
> OpenGL vendor string: Brian Paul
> OpenGL renderer string: Mesa X11
> OpenGL version string: 2.1 Mesa 11.2.2 (git-)
> OpenGL shading language version string: 1.20
> OpenGL extensions:
>
> And that's it :-).
>
> [Note: It's great having support from kitware, because my intention is to
> have vtk-7.0 running with OpenGL2. Currently I've managed to build it in a
> RHEL7.1 image only because there I build mesa using scons and the libudev
> is high enough. For the time being I have 2 binaries: 1 with OpenGL1 in
> RHEL6.6 and other with OpenGL2 in RHEL7.1. The idea is just to have one
> with OpenGL2]
>
> Thanks!
>
> Regards,
> Edson
>
> 2016-06-29 11:50 GMT-04:00 Chuck Atkins <chuck.atkins at kitware.com>:
>
>> What's the output of your configure look like? Using almost the same
>> configuration on CentOS 6.7 with GCC 5.2 from the SCL, except all system
>> dev-packages instead my own versions (sans llvm of course) I get the
>> following output:
>>
>> [chuck at wopr mesa-11.2.2]$ ./configure
>> --with-llvm-prefix=${HOME}/Code/LLVM/llvm-3.8.0.inst --with-gnu-ld
>> --enable-gallium-llvm=yes --enable-sysfs --enable-xlib-glx --enable-glx
>> --enable-texture-float --disable-dri --disable-dri3 --disable-egl
>> --disable-llvm-shared-libs --with-gallium-drivers=swrast
>> ...
>> config.status: executing libtool commands
>>
>> prefix: /usr/local
>> exec_prefix: ${prefix}
>> libdir: ${exec_prefix}/lib
>> includedir: ${prefix}/include
>>
>> OpenGL: yes (ES1: yes ES2: yes)
>>
>> OSMesa: no
>>
>> GLX: Xlib-based
>>
>> EGL: no
>>
>> llvm: yes
>> llvm-config:
>> /home/chuck/Code/LLVM/llvm-3.8.0.inst/bin/llvm-config
>> llvm-version: 3.8.0
>>
>> Gallium drivers: swrast
>> Gallium st: mesa
>>
>> Shader cache: yes
>> With SHA1 from: libcrypto
>>
>> Shared libs: yes
>> Static libs: no
>> Shared-glapi: yes
>>
>> CFLAGS: -g -O2 -Wall -std=c99
>> -Werror=implicit-function-declaration -Werror=missing-prototypes
>> -fno-strict-aliasing -fno-math-errno -fno-trapping-math -fno-builtin-memcmp
>> CXXFLAGS: -g -O2 -Wall -fno-strict-aliasing
>> -fno-builtin-memcmp
>> Macros: -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
>> -D_GNU_SOURCE -DUSE_SSE41 -DNDEBUG -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM
>> -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_MKOSTEMP
>> -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_SHA1 -DHAVE_SYSFS -DUSE_XSHM
>> -DMESA_EGL_NO_X11_HEADERS -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0
>>
>> LLVM_CFLAGS: -I/home/chuck/Code/LLVM/llvm-3.8.0.inst/include
>> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
>> LLVM_CXXFLAGS:
>> -I/home/chuck/Code/LLVM/llvm-3.8.0.inst/include -W -Wno-unused-parameter
>> -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long
>> -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment
>> -std=c++11 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
>> -D__STDC_LIMIT_MACROS
>> LLVM_CPPFLAGS: -I/home/chuck/Code/LLVM/llvm-3.8.0.inst/include
>> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
>> LLVM_LDFLAGS: -L/home/chuck/Code/LLVM/llvm-3.8.0.inst/lib
>>
>> PYTHON2: python2
>>
>> Run 'make' to build Mesa
>>
>> [chuck at wopr mesa-11.2.2]$
>>
>> Your resulting configure output should be similar.
>>
>> - Chuck
>>
>> On Wed, Jun 29, 2016 at 8:01 AM, Edson Contreras Cárdenas <
>> edrecon at gmail.com> wrote:
>>
>>> Hello everyone,
>>>
>>> Sorry for bothering you all, but I cannot get the gallium llvmpipe
>>> driver working, and I need some help.
>>>
>>> My environment is:
>>> RHEL6.6
>>> gcc-5.2 (system)
>>> libudev < 151 (system, I cannot upgrade kernel)
>>>
>>> llvm-3.8 (from source)
>>> libva-1.7.1 (from source)
>>> libxshmfence-latest (from source)
>>> libxcb-latest (from source)
>>> libdrm-latest (from source)
>>>
>>> I have all my libs installed in a non-standard path:
>>>
>>> MYLIBS_PREFIX=/remote/sharedLibs
>>>
>>> And my configure script looks like:
>>>
>>> ../mesa-11.2.2/configure \
>>>
>>> PKG_CONFIG_PATH=${MYLIBS_PREFIX}/libxcb/lib/pkgconfig:${MYLIBS_PREFIX}/libdrm/lib/pkgconfig:${MYLIBS_PREFIX}/libxshmfence/lib/pkgconfig:${MYLIBS_PREFIX}/libva/lib/pkgconfig
>>> \
>>> —prefix=${MYLIBS_PREFIX}/mesa-11.2-llvmpipe \
>>> —with-llvm-prefix=${MYLIBS_PREFIX}/llvm-3.8 \
>>> —with-gnu-ld \
>>> —enable-gallium-llvm=yes \
>>> —enable-sysfs \
>>> —enable-xlib-glx \
>>> —enable-glx \
>>> —enable-texture-float \
>>> —disable-dri \
>>> —disable-dri3 \
>>> —disable-egl \
>>> —disable-llvm-shared-libs \
>>> —with-gallium-drivers=swrast
>>>
>>> The thing is that I have a valid libGL.so after building, but doesn't
>>> have support for OpenGL 3.2. In addition to that, if I run "glxinfo | grep
>>> OpenGL" it does not mention Gallium llvmpipe driver anywhere (however it
>>> does mention mesa 11.2) and glxgears runs smoothly.
>>>
>>> Finally, if I try 'scons', it fails due to lack of udev >= 151.
>>>
>>> Could you please help me to provide to scons the flag --enable-sysfs,
>>> or, help me to configure 'configure flags' in order to have llvmpipe driver
>>> running?
>>> Thank you very much in advance.
>>>
>>> Regards,
>>> Edson
>>>
>>> _______________________________________________
>>> mesa-users mailing list
>>> mesa-users at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/mesa-users
>>>
>>>
>>
>
>
> --
> Atte.
> Edson René Contreras Cárdenas
> Ingeniero Civil Electrónico
> TCAD R&D Software Engineer II
> Synopsys Chile
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-users/attachments/20160629/8c7235fe/attachment-0001.html>
More information about the mesa-users
mailing list