首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在aws elastic beanstalk上安装时出现音频波形错误(无此类文件或目录#include "gmock/gmock.h")

在aws elastic beanstalk上安装时出现音频波形错误(无此类文件或目录#include "gmock/gmock.h")
EN

Stack Overflow用户
提问于 2021-09-08 19:56:08
回答 1查看 71关注 0票数 0

我一直通过ebextensions在AWS Elastic Beanstalk上安装和使用audiowaveform,但由于某些原因,我现在在构建过程中遇到错误:

代码语言:javascript
复制
...
[ 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.

下面是我一直在使用的ebextension:

代码语言:javascript
复制
    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"

有谁知道有什么改变了吗?到目前为止,我还没有找到任何东西。

我需要使用不同的流程吗?我真的不知道下一步该做什么。我已经创建了一个新的应用程序和环境,并尝试将其部署到其中,以确保我没有弄乱当前的应用程序和环境,但我得到了相同的错误。

EN

回答 1

Stack Overflow用户

发布于 2021-09-08 23:29:17

看起来像是版本问题。这是在我们的开发环境上,发现它试图安装版本1.5.1,而我们的生产版本是1.4.2。所以我改变了

/opt/src/audiowaveform:https://github.com/bbc/audiowaveform/archive/master.zip

/opt/src/audiowaveform:https://github.com/bbc/audiowaveform/archive/refs/tags/1.4.2.zip

并在下面的命令中将对audiowaveform-master的所有引用更改为audiowaveform-1.4.2,它似乎起作用了。

目前我们在一个被弃用的平台上,所以我同时过渡到一个支持的平台,所以我还没有确保它完全工作,但至少它构建了它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69108966

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档