Sox: Difference between revisions

From VoIPmonitor.org
Jump to navigation Jump to search
(Created page with "# First, create a debian wheezy chrootsudo debootstrap --arch=amd64 wheezy ./wheezy/ \ http://ftp.de.debian.org/debian/# enter it, thussudo mount -o bind /dev wheezy/devsu...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
# First, create a debian wheezy chrootsudo debootstrap --arch=amd64 wheezy ./wheezy/ \    http://ftp.de.debian.org/debian/# enter it, thussudo mount -o bind /dev wheezy/devsudo mount -t proc none wheezy/procsudo chroot wheezycd /tmp # somewhere to do this# update our debian system, and install libmad, # which is what we need for mp3 support in soxapt-get updateapt-get install build-essentialapt-get install libmad0-devapt-get install realpath# now grab sox and its dependenciesmkdir -p depsmkdir -p deps/unpackedmkdir -p deps/builtmkdir -p deps/built/libmadmkdir -p deps/built/soxmkdir -p deps/built/lamewget -O deps/sox-14.4.1.tar.bz2 "http://downloads.sourceforge.net/project/sox/sox/14.4.1/sox-14.4.1.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsox%2Ffiles%2Fsox%2F14.4.1%2F&ts=1416316415&use_mirror=heanet"wget -O deps/libmad-0.15.1b.tar.gz "http://downloads.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmad%2Ffiles%2Flibmad%2F0.15.1b%2F&ts=1416316482&use_mirror=heanet"wget -O deps/lame-3.99.5.tar.gz "http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flame%2Ffiles%2Flame%2F3.99%2F&ts=1416316457&use_mirror=kent"# unpack the dependenciespushd deps/unpackedtar xvfpj ../sox-14.4.1.tar.bz2tar xvfpz ../libmad-0.15.1b.tar.gztar xvfpz ../lame-3.99.5.tar.gzpopd# build libmad, staticallypushd deps/unpacked/libmad-0.15.1b./configure --disable-shared --enable-static --prefix=$(realpath ../../built/libmad)# Patch makefile to remove -fforce-memsed s/-fforce-mem//g < Makefile > Makefile.patchedcp Makefile.patched Makefilemakemake installpopd# build lame, staticallypushd deps/unpacked/lame-3.99.5./configure --disable-shared --enable-static --prefix=$(realpath ../../built/lame)makemake installpopd# build sox, staticallypushd deps/unpacked/sox-14.4.1./configure --disable-shared --enable-static --prefix=$(realpath ../../built/sox) \    LDFLAGS="-L$(realpath ../../built/libmad/lib) -L$(realpath ../../built/lame/lib)" \    CPPFLAGS="-I$(realpath ../../built/libmad/include) -I$(realpath ../../built/lame/include)" \    --with-mad --with-lame --without-oggvorbis --without-oss --without-sndfile --without-flac --without-gompmake -smake installpopdcp deps/built/sox/bin/sox .rm -rf deps/builtrm -rf deps/unpacked
# First, create a debian wheezy chroot sudo debootstrap --arch=amd64 wheezy ./wheezy/ http://ftp.de.debian.org/debian/
sudo mount -o bind /dev wheezy/dev
sudo mount -t proc none wheezy/proc
sudo chroot wheezy
cd /tmp # somewhere to do this
 
 
# update our debian system, and install libmad, which is what we need for mp3 support in sox apt-get update
apt-get install build-essential
apt-get install libmad0-dev
apt-get install realpath
 
 
 
# now grab sox and its dependencies
mkdir -p deps
mkdir -p deps/unpacked
mkdir -p deps/built
mkdir -p deps/built/libmad
mkdir -p deps/built/sox
mkdir -p deps/built/lame
wget -O deps/sox-14.4.1.tar.bz2 "http://downloads.sourceforge.net/project/sox/sox/14.4.1/sox-14.4.1.tar.bz2? r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsox%2Ffiles%2Fsox%2F14.4.1%2F&ts=1416316415&use_mirror=heanet"
wget -O deps/libmad-0.15.1b.tar.gz "http://downloads.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmad%2Ffiles%2Flibmad%2F0.15.1b%2F&ts=1416316482&use_mirror=heanet"  
wget -O deps/lame-3.99.5.tar.gz "http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flame%2Ffiles%2Flame%2F3.99%2F&ts=1416316457&use_mirror=kent"
# unpack the dependencies pushd deps/unpacked
tar xvfpj ../sox-14.4.1.tar.bz2
tar xvfpz ../libmad-0.15.1b.tar.gz
tar xvfpz ../lame-3.99.5.tar.gz
popd
# build libmad, statically
pushd deps/unpacked/libmad-0.15.1b  
./configure --disable-shared --enable-static --prefix=$(realpath ../../built/libmad)  
# Patch makefile to remove -fforce-mem
sed s/-fforce-mem//g < Makefile > Makefile.patched
cp Makefile.patched Makefile
make
make
install popd
 
# build lame, statically
pushd deps/unpacked/lame-3.99.5
./configure --disable-shared --enable-static --prefix=$(realpath ../../built/lame)  
make
make install
popd
# build sox, statically
pushd deps/unpacked/sox-14.4.1  
./configure --disable-shared --enable-static --prefix=$(realpath ../../built/sox) \    LDFLAGS="-L$(realpath ../../built/libmad/lib) -L$(realpath ../../built/lame/lib)" \    CPPFLAGS="-I$(realpath ../../built/libmad/include) -I$(realpath ../../built/lame/include)" \    --with-mad --with-lame --without-oss --without-sndfile --without-flac  --disable-gomp make -j8
cd src /bin/bash ../libtool --silent --tag=CC  --silent --mode=link gcc -Wtraditional-conversion  -g -O2 --static -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic  -L/usr/src/deps/built/libmad/lib -L/usr/src/deps/built/lame/lib -Wl,-z,defs -o sox sox.o libsox.la          -lmad -lmp3lame      -lvorbisenc -lvorbisfile -lvorbis  -logg  -lm cd .. make install popd
cp deps/built/sox/bin/sox . rm -rf deps/built rm -rf deps/unpacked

Latest revision as of 13:16, 30 November 2015

# First, create a debian wheezy chroot sudo debootstrap --arch=amd64 wheezy ./wheezy/ http://ftp.de.debian.org/debian/
sudo  mount -o bind /dev wheezy/dev
sudo mount -t proc none wheezy/proc
sudo chroot wheezy
cd /tmp # somewhere to do this


  1. update our debian system, and install libmad, which is what we need for mp3 support in sox apt-get update
apt-get install build-essential
apt-get install libmad0-dev
apt-get install realpath


  1. now grab sox and its dependencies
mkdir -p deps 
mkdir -p deps/unpacked 
mkdir -p deps/built 
mkdir -p deps/built/libmad 
mkdir -p deps/built/sox 
mkdir -p deps/built/lame 
wget -O deps/sox-14.4.1.tar.bz2 "http://downloads.sourceforge.net/project/sox/sox/14.4.1/sox-14.4.1.tar.bz2? r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsox%2Ffiles%2Fsox%2F14.4.1%2F&ts=1416316415&use_mirror=heanet"  
wget -O deps/libmad-0.15.1b.tar.gz "http://downloads.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmad%2Ffiles%2Flibmad%2F0.15.1b%2F&ts=1416316482&use_mirror=heanet" 
wget -O deps/lame-3.99.5.tar.gz "http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flame%2Ffiles%2Flame%2F3.99%2F&ts=1416316457&use_mirror=kent"
  1. unpack the dependencies pushd deps/unpacked
tar xvfpj ../sox-14.4.1.tar.bz2 
tar xvfpz ../libmad-0.15.1b.tar.gz 
tar xvfpz ../lame-3.99.5.tar.gz
popd
# build libmad, statically 
pushd deps/unpacked/libmad-0.15.1b 
./configure --disable-shared --enable-static --prefix=$(realpath ../../built/libmad) 
# Patch makefile to remove -fforce-mem 
sed s/-fforce-mem//g < Makefile > Makefile.patched 
cp Makefile.patched Makefile 
make 
make 
install popd
  1. build lame, statically
pushd deps/unpacked/lame-3.99.5
./configure --disable-shared --enable-static --prefix=$(realpath ../../built/lame) 
make 
make install 
popd
# build sox, statically 
pushd deps/unpacked/sox-14.4.1 
./configure --disable-shared --enable-static --prefix=$(realpath ../../built/sox) \    LDFLAGS="-L$(realpath ../../built/libmad/lib) -L$(realpath ../../built/lame/lib)" \    CPPFLAGS="-I$(realpath ../../built/libmad/include) -I$(realpath ../../built/lame/include)" \    --with-mad --with-lame --without-oss --without-sndfile --without-flac  --disable-gomp make -j8
cd src /bin/bash ../libtool --silent --tag=CC  --silent --mode=link gcc -Wtraditional-conversion  -g -O2 --static -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic  -L/usr/src/deps/built/libmad/lib -L/usr/src/deps/built/lame/lib -Wl,-z,defs -o sox sox.o  libsox.la          -lmad -lmp3lame      -lvorbisenc -lvorbisfile -lvorbis  -logg   -lm cd .. make install popd
cp deps/built/sox/bin/sox . rm -rf deps/built rm -rf deps/unpacked