Home | History | Annotate | Download | only in fuzz
      1 # Copyright 2017 The Chromium Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 #
      5 # Defines a docker image that can build cras fuzzers.
      6 #
      7 FROM gcr.io/oss-fuzz-base/base-builder
      8 
      9 RUN apt-get -y update && \
     10       apt-get install -y \
     11       automake \
     12       build-essential \
     13       cmake \
     14       ctags \
     15       g++ \
     16       gdb \
     17       git \
     18       ladspa-sdk \
     19       libasound-dev \
     20       libdbus-1-dev \
     21       libgtest-dev \
     22       libncurses5-dev \
     23       libsbc-dev \
     24       libsndfile-dev \
     25       libspeexdsp-dev \
     26       libtool \
     27       libudev-dev \
     28       wget
     29 RUN apt-get clean
     30 RUN cd /tmp && git clone https://github.com/ndevilla/iniparser.git && \
     31       cd iniparser && \
     32       make && \
     33       cp libiniparser.* /usr/local/lib && \
     34       cp src/dictionary.h src/iniparser.h /usr/local/include && \
     35       chmod 644 /usr/local/include/dictionary.h /usr/local/include/iniparser.h && \
     36       chmod 644 /usr/local/lib/libiniparser.a && \
     37       chmod 755 /usr/local/lib/libiniparser.so.*
     38 RUN cd /usr/src/gtest && \
     39       cmake . && \
     40       make && \
     41       chmod 644 *.a && \
     42       cp *.a /usr/local/lib
     43 
     44 # Need to build and install alsa so there is a static lib.
     45 RUN mkdir -p /tmp/alsa-build && cd /tmp/alsa-build && \
     46       wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.4.1.tar.bz2 && \
     47       bzip2 -f -d alsa-lib-* && \
     48       tar xf alsa-lib-* && \
     49       cd alsa-lib-* && \
     50       ./configure --enable-static --disable-shared && \
     51       make clean && \
     52       make -j$(nproc) all && \
     53       make install
     54 
     55 
     56 COPY . /src/cras/
     57 COPY src/fuzz/build.sh /src/
     58