MTG / gaia

C++ library to apply similarity measures and classifications on the results of audio analysis, including Python bindings. Together with Essentia it can be used to compute high-level descriptions of music.
http://essentia.upf.edu
GNU Affero General Public License v3.0
271 stars 66 forks source link

Gaia build with Python bindings fails on Windows-Subsystem for Linux (Debian) #112

Open davidriederer opened 4 years ago

davidriederer commented 4 years ago

When building Gaia with Python 3.7 bindings from within a Debian WSL (Windows-Subsystem for Linux) on a Windows 10 Enterprise machine, the build fails when using swig to generate the bindings due to a missing (temporary?) directory from where the built Python package is supposed to be copied, I presume. The dependencies installed without error and Gaia builds fine without the python bindings. The repo is cloned to a second internal harddrive,, accessed via /mnt/d/.ath/to/repo/gaia.

What I tried to find a solution:

Steps to reproduce:

It builds correctly without --with-python-bindings.

The truncated output from the configure step is: ... Checking for program 'swig' : /usr/bin/swig Checking for program 'python' : /usr/bin/python Checking for swig version : 3.0.12 Checking for python version >= 3.5 : 3.7.3 python-config : /usr/bin/python-config Asking python-config for pyembed '--cflags --libs --ldflags --embed' flags : not found Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes Testing pyembed configuration : yes Asking python-config for pyext '--cflags --libs --ldflags' flags : yes Testing pyext configuration : yes'

The directory is indeed missing as specified in error message: .swigwrap_1.cxx: No such file or directoryare/gaia/build/src/bindings/gaia2. I'm not sure why the output path gets truncated like that from the original /mnt/d/build_swr/software/gaia/build/... and if that's an issue.

Output from ./waf -v after configuring the build with --with-python-bindings:

[85/92] Processing src/bindings/gaia.swig 12:13:03 runner ['/usr/bin/swig', '-c++', '-python', '-w451', '-o', '/mnt/d/build_swr/software/gaia/build/src/bindings/gaia2\r.swigwrap_1.cxx', '-Isrc', '-I../src', '-Isrc/bindings', '-I../src/bindings', '-Isrc/metrics', '-I../src/metrics', '-Isrc/3rdparty', '-I../src/3rdparty', '-I/usr/include/python2.7', '-I/usr/include/x86_64-linux-gnu/python2.7', '-I/usr/include/qt4', '-I/usr/include/qt4/QtCore', '-I/usr/include/eigen3', '-DGAIA_VERSION="2.4.6"', '-DGAIA_GIT_SHA="v2.4.4-136-ged433ed-dirty"', '-DHAVE_QTCORE=1', '-DHAVE_QTGUI=1', '-DHAVE_QTUITOOLS=1', '-DHAVE_QTNETWORK=1', '-DHAVE_QTOPENGL=1', '-DHAVE_QTSQL=1', '-DHAVE_QTSVG=1', '-DHAVE_QTTEST=1', '-DHAVE_QTXML=1', '-DHAVE_QTXMLPATTERNS=1', '-DHAVE_QT3SUPPORT=1', '-DHAVE_QTHELP=1', '-DHAVE_QTSCRIPT=1', '-DHAVE_QTDECLARATIVE=1', '-DHAVE_QTDESIGNER=1', '-DPYTHONDIR="/usr/local/lib/python3/dist-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python3/dist-packages"', '-DHAVE_PYEMBED=1', '-DHAVE_PYEXT=1', '-DHAVE_PYTHON_H=1', '-D_FORTIFY_SOURCE=2', '-DNDEBUG', '-DQT_SHARED', '../src/bindings/gaia.swig'] .swigwrap_1.cxx: No such file or directoryare/gaia/build/src/bindings/gaia2

Waf: Leaving directory /mnt/d/build_swr/software/gaia/build' Build failed -> task in '_gaia2' failed with exit status 1: .py}gwrap_1.cxx,gaia257089496: swig gaia.swig -> gaia2 ['/usr/bin/swig', '-c++', '-python', '-w451', '-o', '/mnt/d/build_swr/software/gaia/build/src/bindings/gaia2\r.swigwrap_1.cxx', '-Isrc', '-I../src', '-Isrc/bindings', '-I../src/bindings', '-Isrc/metrics', '-I../src/metrics', '-Isrc/3rdparty', '-I../src/3rdparty', '-I/usr/include/python2.7', '-I/usr/include/x86_64-linux-gnu/python2.7', '-I/usr/include/qt4', '-I/usr/include/qt4/QtCore', '-I/usr/include/eigen3', '-DGAIA_VERSION="2.4.6"', '-DGAIA_GIT_SHA="v2.4.4-136-ged433ed-dirty"', '-DHAVE_QTCORE=1', '-DHAVE_QTGUI=1', '-DHAVE_QTUITOOLS=1', '-DHAVE_QTNETWORK=1', '-DHAVE_QTOPENGL=1', '-DHAVE_QTSQL=1', '-DHAVE_QTSVG=1', '-DHAVE_QTTEST=1', '-DHAVE_QTXML=1', '-DHAVE_QTXMLPATTERNS=1', '-DHAVE_QT3SUPPORT=1', '-DHAVE_QTHELP=1', '-DHAVE_QTSCRIPT=1', '-DHAVE_QTDECLARATIVE=1', '-DHAVE_QTDESIGNER=1', '-DPYTHONDIR="/usr/local/lib/python3/dist-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python3/dist-packages"', '-DHAVE_PYEMBED=1', '-DHAVE_PYEXT=1', '-DHAVE_PYTHON_H=1', '-D_FORTIFY_SOURCE=2', '-DNDEBUG', '-DQT_SHARED', '../src/bindings/gaia.swig']