Kompilere Mesa 3D på Scientific Linux 7

https://www.mesa3d.org/download.html

OBS denne oppskriften er først og fremst for bruk internt av Unix-drift... ikke bruk, fungerer ikke...

Avhengigheter

Installer, som root eller med sudo:
yum install llvm3.9-devel
Avhengig av nyere llvm enn hva som er tilgjengelig på SL 7.4, se LLVM

Avhengig av nyere libdrm enn hva som er tilgjengelig på SL 7.4, se LIBDRM
export LIBDRM_ROOT=/opt/libdrm-2.4.96
export LIBDRM_CFLAGS="-I${LIBDRM_ROOT}/include -I${LIBDRM_ROOT}/include/libdrm"
export LIBDRM_LIBS="-L${LIBDRM_ROOT}/lib -ldrm"

# velger nyeste versjon:
v=18.3.1

# bruker RedHat development tool set som har gcc 4.9
source /opt/rh/devtoolset-3/enable

Henter ned og kompilerer opp Mesa 3D uten GPU støtte, for bruk på server med X11 eller på VM.
d=/tmp/mesa ; mkdir $d ; cd $d
wget -O - https://mesa.freedesktop.org/archive/mesa-$v.tar.xz | xz -dc | tar xf - ; cd mesa-*
./configure --enable-texture-float --enable-glx --enable-osmesa --disable-dri --disable-egl --disable-gles1 --disable-gles2 --disable-gbm --disable-driglx-direct --disable-xvmc --enable-gallium-llvm --with-llvm-prefix=/usr/lib64/llvm3.9 --with-gallium-drivers=swrast,swr --prefix=/opt/mesa-$v-x11-swr
make
make check

Som root
d=/tmp/mesa ; cd $d/mesa*
make install

For å bruke dette:
Libraries have been installed in:
   /opt/mesa-17.3.3-x11-swr/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

export LD_LIBRARY_PATH=/opt/mesa-17.3.3-x11-swr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
cmake -DOPENGL_INCLUDE_DIR=/opt/mesa-17.3.3-x11-swr/include -DOPENGL_gl_LIBRARY=/opt/mesa-17.3.3-x11-swr/lib/libGL.so ~/OpenFOAM/ThirdParty-5.x/ParaView-5.4.0
Topic revision: r7 - 2018-12-14, TheodorIvesdal
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback