首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Gaia支持下建立音频分析库Essentia失败

在Gaia支持下建立音频分析库Essentia失败
EN

Stack Overflow用户
提问于 2017-08-23 16:45:47
回答 1查看 266关注 0票数 0

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

当涉及到Essentia时,源代码的编译会失败,出现以下错误:

代码语言:javascript
复制
[...]
        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,下面是编译该文件的命令:

代码语言:javascript
复制
/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选项为我提供了链接器访问的实际路径(我认为这里没有什么不好的,只是为了完整起见):

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

  • MTG/gaia/blob/master/src/gaia.h
  • MTG/gaia/blob/master/src/transformation.h#L106
  • /MTG/essentia/blob/master/src/algorithms/highlevel/gaiatransform.h
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-08-23 22:47:20

最终导致问题的是配置Gaia时发生的错误。实际上,与其仅使用以下选项进行配置,不如使用以下选项:

代码语言:javascript
复制
./waf configure --with-python-bindings --with-asserts --with-cyclops

--with-stlfacade选项是由于疏忽而添加的。当将GaiaEssentia结合使用时,此选项不兼容。

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

https://stackoverflow.com/questions/45845260

复制
相关文章

相似问题

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