Contents
  1. 1. LLVM
  2. 2. libdrm
  3. 3. Mesa

Build mesa for amdgpu in Ubuntu16.04.3

LLVM

1
2
3
4
cmake ../ -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" -DBUILD_SHARED_LIBS="ON"

make -j4 #If it's failed at the end, reduce the job number to allocate less memory
sudo make install

libdrm

  • Install dependent packages

    1
    apt install xutils-dev libtool libpciaccess-dev
  • Build

    1
    2
    3
    ./autogen.sh
    make -j8
    sudo make install

Mesa

  • Install dependent packages

    1
    apt install bison flex python-mako libpthread-stubs0-dev x11proto-gl-dev x11proto-dri2-dev x11proto-dri3-dev x11proto-present-dev libdrm-dev libdrm-amdgpu1 libdrm2 xcb libxcb-dri3-0 libxcb-dri3-dev libxcb-present0 libxcb-present-dev libxcb-sync1 libxcb-sync-dev libxshmfence1 libxshmfence-dev libx11-dev libxext-dev libxdamage-dev libxfixes-dev libx11-xcb-dev libxcb-glx0-dev libxcb-dri2-0-dev libudev-dev libexpat1-dev libomxil-bellagio-dev libelf-dev automake zlib1g-dev
  • Build

    1
    2
    3
    ./configure --with-gallium-drivers=radeonsi --with-dri-drivers= --with-egl-platforms=drm,x11 --disable-xvmc --disable-vdpau --enable-texture-float
    make -j8
    sudo make install
Contents
  1. 1. LLVM
  2. 2. libdrm
  3. 3. Mesa