MTG / essentia

C++ library for audio and music analysis, description and synthesis, including Python bindings
http://essentia.upf.edu
GNU Affero General Public License v3.0
2.81k stars 525 forks source link

Can't build Essentia on macos sierra with miniconda #531

Open justinsalamon opened 7 years ago

justinsalamon commented 7 years ago

Hey, I'm trying to build essentia from source (2.1b3 release) inside a miniconda 2.7 environment on a fresh install of macOS Sierra.

Following the installation instructions, installed all dependencies via homebrew, waf configuration works fine, but building fails (terminal output provided below). Any tips? Thanks!

waf configuration:

(py27):essentia-2.1_beta3 jsalamon$ ./waf configure --mode=release --build-static --with-python --with-cpptests --with-examples --with-vamp
Setting top to                           : /Users/jsalamon/Documents/dev/essentia-2.1_beta3 
Setting out to                           : /Users/jsalamon/Documents/dev/essentia-2.1_beta3/build 
→ configuring the project in /Users/jsalamon/Documents/dev/essentia-2.1_beta3
→ Building in release mode
Checking for 'g++' (c++ compiler)        : /usr/bin/g++ 
Checking for 'gcc' (c compiler)          : /usr/bin/gcc 
Checking for program pkg-config          : /usr/local/bin/pkg-config 
Checking for 'libavcodec' >= 55.34.1     : yes 
Checking for 'libavformat'               : yes 
Checking for 'libavutil'                 : yes 
Checking for 'libavresample'             : yes 
Checking for 'samplerate'                : yes 
Checking for 'taglib' >= 1.9             : yes 
Checking for 'yaml-0.1'                  : yes 
/usr/local/Cellar/libyaml/0.1.7/include
Checking for 'fftw3f'                    : yes 
Checking for program python              : /Users/jsalamon/Documents/dev/miniconda3/envs/py27/bin/python 
Checking for python version              : (2, 7, 12, 'final', 0) 
Checking for library python2.7 in LIBPATH_PYEMBED : yes 
Checking for program /Users/jsalamon/Documents/dev/miniconda3/envs/py27/bin/python-config,python2.7-config,python-config-2.7,python2.7m-config : /Users/jsalamon/Documents/dev/miniconda3/envs/py27/bin/python-config 
Checking for header Python.h                                                                                                                   : yes 

================================ CONFIGURATION SUMMARY ================================
- using FFTW for FFT

- fftw detected!
- FFmpeg / libav detected!
- libsamplerate (SRC) detected!
  The following algorithms will be included: ['MonoLoader', 'Resample', 'AudioWriter', 'EasyLoader', 'MonoWriter', 'EqloudLoader', 'AudioLoader']

- TagLib detected!
  The following algorithms will be included: ['MetadataReader']

- libyaml detected!
  The following algorithms will be included: ['YamlInput', 'YamlOutput']

- Essentia is configured without Gaia2.
  The following algorithms will be ignored: ['GaiaTransform']
  Examples requiring Gaia2 will be ignored

- Compiling 40 examples
  standard_beatsmarker, standard_mfcc, standard_onsetrate, standard_pitchyinfft, standard_fadedetection, standard_spectralcontrast, standard_rhythmtransform, standard_vibrato, standard_pitchmelodia, standard_notetranscription, standard_pitchdemo, streaming_extractor_music, streaming_beatsmarker, streaming_mfcc, streaming_gfcc, streaming_rhythmextractor_multifeature, streaming_beattracker_multifeature_mirex2013, streaming_onsetrate, streaming_panning, streaming_tuningfrequency, streaming_key, streaming_pitchyinfft, streaming_predominantmelody, streaming_pitchmelodia, streaming_vibrato, streaming_notetranscription, streaming_md5, streaming_memoryleak, streaming_extractor_freesound, standard_stft, streaming_stft, standard_predominantmask, standard_sinemodel, standard_sinesubtraction, standard_stochasticmodel, standard_spsmodel, standard_sprmodel, standard_harmonicmodel, standard_hpsmodel, standard_hprmodel
Building all the algorithms
Ignoring the following algorithms: IFFTA, GaiaTransform, IFFTK, FFTA, FFTK
Created algorithms registration file
=======================================================================================
'configure' finished successfully (0.512s)

Building:

