New to windows build systems - how do i compile chromaprint?

747 views
Skip to first unread message

Felix Wolff

unread,
Apr 14, 2013, 8:44:50 AM4/14/13
to acou...@googlegroups.com
Hey everyone!

I have written a small application using chromaprint (on linux). Now I want to see
how it looks on windows, but as I don't have a lot of experience using the
MS building tools, I ran into some problems.

I run Windows 7 Professional inside a virtual machine, and decided to
go with the MSVC compiler from Microsoft Visual Studio 2010.
After setting it up and installing cmake, building taglib, another dependency of my project, worked finde.
Trying to build chromaprint however really got the best of me. I have now reached the point
where the compiler complains about unresolved external symbols in chromaprint.dll and I am totally at loss of what to do now.

Let me describe the steps I have taken to get to this point:
- download chromaprint sources
- download ffmpeg builds (http://ffmpeg.zeranoe.com/builds/), both the share and dev versions
- generate .lib files from the DLLs from the shared library ffmpeg build (with the help of this: http://wiki.videolan.org/GenerateLibFromDll)
- run cmake in chromaprint directory and set cmake variables to point to the .lib files inside the shared version directory
and to the include/ directory inside the dev version of the ffmpeg builds
- hit build inside visual studio

I have never worked with libraries before and don't know what to do next.
If someone could give me a hint, point me to some futher reading or whatever, I would be so glad!!

Lukáš Lalinský

unread,
Apr 15, 2013, 3:03:25 AM4/15/13
to Acoustid
On Sun, Apr 14, 2013 at 5:35 PM, <wolff...@gmail.com> wrote:
> Here is the complete output from the build process

Based on the log, I'd guess the import library for the FFmpeg DLL is
not created correctly.

This post seems to suggest it might be something with cdecl vs stdcall
calling convention:

http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/42203

I'm sorry for not being very helpful, but I do not have much
experience with MSVC.

Lukas

Felix Wolff

unread,
Apr 16, 2013, 2:46:31 PM4/16/13
to acou...@googlegroups.com
Yes, that was exactly the problem!

I don't have much experience with MSVC, but neither with MinGW.
And getting into cross-compiling for windows on Linux really looks daunting,
so that I don't know where to start. Anyway, thanks to your tip,
the chromaprint.dll build now succeeds (with inconsistent dll-linkage errors,
which I can't backtrack) and I could go on to build my first cross-platform program!

To advertise a little: check it out on flxw.de/qtagsort =)

Thanks for your help, again!

Felix
> --
> You received this message because you are subscribed to a topic in the Google Groups "AcoustID" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/acoustid/jsYSkl_z7aE/unsubscribe?hl=en-US.
> To unsubscribe from this group and all its topics, send an email to acoustid+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

barhoum...@gmail.com

unread,
Apr 20, 2015, 7:45:49 AM4/20/15
to acou...@googlegroups.com, wolff...@gmail.com
Hi,
I work for 5 days to install chromaprint, but I still can not do it !!! (or rather I not figure out if it is installed well or not) in fact when I do 

"cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=ON ." in the chromaprint-1.2 diractory ( downloaded for https://bitbucket.org/acoustid/chromaprint/downloads) i have this error 

ubuntu@ubuntu:~/Téléchargements/chromaprint-1.2$ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=ON .
CMake Warning at CMakeLists.txt:73 (find_package):
  Could not find module FindKissFFT.cmake or a configuration file for package
  KissFFT.

  Adjust CMAKE_MODULE_PATH to find FindKissFFT.cmake or set KissFFT_DIR to
  the directory containing a CMake configuration file for KissFFT.  The file
  will have one of the following names:

    KissFFTConfig.cmake
    kissfft-config.cmake



-- Using FFTW3 for FFT calculations
-- Could NOT find Boost
-- Building without audio conversion support, please install FFmpeg with libswresample
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FFMPEG_LIBAVCODEC_INCLUDE_DIRS
   used as include directory in directory /home/ubuntu/Téléchargements/chromaprint-1.2/examples
FFMPEG_LIBAVCODEC_LIBRARIES
    linked by target "fpcalc" in directory /home/ubuntu/Téléchargements/chromaprint-1.2/examples
FFMPEG_LIBAVFORMAT_INCLUDE_DIRS
   used as include directory in directory /home/ubuntu/Téléchargements/chromaprint-1.2/examples
FFMPEG_LIBAVFORMAT_LIBRARIES
    linked by target "fpcalc" in directory /home/ubuntu/Téléchargements/chromaprint-1.2/examples
FFMPEG_LIBAVUTIL_INCLUDE_DIRS
   used as include directory in directory /home/ubuntu/Téléchargements/chromaprint-1.2/examples
FFMPEG_LIBAVUTIL_LIBRARIES
    linked by target "fpcalc" in directory /home/ubuntu/Téléchargements/chromaprint-1.2/examples

-- Configuring incomplete, errors occurred!

Knowing that I have to write  (c or c++) code that checks for a .raw audio sequence in a larger reference sequence. Do I compile and install the entire project or just the chromaprint library? and if I have just to install the library, how can'I  install it quickly !!! Help me please !!

Lukáš Lalinský

unread,
Apr 20, 2015, 1:00:05 PM4/20/15
to Acoustid, wolff...@gmail.com
You can't use BUILD_EXAMPLES=ON without having the FFmpeg libraries installed on your system. However, if you are on Ubuntu, just install the package using apt-get.

sudo apt-get install libchromaprint-dev

Lukas

--
You received this message because you are subscribed to the Google Groups "AcoustID" group.
To unsubscribe from this group and stop receiving emails from it, send an email to acoustid+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

BARHOUMI Hafedh

unread,
Apr 23, 2015, 4:13:11 AM4/23/15
to acou...@googlegroups.com
Hi Mr Lukas, and thank you for your response, but :

** I already installed FFmpeg (but i don't know if it is well installed or not), so, is there a simple method to test it ?

** I try to execute: "fpcalc" example, by doinig this : a@a-RD580-K-ADC4BF4:~/Bureau/omrk/chromaprint-fpcalc-1.1-linux-i686$ ./fpcalc -algo test1 test_mono_44100.raw test_mono_8000.raw
but a have those errors messages :
ERROR: couldn't open the file
ERROR: unable to calculate fingerprint for file test_mono_44100.raw, skipping
ERROR: couldn't open the file
ERROR: unable to calculate fingerprint for file test_mono_8000.raw, skipping

Have you an idea whay i have those errors?
 

**I have to deliver the code of a program with the following features:

     written in C or C ++
     single unix process
     multi-threaded if necessary
     executable on ubuntu 14.04 or equivalent linux distribution
     with a  minimal library
dependency, as soon as possible
     use C libraries, in maximum, and the lightest
as light as possible
     integrate LGPL type libraries if possible

Desired features:

     - autonomous process does not take into account the standard Unix inputs, and that can display log on standard output.
    

syntax of the
command line :

         -  qssoundsearch file-ref.raw file-src.raw
         -  for example  : qssoundsearch coldplay.raw radio.raw

Can you help me by telling me the path I must follow to get there, as quickly and efficiently as possible
.

Thank you very much for your help !
--
Hafedh BARHOUMI

Lukáš Lalinský

unread,
Apr 23, 2015, 12:09:26 PM4/23/15
to Acoustid
You can't use raw files with fpcalc. It doesn't have a way to know what is the format of those. Use wav instead if you want to use fpcalc with uncompressed audio files.

I'm sorry, but I can't help you much with the rest. In general, have you need something that reads the audio files, feeds the data to chromaprint, gets the resulting fingerprints compares them. There are a few posts on this mailing list on how to compare two fingerprints.

Lukas


--
Reply all
Reply to author
Forward
0 new messages