Reputation: 361
I have been installing and using audiowaveform on AWS Elastic Beanstalk via an ebextensions but for some reason I now get an error during the build process:
...
[ 72%] Building CXX object CMakeFiles/audiowaveform_tests.dir/src/WavFileWriter.cpp.o
[ 73%] Building C object CMakeFiles/audiowaveform_tests.dir/src/madlld-1.1p1/bstdfile.c.o
[ 75%] Building CXX object CMakeFiles/audiowaveform_tests.dir/test/FileFormatTest.cpp.o
/opt/src/audiowaveform/audiowaveform-master/test/FileFormatTest.cpp:26:25:
fatal error: gmock/gmock.h: No such file or directory #include "gmock/gmock.h" ^ compilation terminated.
make[2]: *** [CMakeFiles/audiowaveform_tests.dir/test/FileFormatTest.cpp.o] Error 1
make[1]: *** [CMakeFiles/audiowaveform_tests.dir/all] Error 2 make: *** [all] Error 2.
Below is the ebextension that I have been using:
packages:
yum:
make: []
cmake: []
gcc-c++: []
gd-devel: []
boost-devel: []
sources:
/opt/src/audiowaveform: https://github.com/bbc/audiowaveform/archive/master.zip
/opt/src/googletest: https://github.com/google/googletest/archive/release-1.10.0.tar.gz
/opt/src/libmad: https://sourceforge.net/projects/mad/files/libmad/0.15.1b/libmad-0.15.1b.tar.gz/download
/opt/src/libsndfile: http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz
/opt/src/libid3tag: https://sourceforge.net/projects/mad/files/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz/download
files:
/usr/lib/pkgconfig/mad.pc:
mode: "000755"
owner: root
group: root
content: |
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}
/etc/ld.so.conf.d/libsndfile:
mode: "000644"
owner: root
group: root
content: |
/usr/lib/
commands:
00-install-libmad-make:
command: "sed -i '/-fforce-mem/d' configure"
cwd: /opt/src/libmad/libmad-0.15.1b/
01-install-libmad-make:
command: "./configure --prefix=/usr && make && make install"
cwd: /opt/src/libmad/libmad-0.15.1b
test: "[ ! -f /usr/local/bin/audiowaveform ]"
02-install-libsndfile-make:
command: "./configure --prefix=/usr --disable-static --docdir=/usr/share/doc/libsndfile-1.0.28 && make && make install"
cwd: /opt/src/libsndfile/libsndfile-1.0.28
test: "[ ! -f /usr/local/bin/audiowaveform ]"
03-install-libid3tag-make:
command: "./configure --prefix=/usr && make && make install"
cwd: /opt/src/libid3tag/libid3tag-0.15.1b
test: "[ ! -f /usr/local/bin/audiowaveform ]"
04-change-mod-audiowaveform:
command: "chmod -R 755 audiowaveform-master"
cwd: /opt/src/audiowaveform
05-audiowaveform-ln-test:
command: "ln -s ../../googletest/googletest-release-1.10.0/googletest ./googletest"
cwd: /opt/src/audiowaveform/audiowaveform-master/
test: "[ ! -L ./googletest ]"
06-audiowaveform-ln-mock:
command: "ln -s ../../googletest/googletest-release-1.10.0/googlemock ./googlemock"
cwd: /opt/src/audiowaveform/audiowaveform-master/
test: "[ ! -L ./googlemock ]"
07-audiowaveform-mkdir-build:
command: "sudo mkdir build"
cwd: /opt/src/audiowaveform/audiowaveform-master/
test: "[ ! -d ./build ]"
08-audiowaveform-cmake:
command: "cmake .."
cwd: /opt/src/audiowaveform/audiowaveform-master/build/
test: "[ ! -f /usr/local/bin/audiowaveform ]"
09-audiowaveform-make:
command: "make"
cwd: /opt/src/audiowaveform/audiowaveform-master/build/
test: "[ ! -f /usr/local/bin/audiowaveform ]"
10-audiowaveform-make-install:
command: "make install"
cwd: /opt/src/audiowaveform/audiowaveform-master/build/
test: "[ ! -f /usr/local/bin/audiowaveform ]"
11-ldconfig:
command: "ldconfig"
Anyone know of something that has changed? So far I haven't found anything.
Do I need to use a different process? I am really not sure what to do next. I have created an new application and environment and tried deploying to it to make sure I haven't messed up the current one but I get the same error.
Upvotes: 1
Views: 258
Reputation: 361
Well it looks like it is a version issue. This was on our dev environment and found out it was trying to install version 1.5.1 and our production version is on 1.4.2. So I changed the
/opt/src/audiowaveform: https://github.com/bbc/audiowaveform/archive/master.zip
to
/opt/src/audiowaveform: https://github.com/bbc/audiowaveform/archive/refs/tags/1.4.2.zip
and changed all the references to audiowaveform-master to audiowaveform-1.4.2 in the commands below and it seems to work.
Currently we are on a deprecated platform so am transitioning to a supported platform at the same time so I haven't made sure that it works completely but at least it builds it.
Upvotes: 1