(py27):essentia-2.1_beta3 jsalamon$ ./waf
Waf: Entering directory `/Users/jsalamon/Documents/dev/essentia-2.1_beta3/build'
→ building from /Users/jsalamon/Documents/dev/essentia-2.1_beta3
→ building from /Users/jsalamon/Documents/dev/essentia-2.1_beta3/src
Building all the algorithms
Ignoring the following algorithms: IFFTA, GaiaTransform, FFTK, FFTA, IFFTK
Created algorithms registration file
→ building from /Users/jsalamon/Documents/dev/essentia-2.1_beta3/src/examples
→ building from /Users/jsalamon/Documents/dev/essentia-2.1_beta3/src/python
[ 29/364] cxx: src/essentia/utils/synth_utils.cpp -> build/src/essentia/utils/synth_utils.cpp.1.o
[ 31/364] cxx: src/algorithms/rhythm/rhythmextractor2013.cpp -> build/src/algorithms/rhythm/rhythmextractor2013.cpp.1.o
[ 32/364] cxx: src/algorithms/extractor/rhythmdescriptors.cpp -> build/src/algorithms/extractor/rhythmdescriptors.cpp.1.o
[ 33/364] cxx: src/algorithms/tonal/vibrato.cpp -> build/src/algorithms/tonal/vibrato.cpp.1.o
../src/essentia/utils/synth_utils.cpp:119:12: error: no matching member function for call to 'real'
    fft[i].real(0);
    ~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1046:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real()
                  ^
/usr/include/c++/4.2.1/complex:1050:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real() const
                  ^
../src/essentia/utils/synth_utils.cpp:120:12: error: no matching member function for call to 'imag'
    fft[i].imag(0);
    ~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1054:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::imag()
                  ^
/usr/include/c++/4.2.1/complex:1058:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::imag() const
                  ^
../src/essentia/utils/synth_utils.cpp:151:29: error: no matching member function for call to 'real'
        outfft[ploc_int+jj].real( outfft[ploc_int+jj].real() + mag*bh_92_1001[(int)((bin_remainder+jj)*100) + BH_SIZE_BY2]*cos(ipphase[ii]));
        ~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1046:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real()
                  ^
/usr/include/c++/4.2.1/complex:1050:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real() const
                  ^
../src/essentia/utils/synth_utils.cpp:152:26: error: no matching member function for call to 'imag'
                        outfft[ploc_int+jj].imag( outfft[ploc_int+jj].imag() + mag*bh_92_1001[(int)((bin_remainder+jj)*100) + BH_SIZE_BY2]*sin(ipphase[ii]));     
                        ~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1054:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::imag()
                  ^
/usr/include/c++/4.2.1/complex:1058:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::imag() const
                  ^
../src/essentia/utils/synth_utils.cpp:165:32: error: no matching member function for call to 'real'
                                outfft[-1*(ploc_int+jj)].real( outfft[-1*(ploc_int+jj)].real() + mag*bh_92_1001[(int)((bin_remainder+jj)*100) + BH_SIZE_BY2]*cos(ipphase[ii]));
                                ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1046:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real()
                  ^
/usr/include/c++/4.2.1/complex:1050:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real() const
                  ^
../src/essentia/utils/synth_utils.cpp:166:33: error: no matching member function for call to 'imag'
                        outfft[-1*(ploc_int+jj)].imag( outfft[-1*(ploc_int+jj)].imag() + -1*mag*bh_92_1001[(int)((bin_remainder+jj)*100) + BH_SIZE_BY2]*sin(ipphase[ii]));
                        ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1054:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::imag()
                  ^
/usr/include/c++/4.2.1/complex:1058:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::imag() const
                  ^
../src/essentia/utils/synth_utils.cpp:171:33: error: no matching member function for call to 'real'
          outfft[(ploc_int+jj)].real( outfft[(ploc_int+jj)].real() + 2*mag*bh_92_1001[(int)((bin_remainder+jj)*100) + BH_SIZE_BY2]*cos(ipphase[ii]));
          ~~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1046:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real()
                  ^
/usr/include/c++/4.2.1/complex:1050:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real() const
                  ^
../src/essentia/utils/synth_utils.cpp:175:30: error: no matching member function for call to 'real'
                        outfft[(ploc_int+jj)].real( outfft[ploc_int+jj].real() + mag*bh_92_1001[(int)((bin_remainder+jj)*100) + BH_SIZE_BY2]*cos(ipphase[ii]));
                        ~~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1046:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real()
                  ^
/usr/include/c++/4.2.1/complex:1050:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real() const
                  ^
../src/essentia/utils/synth_utils.cpp:176:30: error: no matching member function for call to 'imag'
                outfft[ploc_int+jj].imag( outfft[ploc_int+jj].imag() + mag*bh_92_1001[(int)((bin_remainder+jj)*100) + BH_SIZE_BY2]*sin(ipphase[ii]));
                ~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1054:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::imag()
                  ^
/usr/include/c++/4.2.1/complex:1058:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::imag() const
                  ^
../src/essentia/utils/synth_utils.cpp:190:40: error: no matching member function for call to 'real'
                        outfft[size_spec-(ploc_int+jj)].real( outfft[size_spec-(ploc_int+jj)].real() + mag*bh_92_1001[(int)((bin_remainder+jj)*100) + BH_SIZE_BY2]*cos(ipphase[ii]));
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1046:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real()
                  ^
/usr/include/c++/4.2.1/complex:1050:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real() const
                  ^
../src/essentia/utils/synth_utils.cpp:191:42: error: no matching member function for call to 'imag'
                outfft[size_spec-(ploc_int+jj)].imag( outfft[size_spec-(ploc_int+jj)].imag() + -1*mag*bh_92_1001[(int)((bin_remainder+jj)*100) + BH_SIZE_BY2]*sin(ipphase[ii]));
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1054:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::imag()
                  ^
/usr/include/c++/4.2.1/complex:1058:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::imag() const
                  ^
../src/essentia/utils/synth_utils.cpp:196:28: error: no matching member function for call to 'real'
                                        outfft[(ploc_int+jj)].real( outfft[ploc_int+jj].real() + 2*mag*bh_92_1001[(int)((bin_remainder+jj)*100) + BH_SIZE_BY2]*cos(ipphase[ii]));
                                        ~~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1046:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real()
                  ^
/usr/include/c++/4.2.1/complex:1050:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real() const
                  ^
../src/essentia/utils/synth_utils.cpp:201:30: error: no matching member function for call to 'real'
                        outfft[(ploc_int+jj)].real( outfft[ploc_int+jj].real() + mag*bh_92_1001[(int)((bin_remainder+jj)*100) + BH_SIZE_BY2]*cos(ipphase[ii]));
                        ~~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1046:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real()
                  ^
/usr/include/c++/4.2.1/complex:1050:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::real() const
                  ^
../src/essentia/utils/synth_utils.cpp:202:32: error: no matching member function for call to 'imag'
                outfft[(ploc_int+jj)].imag( outfft[ploc_int+jj].imag() + -1*mag*bh_92_1001[(int)((bin_remainder+jj)*100) + BH_SIZE_BY2]*sin(ipphase[ii]));
                ~~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/4.2.1/complex:1054:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::imag()
                  ^
/usr/include/c++/4.2.1/complex:1058:19: note: candidate function not viable: requires 0 arguments, but 1 was provided
  complex<float>::imag() const
                  ^
14 errors generated.
Waf: Leaving directory `/Users/jsalamon/Documents/dev/essentia-2.1_beta3/build'
Build failed
 -> task in 'essentia' failed (exit status 1): 
    {task 4345918288: cxx synth_utils.cpp -> synth_utils.cpp.1.o}
