gpt4 book ai didi

c++ - 在 Gaia 支持下构建音频分析库 Essentia 失败

转载 作者:行者123 更新时间:2023-12-04 17:02:12 24 4
gpt4 key购买 nike

我正在尝试构建 Essentia ( https://github.com/MTG/essentia ),一个音频分析库,带有 Gaia ( https://github.com/MTG/gaia ) 支持 Debian 9.0从源头。在此之前,它的一个依赖项,即 Gaia ,也从源代码成功构建。它安装在 /usr/local/ .

说到Essentia , 源代码编译失败并出现以下错误:

[...]
In file included from ../src/algorithms/essentia_algorithms_reg.cpp:21:0:
../src/algorithms/highlevel/gaiatransform.h: At global scope:
../src/algorithms/highlevel/gaiatransform.h:37:10: error: ‘TransfoChain’ in namespace ‘gaia2’ does not name a type
gaia2::TransfoChain _history;
^~~~~~~~~~~~
../src/algorithms/highlevel/gaiatransform.h: In constructor ‘essentia::standard::GaiaTransform::GaiaTransform()’:
../src/algorithms/highlevel/gaiatransform.h:47:5: error: ‘init’ is not a member of ‘gaia2’
gaia2::init();
^~~~~
../src/algorithms/highlevel/gaiatransform.h:47:5: note: suggested alternative:
In file included from ../src/essentia/algorithmfactory.h:27:0,
from ../src/algorithms/essentia_algorithms_reg.cpp:1:
../src/essentia/essentia.h:46:6: note: ‘essentia::init’
void init();
^~~~

错误所在的文件是 /src/algorithms/essentia_algorithms_reg.cpp这是编译文件的命令:
/usr/bin/g++ -pipe -Wall -std=c++03 -msse -msse2 -mfpmath=sse -O2 -fPIC -pthread -Isrc -I../src -Isrc/essentia -I../src/essentia -Isrc/essentia/scheduler -I../src/essentia/scheduler -Isrc/essentia/streaming -I../src/essentia/streaming -Isrc/essentia/streaming/algorithms -I../src/essentia/streaming/algorithms -Isrc/essentia/utils -I../src/essentia/utils -Isrc/3rdparty -I../src/3rdparty -Isrc/3rdparty/spline -I../src/3rdparty/spline -Isrc/3rdparty/vamp-plugin-sdk-2.4 -I../src/3rdparty/vamp-plugin-sdk-2.4 -I/usr/include/x86_64-linux-gnu -I/usr/include/taglib -I/usr/local/include -I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/local/include/gaia2/ -DHAVE_AVCODEC=1 -DHAVE_AVFORMAT=1 -DHAVE_AVUTIL=1 -DHAVE_AVRESAMPLE=1 -DHAVE_SAMPLERATE=1 -DHAVE_TAGLIB=1 -DHAVE_YAML=1 -DHAVE_FFTW=1 -DHAVE_GAIA2=1 -D__STDC_CONSTANT_MACROS -DPYTHONDIR="/usr/local/lib/python2.7/dist-packages" -DPYTHONARCHDIR="/usr/local/lib/python2.7/dist-packages" -DHAVE_PYEMBED=1 -DHAVE_PYEXT=1 -DHAVE_PYTHON_H=1 ../src/algorithms/essentia_algorithms_reg.cpp -c -o/home/hamidi/essentia/build/src/algorithms/essentia_algorithms_reg.cpp.1.o -fPIC -v
g++-v选项给了我链接器访问的实际路径(我认为没有什么不好的,但为了完整起见):
#include "..." search starts here:
#include <...> search starts here:
src
../src
src/essentia
../src/essentia
src/essentia/scheduler
../src/essentia/scheduler
src/essentia/streaming
../src/essentia/streaming
src/essentia/streaming/algorithms
../src/essentia/streaming/algorithms
src/essentia/utils
../src/essentia/utils
src/3rdparty
../src/3rdparty
src/3rdparty/spline
../src/3rdparty/spline
src/3rdparty/vamp-plugin-sdk-2.4
../src/3rdparty/vamp-plugin-sdk-2.4
/usr/include/taglib
/usr/include/qt4
/usr/include/qt4/QtCore
/usr/local/include/gaia2/
/usr/include/c++/6
/usr/include/x86_64-linux-gnu/c++/6
/usr/include/c++/6/backward
/usr/lib/gcc/x86_64-linux-gnu/6/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.

以下是错误中涉及的文件(github repo):
  • MTG/gaia/blob/master/src/gaia.h
  • MTG/gaia/blob/master/src/transformation.h#L106
  • /MTG/essentia/blob/master/src/algorithms/highlevel/gaiatransform.h
  • 最佳答案

    最后是配置Gaia时出现的错误这导致了问题。实际上,不仅仅是使用以下配置选项:

    ./waf configure --with-python-bindings --with-asserts --with-cyclops

    选项 --with-stlfacade无意中添加的。使用 Gaia 时,此选项不兼容结合 Essentia .

    关于c++ - 在 Gaia 支持下构建音频分析库 Essentia 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45845260/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com