Home | History | Annotate | Download | only in mesa-driver-builder
      1 FROM debian:9.4
      2 
      3 # Enabling backports gives us access to clang-6 and new versions of libdrm2 package.
      4 # Mesa builds newer than 17.0.4 or so require libdrm > 2.4.75, but the
      5 # default one in stretch is 2.4.74.
      6 # Note that the hosts that use these drivers will also need the newer version of libdrm2
      7 # or there will be an error along the lines of:
      8 #     symbol lookup error: ./mesa_intel_driver/libGL.so.1: undefined symbol: drmGetDevice2
      9 #
     10 # Hosts can install this by adding the stretch-backports debian source (see next RUN)
     11 # and the performing `sudo apt-get update && sudo apt-get install libdrm2=2.4.91-2~bpo9+1`
     12 RUN echo "deb http://ftp.debian.org/debian stretch-backports main" >> /etc/apt/sources.list
     13 
     14 RUN apt-get update && apt-get upgrade -y
     15 
     16 ENV DEBIAN_FRONTEND noninteractive
     17 
     18 RUN apt-get install -y \
     19     autoconf \
     20     bison \
     21     build-essential \
     22     clang-6.0 \
     23     flex \
     24     libdrm-amdgpu1=2.4.91-2~bpo9+1 \
     25     libdrm-dev=2.4.91-2~bpo9+1 \
     26     libdrm-intel1=2.4.91-2~bpo9+1 \
     27     libdrm-nouveau2=2.4.91-2~bpo9+1 \
     28     libdrm-radeon1=2.4.91-2~bpo9+1 \
     29     libdrm2=2.4.91-2~bpo9+1 \
     30     libomxil-bellagio-dev \
     31     libpthread-stubs0-dev \
     32     libtool \
     33     libva-dev \
     34     libx11-xcb-dev \
     35     libxcb-dri2-0-dev \
     36     libxcb-dri3-dev \
     37     libxcb-glx0-dev \
     38     libxcb-present-dev \
     39     libxcb1-dev \
     40     libxdamage-dev \
     41     libxext-dev \
     42     libxshmfence-dev \
     43     llvm-dev \
     44     pkg-config \
     45     python-pip \
     46     python2.7 \
     47     scons \
     48     software-properties-common \
     49     wget \
     50     x11proto-dri2-dev \
     51     x11proto-dri3-dev \
     52     x11proto-gl-dev \
     53     x11proto-present-dev \
     54     x11proto-xext-dev \
     55     xserver-xorg-core \
     56     xserver-xorg-dev
     57 
     58 RUN pip install mako
     59 
     60 ENV CC="/usr/lib/llvm-6.0/bin/clang" \
     61     CXX="/usr/lib/llvm-6.0/bin/clang++" \
     62     PATH=/usr/lib/llvm-6.0/bin:$PATH
     63 
     64 # Default to this version of MESA, but it can be overridden with
     65 # -e MESA_VERSION=X.Y.Z when running the docker container
     66 ENV MESA_VERSION=18.1.7
     67 
     68 COPY ./build_mesa.sh /opt/build_mesa.sh