Cross Compiling libavg for ARM

libavg is a high-level development platform for media-centric applications using Python as scripting language and written in C++.

Bear in mind that are many dependencies with libavg 1.6. I have not built all the libraries required, but instead simply taken the pre-built binaries and header files in the qemu overo image and copied the files as follows:

mkdir mnt
sudo mount -o loop,offset=$[106496*512] overo_sd_alip.img mnt
mkdir ~/edev/beagleboard/libs/lib -p
mkdir ~/edev/beagleboard/libs/include
cp mnt/usr/lib/* ~/edev/beagleboard/libs/lib/ -rf -d
cp mnt/lib/* ~/edev/beagleboard/libs/lib/ -rf -d
cp /mnt/usr/include/* ~/edev/beagleboard/libs/include -rf -d
sudo umount mnt

The -d flag skips the symlink, so we need to recreate then for all library so that the compiler can find instead of Save the following scripts to

and run it where the arm libraries are located (in my case in /home/jaufranc/edev/beagleboard/libs/lib, /home/jaufranc/edev/beagleboard/libs/lib/arm-linux-gnueabi and /home/jaufranc/edev/beagleboard/libs/lib/mesa). This will  create symlinks for most libraries, but not all. Some will still have to be created manually, e.g.:

ln -s
ln -s
ln -s

Also delete the symlink between and since we use another version of the library.

If a symlink is missing, we would generally get a warning of the type:

/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../../arm-linux-gnueabi/bin/ld: warning:, needed by /home/jaufranc/edev/beagleboard/libs/lib/, not found (try using -rpath or -rpath-link)

Once this is done, here are the instructions to cross-compile libavg 1.6 for ARM:

  1. First build and install MesaLib for ARM (version 7.9.2), as the default Mesa/OpenGL library in the qemu image has more dependencies.
  2. Download libavg 1.6 source code


  3. Extract it

    tar xzvf libavg-1.6.0.tar.gz
    cd libavg-1.6.0

  4. Install the following development packages:

    sudo apt-get install libxml2-dev libpango1.0-dev libgraphicsmagick++1-dev libavformat-dev libavcodec-dev libfaad-dev libgsm1-dev libogg-dev libschroedinger-dev libspeex-dev libswscale-dev libboost-dev libboost-thread-dev

  5. Remove SSE2 options in configure script:

    cat configure | sed s/-msse2// > configure.arm
    mv configure.arm configure
    chmod 755 configure

  6. There is some x86 assembler in the code, we need to disable it.
    Edit src/base/Exception.ccp and comment out the line:

    asm(“int $3”);

  7. To prevent testplayer from failing. Edit src/player/Makefile and make sure your replace occurences of -L/usr/include -lSDL, by -L/home/jaufranc/edev/beagleboard/libs/lib and create a symlink for the SDL library:

    ln -s

    You may also need to edit the Makefile as above for src/anim and src/wrapper

  8. Configure, build and install libavg:

This was tested in Ubuntu 11.04 (natty) with linaro gcc toolchain.

Share this:

Support CNX Software! Donate via cryptocurrencies or become a Patron on Patreon

ROCK Pi 4C Plus
Notify of
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
Weller PCB manufacturer