Question

I'm trying to build SoX (14.4.1) in Cygwin with MP3 support using LAME (3.99.5). I've been following this guide: http://bencos.googlecode.com/svn-history/r137/trunk/out/sox/README.win32.txt When running "./configure" it tells me that it "cannot find LAME". I have put lame-enc.dll in the sox directory, but it's not detected. Can anyone help me to figure out why this fails? Here's the command and the output from the log file:

./configure --with-lame

...
configure:13645: checking whether to dlopen lame
configure:13654: result: no
configure:13664: checking lame/lame.h usability
configure:13664: gcc -c -g -O2 -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic -fopenmp  conftest.c >&5
configure:13664: $? = 0
configure:13664: result: yes
configure:13664: checking lame/lame.h presence
configure:13664: gcc -E  conftest.c
configure:13664: $? = 0
configure:13664: result: yes
configure:13664: checking for lame/lame.h
configure:13664: result: yes
configure:13689: checking for lame_get_lametag_frame in -lmp3lame
configure:13714: gcc -o conftest.exe -g -O2 -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic -fopenmp   conftest.c -lmp3lame   >&5
conftest.c:53:1: warning: function declaration isn't a prototype
conftest.c:55:1: warning: function declaration isn't a prototype
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lmp3lame

Edit: I got configure and make working by installing several packages in cygwin and updating the path. The pro tip is to read the install files to see if they list required packages and possibly check the Linux distributions, because their packages refer to dependencies and build dependencies.

Was it helpful?

Solution

You’ll need --enable-dl-lame as well so that it will use the dynamic library:

./configure --with-lame --enable-dl-lame

Edit to incorporate information from the comment discussion:

More Cygwin packages may be required, such as libltdl and libtool-* (for dynamic loading support), zlib-related packages (for libid3tag) etc.

Also, configure.ac needs patching (change *mingw*) to *cygwin* | *mingw*) in line 175), then the configure script has to be regenerated via autoreconf (gcc-tools Cygwin package). Alternatively, you could try to find the line in configure that corresponds to configure.ac line 175 and change that; regenerating isn’t necessary in that case.

OTHER TIPS

The zlib-devel package provides the library necessary for -lz.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top