How to Compile MP3Gain on DD-WRT or other UNSLUG devices

It is a simple procedure, with one caveat. It requires you to have Optware, and because of space requirements it is HIGHLY recommended to have optware on a seperate disk, NOT JFFS.

  1. Install the build toolchain:

    ipkg install buildroot
    

    or

    ipkg install optware-devel
    

    and

    ipkg install unzip
    
  2. Download the MP3 Gain sources, pick the latest from http://sourceforge.net/projects/mp3gain/files/mp3gain/.

    wget http://sourceforge.com/...
    
  3. CD to the directory and unzip the source code

  4. Make the program

    make
    

    if you run into the error:

    cc -Wall -DHAVE_MEMCPY   -c -o mp3gain.o mp3gain.c
    cc: can't resolve symbol '__fsetlocking'
    make: *** [mp3gain.o] Error 1
    

    you need to point the LD_LIBRARY_PATH to your optware lib:

    export LD_LIBRARY_PATH=/opt/lib:$LD_LIBRARY_PATH
    
  5. I have not gotten make install working, but it should be enough to copy mp3gain into /opt/bin