bbc / audiowaveform

C++ program to generate waveform data and render waveform images from audio files
https://waveform.prototyping.bbc.co.uk
GNU General Public License v3.0
1.91k stars 243 forks source link

Can't build on Alpine as of this month #154

Open aeschylus opened 2 years ago

aeschylus commented 2 years ago

Something changed and now I can't build on Alpine in a docker container using the "build from source" instructions. I get:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
#15 0.639   Could NOT find LibVorbis (missing: LIBVORBIS_LIBRARIES)

I attempted to explicitly include libvorbis and then libvorbis-dev, but neither thing worked. I've also tried including opus, which used to be necessary, but that no longer works.

chrisn commented 2 years ago

I have not been able to reproduce this. I tested the build instructions in Docker using alpine:latest. Do you need to build your own Docker image or could use use this one?

wwaldner-amtelco commented 2 years ago

Same issue here. Instead of using alpine:latest to replicate this, use alpine:3.15

It seems like cmake can't correctly resolve the distro installed libVorbis. In order to get around this, I built vorbis from scratch. Here is my Run cmds, adapted from other contributors...

# Compile required Flac lib
    RUN apk add --no-progress git make cmake gcc g++ libmad-dev \
        libid3tag-dev libsndfile-dev gd-dev boost-dev \
        libgd libpng-dev zlib-dev zlib-static libpng-static boost-static \
        libmad libsndfile libid3tag gd boost boost-program_options \ 
        autoconf automake libtool gettext \
        && wget https://github.com/xiph/flac/archive/1.3.3.tar.gz \
        && tar xzf 1.3.3.tar.gz \
        && cd flac-1.3.3 \ 
        && ./autogen.sh \
        && ./configure --enable-shared=no \ 
        && make \ 
        && make install

    RUN git clone https://github.com/xiph/vorbis.git \
        && cd vorbis \
        && ./autogen.sh \
        && ./configure \ 
        && make \ 
        && make install

    # Compile audiowaveform 
    RUN  git clone https://github.com/bbc/audiowaveform.git  \
        && cd audiowaveform \                
        && mkdir build \
        && cd build \
        && cmake -D BUILD_STATIC=1 -D ENABLE_TESTS=0 .. \
        && make \
        && cp audiowaveform* /bin \
        && cd \
        && rm -rf /audiowaveform