Skip to content
alx-1 edited this page Jan 4, 2013 · 9 revisions

Mac OS X compiling tips

Qmake mac-specific compilation flags

./buildlibs
qmake -spec macx-g++ drone.pro

Note: qmake -makefile drone.pro will default to XCode project file generation instead of GNU Makefiles. You will get several warnings and no Makefiles at all That's why you need to run qmake with the -spec argument. In case you did the error, you can clean up the mess it generated with: find . -type d -name '*.xcodeproj' -exec rm -rf {} \;

Then:

make
make install # if you want to install

Frei0r plugins

If you have MacPorts installed you can do (untested):

sudo port install frei0r-plugins

You can also compile it yourself. Just make sure you install in /usr/local/. Checkout Frei0r homepage for instructions.

Option 1: FFMPEG installation (branch "master")

This is the default if you are using the "master" branch. If you are using the "gstreamer" branch please refer to the GStreamer installation tips for OSX below.

Before compiling you need to make sure to install ffmpeg otherwise you will get compilation errors.

Two ways to do this:

  • Using Macports: sudo port install ffmpeg-devel
  • Using Homebrew: brew install ffmpeg

Option 2: GStreamer installation (branch "gstreamer")

Follow these instructions if you are using the "gstreamer" branch.

Download GStreamer 0.10 from here: http://docs.gstreamer.com/display/GstSDK/Installing+on+Mac+OS+X

Install these two packages. Make sure to check ALL extra packages during installation (for both installers):

  • GStreamer SDK 2012.11 (Brahmaputra) for Mac OS X (Runtime)
  • GStreamer SDK 2012.11 (Brahmaputra) for Mac OS X (Development files)

You don't need to install this one: GStreamer SDK 2012.11 (Brahmaputra) for Mac OS X (Deployment Packages)

Linux compilation tips

I compiled the latest version of Drone under Ubuntu 12.04 Precise Pangolin. Here are some tips that I gathered that could be useful to others.

Frei0r plugins

In order to use frei0r plugins:

sudo apt-get install frei0r-plugins
ln -s /usr/lib/frei0r-1 gears/frei0r

Option 1: FFMPEG installation (branch "master")

This is the default if you are using the "master" branch. If you are using the "gstreamer" branch please refer to the GStreamer installation tips for Linux below.

Add dependencies to dev libraries

You should run: apt-get install libasound2-dev libxxf86vm-dev

Problem with portaudio: For now I had to remove AudioInput from gears.pro (was using portaudio which does not seem to be compatible anymore)

Recompile FFMPEG

Follow these instructions with small changes (*) https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide

Important configuration options

For x264: ./configure --enable-pic --enable-shared --enable-static

For libvpx: ./configure --enable-pic --enable-shared

For FFMPEG:

./configure --enable-gpl --enable-libfaac --enable-libfdk-aac --enable-libmp3lame \
  --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora \
  --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree \
  --enable-version3 --enable-swscale

My complete script:

# Install x264
cd
git clone --depth 1 git://git.videolan.org/x264
cd x264
./configure --enable-pic --enable-shared --enable-static
make
sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \
  awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \
  --fstrans=no --default
# Install fdk-aac
cd
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
cd fdk-aac
autoreconf -fiv
./configure --disable-shared
make
sudo checkinstall --pkgname=fdk-aac --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no \
  --deldoc=yes --fstrans=no --default
# Install libvpx
cd
git clone --depth 1 http://git.chromium.org/webm/libvpx.git
cd libvpx
./configure --enable-pic --enable-shared
make
sudo checkinstall --pkgname=libvpx --pkgversion="1:$(date +%Y%m%d%H%M)-git" --backup=no \
  --deldoc=yes --fstrans=no --default
# Install FFMPEG
cd
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-libfaac --enable-libfdk-aac --enable-libmp3lame \
  --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora \
  --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree \
  --enable-version3 --enable-swscale
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="7:$(date +%Y%m%d%H%M)-git" --backup=no \
  --deldoc=yes --fstrans=no --default
hash -r

Linking problem with libx264

When running drone I had the following error:

libGear_VideoSource.so.1.0.0
! Warning: fail to load gear libGear_VideoSource.so.1.0.0!
libx264.so.129: cannot open shared object file: No such file or directory

I thus had to do: sudo ln -s /usr/lib/x86_64-linux-gnu/libx264.so.120 /usr/lib/x86_64-linux-gnu/libx264.so.129

Option 2: GStreamer installation (branch "gstreamer")

Follow these instructions if you are using the "gstreamer" branch.

Step 1 : Install gstreamer

Follow the instructions provided here to install the SDK on your machine.

After running sudo apt-get install gstreamer-sdk-dev you should also install other packages:

sudo apt-get install gstreamer-sdk-base-system gstreamer-sdk-gstreamer-core \
gstreamer-sdk-gstreamer-system gstreamer-sdk-gstreamer-codecs \
gstreamer-sdk-gstreamer-codecs-gpl gstreamer-sdk-gstreamer-codecs-restricted \
gstreamer-sdk-base-system-dev gstreamer-sdk-gstreamer-core-dev gstreamer-sdk-dev \
gstreamer-sdk-gstreamer-codecs-dev gstreamer-sdk-gstreamer-system-dev

Note that this list might be incomplete. If you run into problems please create a new issue.

Step 2: Run the gst-sdk-shell

Before compiling, you need to enter in the gst-sdk-shell by typing:

/opt/gstreamer-sdk/bin/gst-sdk-shell

Otherwise you will get a compilation error related to PKG_CONFIG

Running

To run under Linux, unless you make install you need to specify the LD_LIBRARY_PATH to point to the Drone lib folder. You can do that without exporting the variable by running Drone the following way:

LD_LIBRARY_PATH=./lib ./drone