diff --git a/projects/gstreamer/Dockerfile b/projects/gstreamer/Dockerfile index da67b6f8a..4df66ca4c 100644 --- a/projects/gstreamer/Dockerfile +++ b/projects/gstreamer/Dockerfile @@ -23,13 +23,14 @@ MAINTAINER bilboed@bilboed.com RUN sed -i '/^#\sdeb-src /s/^#//' "/etc/apt/sources.list" && \ apt-get update && \ apt-get install -y make autoconf automake libtool build-essential \ - autopoint pkg-config bison flex gettext libglib2.0-dev libffi-dev liblzma-dev \ - libvorbis-dev libtheora-dev libogg-dev git-annex + autopoint pkg-config bison flex gettext libffi-dev liblzma-dev \ + libvorbis-dev libtheora-dev libogg-dev zlib1g-dev + +ADD https://ftp.gnome.org/pub/gnome/sources/glib/2.54/glib-2.54.2.tar.xz $SRC # Checkout all development repositories #RUN for i in orc gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav; do git clone --depth 1 --recursive https://anongit.freedesktop.org/git/gstreamer/$i $i; done RUN \ - git clone --depth 1 --recursive https://anongit.freedesktop.org/git/gstreamer/orc orc && \ git clone --depth 1 --recursive https://anongit.freedesktop.org/git/gstreamer/gstreamer gstreamer && \ git clone --depth 1 --recursive https://anongit.freedesktop.org/git/gstreamer/gst-plugins-base gst-plugins-base && \ git clone --depth 1 --recursive https://anongit.freedesktop.org/git/gstreamer/gst-ci gst-ci diff --git a/projects/gstreamer/build.sh b/projects/gstreamer/build.sh index dc1a5c4f9..3c0f07d35 100755 --- a/projects/gstreamer/build.sh +++ b/projects/gstreamer/build.sh @@ -21,12 +21,19 @@ PREFIX=$WORK/prefix PLUGIN_DIR=$PREFIX/lib/gstreamer-1.0 export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig mkdir -p $PREFIX +export PATH=$PREFIX/bin:$PATH cd $WORK # Minimize gst-debug level/code export CFLAGS="$CFLAGS -DGST_LEVEL_MAX=2" -for i in orc gstreamer gst-plugins-base; +tar xvJf $SRC/glib-2.54.2.tar.xz +cd glib-2.54.2 +./configure --prefix=$PREFIX --enable-static --disable-shared --disable-libmount --with-pcre=internal && make -j$(nproc) && make install +cd .. + + +for i in gstreamer gst-plugins-base; do mkdir -p $i cd $i @@ -39,12 +46,12 @@ do done #finally build the binary \o/ -BUILD_CFLAGS="$CFLAGS `pkg-config --static --cflags glib-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0 gstreamer-audio-1.0 gstreamer-app-1.0 orc-0.4`" +BUILD_CFLAGS="$CFLAGS `pkg-config --static --cflags glib-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0 gstreamer-audio-1.0 gstreamer-app-1.0`" # List of dependencies libraries we grab from pkg-config # Should also include dependencies of dependencies (ex: libvorbis depends on libogg) -PKG_DEPS="glib-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0 gstreamer-audio-1.0 orc-0.4 \ +PKG_DEPS="glib-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0 gstreamer-audio-1.0 \ gstreamer-riff-1.0 gstreamer-tag-1.0 gstreamer-app-1.0 zlib \ ogg vorbis vorbisenc theoraenc theoradec theora" @@ -95,3 +102,21 @@ echo ">>>> Installing OGG corpus" echo cp $SRC/*_seed_corpus.zip $OUT + +echo ">>>> BUILDING typefind.o" +echo + +$CC $CFLAGS $BUILD_CFLAGS -c $SRC/gst-ci/fuzzing/typefind.c -o $SRC/gst-ci/fuzzing/typefind.o + +echo +echo ">>>> LINKING" +echo + +$CXX $CXXFLAGS \ + -o $OUT/typefind \ + $PREDEPS_LDFLAGS \ + $SRC/gst-ci/fuzzing/typefind.o \ + $PLUGINS \ + $BUILD_LDFLAGS \ + $LIB_FUZZING_ENGINE \ + -Wl,-Bdynamic