essentia icon indicating copy to clipboard operation
essentia copied to clipboard

Build on Windows

Open q-depot opened this issue 10 years ago • 14 comments

did anybody manage to compile on Windows?

q-depot avatar Dec 19 '14 10:12 q-depot

Yes, you can cross-compile using mingw from linux.

https://github.com/MTG/essentia/blob/master/FAQ.md#cross-compiling-for-windows-on-linux

You can also do it from Windows itself, using mingw_port branch, few commits back. The https://github.com/MTG/essentia/commit/da80e8bdb7b90048b3dac2ebe338d5b25016cab9 replaced native compilation for windows by cross-compiling. That branch has not been updated for a while.

dbogdanov avatar Jan 05 '15 13:01 dbogdanov

Hi, I'd rather stay on the master branch, also as I did for OSX I'm trying to compile without the optional dependencies.

is this something doable as now or does it require lots of work?

thanks Andrea

q-depot avatar Jan 05 '15 13:01 q-depot

Then just cross-compile from linux. Do you what to use extractors only? streaming_extractor_music build for windows is available here

dbogdanov avatar Jan 08 '15 13:01 dbogdanov

Ideally I'd like to build it in the same way I did it for OSX using lightweight=fftw Unfortunately I don't have a linux machine here, I'll probably have a go with Visual Studio at some point, did you try it before?

q-depot avatar Jan 08 '15 13:01 q-depot

You can compile with MinGW on windows, modifying a build script a bit (and looking how it was done in mingw branch before), and we will bring back support for building natively at some point.

dbogdanov avatar Jan 12 '15 12:01 dbogdanov

which script are you referring to? I had a look at the mingw_port branch and I couldn't find it.(I'm not familiar with MinGW)

q-depot avatar Jan 16 '15 13:01 q-depot

Hi,

I'm trying to cross compile from ubuntu, the build_fftw3.sh script runs fine, but at the end it output:

cp: cannot stat .libs/libfftw3f-3.dll

despite that I can build essentia using ./waf configure --lightweight=fftw --prefix=_PATH_ --cross-compile-mingw32

waf run successfully, however it generates the file libessentia.a which should be a static lib for unix, I was expecting either a dll or a lib file, if then I try to link to that library from VS I get tons of unresolved link errors, am I missing something?

thanks Andrea

q-depot avatar Jan 21 '15 15:01 q-depot

The ".a" is a normal output. It seems that unfortunately MinGw builds are only compatible with MSVC only in the case of C, not C++.

http://stackoverflow.com/questions/2096519/from-mingw-static-library-a-to-visual-studio-static-library-lib http://stackoverflow.com/questions/2529770/how-to-use-libraries-compiled-with-mingw-in-msvc

Is there a specific reason you are using VS instead of Code::Blocks?

dbogdanov avatar Feb 02 '15 13:02 dbogdanov

I need to use Essentia with Cinder and another framework, both only working with VS, migrating the whole thing is not possible.

is there any solution to compile it in VS2012?

q-depot avatar Feb 03 '15 15:02 q-depot

Sure, but it will be more difficult. It is possible to run Essentia's waf build scripts from VS. Although I did not try it myself, I've heard some people successfully did it. Perhaps you will need to modify scripts a little bit. You can take precompiled 3rd party dependencies here and place them to the corresponding folder in the code.

The best solution would be updating waf version supplied with Essentia and using a Visual Studio project generator script.

dbogdanov avatar Feb 03 '15 16:02 dbogdanov

would it be possible to simply create and build a VS2012 project or is there anything specific that wouldn't work? I'm asking because I've managed to build something in VS2013, but then it didn't link properly(unresolved symbols..). I had to strip off some classes to remove all the dependencies except for fftw, but I've managed at least generate a static library.

q-depot avatar Feb 04 '15 18:02 q-depot

I followed the FAQ instructions on cross-compiling for Windows on Linux, and got an error (below).

I found out about Essentia thanks to Steve Tjoa's IPython Notebooks on music information retrieval. Essentia looks awesome and I'm looking forward to using it via Python bindings on Windows.

I've never attempted to compile from source before, because most Python packages I use are included in the Anaconda distribution, or there are Windows binary installers available (for example, OpenCV). If you are able to improve the getting started experience, by providing an installer, and/or improved documentation, it will help Essentia adoption flourish even more. Thank you for your time and assistance!

Build failed -> task in 'essentia' failed (exit status 1): {task 40347472: cxx metadatareader.cpp -> metadatareader.cpp.1.o} ['/usr/bin/i686-w64-mingw32-g++', '-static-libgcc', '-static-libstdc++', '-I/hom e/vagrant/essentia/build/src', '-I/home/vagrant/essentia/src', '-I/home/vagrant/ essentia/build/src/essentia', '-I/home/vagrant/essentia/src/essentia', '-I/home/ vagrant/essentia/build/src/essentia/scheduler', '-I/home/vagrant/essentia/src/es sentia/scheduler', '-I/home/vagrant/essentia/build/src/essentia/streaming', '-I/ home/vagrant/essentia/src/essentia/streaming', '-I/home/vagrant/essentia/build/s rc/essentia/streaming/algorithms', '-I/home/vagrant/essentia/src/essentia/stream ing/algorithms', '-I/home/vagrant/essentia/build/src/essentia/utils', '-I/home/v agrant/essentia/src/essentia/utils', '-I/home/vagrant/essentia/build/src/3rdpart y', '-I/home/vagrant/essentia/src/3rdparty', '-I/home/vagrant/essentia/build/src /3rdparty/spline', '-I/home/vagrant/essentia/src/3rdparty/spline', '-I/home/vagr ant/essentia/packaging/win32_3rdparty/include', '-DHAVE_AVFORMAT=1', '-DHAVE_AVU TIL=1', '-DHAVE_SAMPLERATE=1', '-DHAVE_TAGLIB=1', '-DHAVE_YAML=1', '-DHAVE_FFTW= 1', '-D__STDC_CONSTANT_MACROS', '../src/algorithms/io/metadatareader.cpp', '-c', '-o', 'src/algorithms/io/metadatareader.cpp.1.o']

rrherr avatar Jun 16 '15 18:06 rrherr

Have there been any updates on a Windows port?

Martmists-GH avatar Jul 05 '19 23:07 Martmists-GH

still need it.

imiskolee avatar Nov 18 '21 09:11 imiskolee