Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on Windows #204

Open
q-depot opened this issue Dec 19, 2014 · 14 comments
Open

Build on Windows #204

q-depot opened this issue Dec 19, 2014 · 14 comments
Labels
Milestone

Comments

@q-depot
Copy link

q-depot commented Dec 19, 2014

did anybody manage to compile on Windows?

@dbogdanov
Copy link
Member

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 da80e8b replaced native compilation for windows by cross-compiling. That branch has not been updated for a while.

@q-depot
Copy link
Author

q-depot commented Jan 5, 2015

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

@dbogdanov
Copy link
Member

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

@dbogdanov dbogdanov reopened this Jan 8, 2015
@q-depot
Copy link
Author

q-depot commented Jan 8, 2015

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?

@dbogdanov
Copy link
Member

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.

@q-depot
Copy link
Author

q-depot commented Jan 16, 2015

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
Copy link
Author

q-depot commented Jan 21, 2015

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

@dbogdanov
Copy link
Member

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?

@q-depot
Copy link
Author

q-depot commented Feb 3, 2015

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?

@dbogdanov
Copy link
Member

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.

@q-depot
Copy link
Author

q-depot commented Feb 4, 2015

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.

@rrherr
Copy link

rrherr commented Jun 16, 2015

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']

@Martmists-GH
Copy link

Have there been any updates on a Windows port?

@anchpop anchpop mentioned this issue Aug 4, 2020
@imiskolee
Copy link

still need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants