How to build Picard on Slackware

Since I’ve gone through this hell a couple of months ago already, and I’m about to go through it again, I figured I should write it down this time so I might be easier to do it the next time.

If you wonder what picard is, you can check it out here: PicardTagger

To install Picard, you’ll need the following software

Building fftw3

When you build fftw3, make sure you run configure with –enable-shared since it’s default set to ‘no’.

Building libofa

Building libofa is not as trivial as it seems. Since it’s quite old, it’ll need some patches. What I did, was downloading the libofa src from ubuntu and use the ubuntu patches to make it compile.

# wget --no-check-certificate https://launchpad.net/ubuntu/intrepid/+source/libofa/0.9.3-3/+files/libofa_0.9.3.orig.tar.gz
# wget --no-check-certificate https://launchpad.net/ubuntu/intrepid/+source/libofa/0.9.3-3/+files/libofa_0.9.3-3.diff.gz
# tar zxvf libofa_0.9.3.orig.tar.gz
# gunzip libofa_0.9.3-3.diff.gz
# patch -p0 < libofa_0.9.3-3.diff
# cd libofa-0.9.3/
# patch -p1 < debian/patches/01_gcc41.diff
# patch -p1 < debian/patches/02_example-open.diff
# patch -p0 < debian/patches/03_example-size_type.diff
# patch -p0 < debian/patches/04_libofa.pc-deps.diff
# patch -p0 < debian/patches/05_gcc43.diff
# ./configure
# make
# make install

Building libmusicbrainz

For libmusicbrainz you’ll have to patch some files as well. A nice overview of files that need to be patched can be found here

You’ll also have to install the python library which you can find in the package it self in the python directory. Just run ./setup.py config ./setup.py build and ./setup.py install.

Building mutagen

I downloaded the latest version from mutagen from the google code project site

Just unpack it and run ./setup.py install to install the package

Building ffmpeg

When you build ffmpeg, make sure you run configure with –enable-shared since it’s default set to ‘no’.

Installing Picard

Now you’ve finally installed all the dependencies, you can install Picard. In my case I’m installing Picard 0.11 which expect an older ffmpeg install so it needs to be patched as well to be able to find the avcodec.h and avformat.h files. Edit the setup.py file and search for  cfg.set(’avcodec’, ‘cflags’, cfg.get(’avcodec’, ‘cflags’) + ‘ -DUSE_OLD_FFMPEG_LOCATIONS’). You’ll have to replace it with fg.set(’avcodec’, ‘cflags’, cfg.get(’avcodec’, ‘cflags’)) and all should be working.

Tags: , ,

One Comment

  • BenV says:

    Good example for why people should really use autoconf and DETECT shit instead of assume (ffmpeg location etc). Especially with a product that changes every day like ffmpeg…
    Note that the patches for most stuff is because of your gcc version, I’m sure that with gcc version $ancient (2.97 orso) it would work fine. Maybe a good idea to store those patches somewhere… :)

Leave a Reply

You must be logged in to post a comment.