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.89k stars 241 forks source link

Support of RHEL9 (almalinux 9 in docker) #190

Closed dnoneill closed 1 year ago

dnoneill commented 1 year ago

Current error when trying to build is:

make[2]: *** No rule to make target '/usr/lib/libsndfile.so', needed by 'audiowaveform'. Stop.

chrisn commented 1 year ago

Which Dockerfile are you using?

dnoneill commented 1 year ago

I don't have a specific Dockerfile, I can get one for you but currently I am using a FROM almalinux for my Dockerfile and sshing into the Docker instance and running the manual install instructions in the README.

On Fri, Aug 4, 2023, 12:24 PM Chris Needham @.***> wrote:

Which Dockerfile are you using?

— Reply to this email directly, view it on GitHub https://github.com/bbc/audiowaveform/issues/190#issuecomment-1665878070, or unsubscribe https://github.com/notifications/unsubscribe-auth/AESJEZ7HHOIGTNGEE3NZGQTXTUO2HANCNFSM6AAAAAA3ELMJPY . You are receiving this because you authored the thread.Message ID: @.***>

chrisn commented 1 year ago

I see, thanks. I wondered if one of the Dockerfiles in https://github.com/bbc/audiowaveform/blob/master/rpm/ could be adapted for almalinux.

I'll be happy to update the instructions when we've got it working. The problem relates to the libsndfile dependency, which is available: https://almalinux.pkgs.org/9/almalinux-appstream-x86_64/libsndfile-1.0.31-7.el9.i686.rpm.html

dnoneill commented 1 year ago

I checked when i got that error. It is installed on my instance. It seems like the program isn't finding it.

On Fri, Aug 4, 2023, 3:04 PM Chris Needham @.***> wrote:

I see, thanks. I wondered if one of the Dockerfiles in https://github.com/bbc/audiowaveform/blob/master/rpm/ could be adapted for almalinux.

I'll be happy to update the instructions when we've got it working. The problem relates to the libsndfile dependency, which is available: https://almalinux.pkgs.org/9/almalinux-appstream-x86_64/libsndfile-1.0.31-7.el9.i686.rpm.html

— Reply to this email directly, view it on GitHub https://github.com/bbc/audiowaveform/issues/190#issuecomment-1666053690, or unsubscribe https://github.com/notifications/unsubscribe-auth/AESJEZ3HZNJ22JRWMYGEWLDXTVBSLANCNFSM6AAAAAA3ELMJPY . You are receiving this because you authored the thread.Message ID: @.***>

dnoneill commented 1 year ago

Here is the Dockerfile. Some of it is definitely specific to my application and you can remove some of the stuff.

FROM almalinux

RUN mkdir -p /opt/avpd WORKDIR /opt/avpd

EXPOSE 3000 EXPOSE 6379

ENV RAILS_ENV=development

RUN dnf install epel-release -y

RUN dnf install 'dnf-command(config-manager)' -y

RUN dnf config-manager --set-enabled crb -y

RUN dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm -y && dnf install --nogpgcheck https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm -y

RUN yum -y install epel-release git redis python python-devel rubygems nodejs sqlite libtiff libtiff-devel mysql espeak-ng libvpx git file ImageMagick openjpeg2 "@Development tools" ffmpeg ffmpeg-devel mysql-devel ruby-devel libtiff-tools openjpeg2-tools

RUN pip3 install openai-whisper jpylyzer

RUN yum install -y --enablerepo=epel libmad-devel

RUN yum install -y rpm-build wget git make cmake gcc-c++ libid3tag-devel libsndfile-devel gd-devel boost-devel

RUN 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 \ && cd .. \ && git clone https://github.com/bbc/audiowaveform.git \ && cd audiowaveform \ && wget https://github.com/google/googletest/archive/release-1.12.1.tar.gz \ && tar xzf release-1.12.1.tar.gz \ && ln -s googletest-release-1.12.1 googletest \ && mkdir build \ && cd build \ && cmake .. \ && make \ && make install

dnoneill commented 1 year ago

All of a sudden I was able to get it working in the bash shell. It was very strange. I am going to double check with docker but hopeful I will be able to close this issue.

chrisn commented 1 year ago

I'm happy to hear you got it working! Please leave the issue open, I'll add a Dockerfile to the collection in https://github.com/bbc/audiowaveform/tree/master/rpm, and then I can provide binaries at https://github.com/bbc/audiowaveform/releases.

dnoneill commented 1 year ago

@chrisn Sounds good. Thanks so much for responding so quickly and being so receptive. I missed a step in the Dockerfile so I have updated the comment so that the step is in there. It was this step RUN yum install -y --enablerepo=epel libmad-devel

chrisn commented 1 year ago

I've uploaded binaries to https://github.com/bbc/audiowaveform/releases/tag/1.8.1, and you can see the script and Dockerfile here.