Skip to content

Instantly share code, notes, and snippets.

@marcelog
Last active September 29, 2022 02:04
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcelog/86e6c71bdf61a28560f7f7ce4f93a2b8 to your computer and use it in GitHub Desktop.
Save marcelog/86e6c71bdf61a28560f7f7ce4f93a2b8 to your computer and use it in GitHub Desktop.
Build a static SOX binary suitable to be used in an AWS Lambda Container
cd /usr/src
wget "http://downloads.sourceforge.net/project/sox/sox/14.4.2/sox-14.4.2.tar.bz2?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fsox%2Ffiles%2Fsox%2F14.4.2%2F&ts=1476009578&use_mirror=ufpr" -O sox-14.4.2.tar.bz2
tar jxf sox-14.4.2.tar.bz2
cd sox-14.4.2
CPPFLAGS="-I/usr/libmad-0.15.1b/include -I/usr/lame-3.99.5/include " \
LDFLAGS="-L/usr/libmad-0.15.1b/lib -L/usr/lame-3.99.5/lib -L/usr/libgsm-1.0.10/lib" \
./configure --prefix=/usr/sox-14.4.2 --disable-shared --enable-static
make
make install
@David-dp-
Copy link

What if one has no need for libmad, lame, and libgsm? I tried skipping lines 5 and 6. The resulting build works fine on the build machine, but in my lambda it complains about GLIBC missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment