evanpurkhiser / keyfinder-cli

A CLI wrapper for libkeyfinder. Making DJs lives easier.
GNU General Public License v3.0
111 stars 23 forks source link

Compiling in OSX #3

Closed jpprietobaez closed 9 years ago

jpprietobaez commented 9 years ago

Hi guys, Thanks for sharing your work. I am very interested in getting this cli version working in OSX (Mavericks: 10.9.5).

I'm not necessarily an Unix expert and wonder if you could give me some pointers/quick guide to get this to compile? (Dependencies/environment). When I try to run $make keyfinder_cli I get a host of missing includes. I tried adding keyfinderlib files and some of their dependencies but I keep getting a lot of errors and warnings.

These are some of the errors:

In file included from keyfinder_cli.cpp:10: ./libavutil/opt.h:727:61: error: ISO C++ forbids forward references to 'enum' types int av_opt_set_pixel_fmt (void obj, const char name, enum AVPixelFormat fmt, int search_flags);

./libavcodec/libavutil/frame.h:477:10: error: ISO C++ forbids forward references to 'enum' types enum AVColorPrimaries color_primaries; ^ ./libavcodec/libavutil/frame.h:479:10: note: forward declaration of 'AVColorTransferCharacteristic' enum AVColorTransferCharacteristic color_trc; ^

./libavutil/opt.h:727:61: note: forward declaration of 'AVPixelFormat' int av_opt_set_pixel_fmt (void obj, const char name, enum AVPixelFormat fmt, int search_flags); ^ These are some of the errors ..

Thanks guys

evanpurkhiser commented 9 years ago

Ok, I've spent a little bit of time getting this to compile on OSX, here's what I came up with:

  1. Install brew if you don't have it already, you'll need this to install a few dependencies. I'm also pretty sure it sets up build tools you will need.
  2. brew install qt ffmpeg boost fftw
  3. Compile and install libkeyfinder

    $ git clone github.com:ibsh/libKeyFinder.git
    $ cd libKeyFinder
    $ qmake
    $ make
    $ make install

    Before running qmake you may need to make these replacements in the project file:

    $ sed -ie 's/CONFIG += x86 x86_64/CONFIG += x86_64/g' libKeyfinder.pro
    $ sed -ie 's/lboost_thread$/lboost_thread-mt/g' libKeyfinder.pro
  4. keyfinder-cli should build fine with make now. Though the make install wont work since it uses some linux specific options.
evanpurkhiser commented 9 years ago

Just wanted to ping @samyhajal since I think this will help him :-)

samyhajal commented 9 years ago

@EvanPurkhiser thanks! Did the configure file come with libkeyfinder? couldn't find it in the github repo

evanpurkhiser commented 9 years ago

Whoops, sorry, run qmake not ./configure.

If the build fails you may also need to fiddle with a few things in the libKeyfinder.pro file.

$ sed -ie 's/CONFIG += x86 x86_64/CONFIG += x86_64/g' libKeyfinder.pro
$ sed -ie 's/lboost_thread$/lboost_thread-mt/g' libKeyfinder.pro

After making those changes re-run qmake and follow the steps again from above.

Updated the original instructions in the above comment as well.

evanpurkhiser commented 9 years ago

Closing this out since there hasn't been too much activity here.