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

Windows build (and/or instructions) not working #133

Open
twynb opened this issue Aug 6, 2023 · 4 comments
Open

Windows build (and/or instructions) not working #133

twynb opened this issue Aug 6, 2023 · 4 comments

Comments

@twynb
Copy link

twynb commented Aug 6, 2023

Problem: When attempting to build chromaprint.dll on windows, the install instructions don't apply. Also, at least in my case, the windows build fails to run.

The smaller problem: The instructions in the README.md only describe building using make. As cmake generates a VS .sln file and .vcxproject files rather than a makefile, the instructions don't apply, you have to build using visual studio. This part is just a documentation issue, it did compile without compilation errors.

The bigger problem: On my system (Windows 10.0.19045, with the gyan.dedv ffmpeg 5.1.2 build), attempting to build chromaprint does create a .dll file. However, attempting to open it (from the PyAcoustID library in my case) throws an error: Could not find module 'C:\Program Files (x86)\chromaprint\bin\chromaprint.dll' (or one of its dependencies). Try using the full path with constructor syntax.

The location of chromaprint.dll as well as the ffmpeg/bin folder are both in the system PATH, and looking through the resulting chromaprint.dll using a dependency walker, I cannot find any dependencies that aren't from ffmpeg or system32.

Perhaps noteworthy: The fpcalc.exe command line tool also compiled during building works without issues, as far as I can tell. Looking at it with the dependency walker, it does seem to include chromaprint.dll, which it says loads correctly. It does however also say that the checksum for the chromaprint.dll is 0x00000000, which it flags as incorrect.

Is this user error on my end or can others also reproduce this problem? If it's the former, what's my mistake here?

@lalinsky
Copy link
Member

lalinsky commented Aug 7, 2023

My main question is, why do you want to build it? If you are a developer, you should be able to investigate and fix the problem. If you just want to use it, please download the fpcalc binary from https://acoustid.org/chromaprint.

I'm not sure if anyone has ever built the library using Visual Studio. Building something with FFmpeg is not easy, there are a lot of dependencies and you need to know how to handle them.

@twynb
Copy link
Author

twynb commented Aug 8, 2023

I want to build chromaprint because the library I'm working with (PyAcoustID) requires libchromaprint.dll, not just the fpcalc binary, but as far as I can tell, libchromaprint.dll isn't being distributed anywhere.

I tried building with make now, to no avail, the same error is thrown. I hadn't tried this before simply because I wasn't aware it was an option and had assumed it was just a documentation issue. The reason for that is the same why I'm having a hard time investigating this - I'm not too experienced with CMake/C++ in general, this is the first time I'm looking into CMake/building C++ programs with any sort of depth.

Is there a different, easier way to get ahold of libchromaprint.dll, and if no, can you please provide me with advice as to what could be going wrong with my build?

@lalinsky
Copy link
Member

lalinsky commented Aug 8, 2023

Pyacoustid can use fpcalc.exe, see https://github.com/beetbox/pyacoustid/blob/master/acoustid.py#L354

Using that is the best option.

I don't distribute chromaprint.dll specifically because it's not straight forward to build a standalone dll that can be linked into other programs but does not have any other dependencies on it's own.

@albertopasqualetto
Copy link

@twynb there was a problem in pyacoustid, now it is working (after beetbox/pyacoustid#79).
This issue can be closed.

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

No branches or pull requests

3 participants