['/usr/bin/g++', '-pipe', '-Wall', '-msse', '-msse2', '-mfpmath=sse', '-O2', '-fPIC', '-fPIC', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/build/src', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/src', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/build/src/essentia', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/src/essentia', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/build/src/essentia/scheduler', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/src/essentia/scheduler', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/build/src/essentia/streaming', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/src/essentia/streaming', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/build/src/essentia/streaming/algorithms', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/src/essentia/streaming/algorithms', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/build/src/essentia/utils', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/src/essentia/utils', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/build/src/3rdparty', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/src/3rdparty', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/build/src/3rdparty/spline', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/src/3rdparty/spline', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/build/src/3rdparty/vamp-plugin-sdk-2.4', '-I/Users/jsalamon/Documents/dev/essentia-2.1_beta3/src/3rdparty/vamp-plugin-sdk-2.4', '-I/usr/local/Cellar/fftw/3.3.5/include', '-I/usr/local/Cellar/ffmpeg/3.2.2/include', '-I/usr/local/Cellar/libsamplerate/0.1.9/include', '-I/usr/local/Cellar/taglib/1.11.1/include/taglib', '-I/usr/local/Cellar/libyaml/0.1.7/include', '-DGTEST_HAS_TR1_TUPLE=0', '-DHAVE_AVCODEC=1', '-DHAVE_AVFORMAT=1', '-DHAVE_AVUTIL=1', '-DHAVE_AVRESAMPLE=1', '-DHAVE_SAMPLERATE=1', '-DHAVE_TAGLIB=1', '-DHAVE_YAML=1', '-DHAVE_FFTW=1', '-D__STDC_CONSTANT_MACROS', '-DPYTHONDIR="/usr/local/lib/python2.7/site-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python2.7/site-packages"', '-DHAVE_PYTHON_H=1', '../src/essentia/utils/synth_utils.cpp', '-c', '-o', 'src/essentia/utils/synth_utils.cpp.1.o']
dbogdanov commented 7 years ago

This looks relevant. What's your compiler?

Works for me:

dbogdanov@Dimi:~/mtg/essentia(master)$ /usr/bin/g++ -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin