Build 在Cygwin中使用LAME支持构建SoX

Build 在Cygwin中使用LAME支持构建SoX,build,open-source,cygwin,sox,lame,Build,Open Source,Cygwin,Sox,Lame,我正在尝试使用LAME(3.99.5)在Cygwin中构建支持MP3的SoX(14.4.1)。我一直遵循这个指南: 当运行“/configure”时,它告诉我它“找不到LAME”。我已将lame-enc.dll放在sox目录中,但未检测到它。有人能帮我弄清楚为什么这个失败了吗?以下是日志文件的命令和输出: ./configure --with-lame ... configure:13645: checking whether to dlopen lame configure:13654: r

我正在尝试使用LAME(3.99.5)在Cygwin中构建支持MP3的SoX(14.4.1)。我一直遵循这个指南: 当运行“/configure”时,它告诉我它“找不到LAME”。我已将lame-enc.dll放在sox目录中,但未检测到它。有人能帮我弄清楚为什么这个失败了吗?以下是日志文件的命令和输出:

./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
编辑:我通过在cygwin中安装几个软件包并更新路径,实现了配置和工作。专业提示是阅读安装文件,查看它们是否列出了所需的软件包,并可能检查Linux发行版,因为它们的软件包引用了依赖项和构建依赖项。

您还需要启用dl lame,以便它使用动态库:

./configure --with-lame --enable-dl-lame
编辑以合并评论讨论中的信息:

可能需要更多的Cygwin包,例如
libltdl
libtool-*
(用于动态加载支持)、与zlib相关的包(用于libid3tag)等


另外,
configure.ac
需要修补(将
*mingw*)
更改为第175行的
*cygwin*|*mingw*)
),然后必须通过
autoreconf
gcc工具
cygwin包)重新生成
configure
脚本。或者,您可以尝试在
configure
中找到与
configure.ac
第175行对应的行,并更改该行;在这种情况下,不需要重新生成。

zlib-devel包提供了-lz所需的库。

好的,我试过了。唯一改变的是这些行,失败的方式与原始日志中的相同。configure:13645:正在检查是否要dlopen lame configure:13654:结果:是。因此,无论出于何种原因,我猜您都没有
libltdl
支持,可能是因为configure只检查主机三元组是否包含
*mingw*
。您是否有可用的自动工具(
autoeconf
等)?如果是这样,请尝试将
configure.ac
中的第175行从
*mingw*)
更改为
*cygwin*|*mingw*)
,然后运行
autoreconf
并重试。我安装了libltdl7和gcc工具(autoreconf)。现在“configure”成功完成,但make失败:找不到ltdl.hIt似乎ltdl.h包含在一个libtool Cygwin包中,不在libltdl7中:特别是SoX在其
安装
文件中有一个可选库列表。(zlib没有列出,因为它应该自动随libpng一起出现……通常是这样。)否则,Linux发行版是一个很好的信息源,因为它们的包引用依赖项和构建依赖项。我没有使用Cygwin的经验,但是我从来没有使用过Windows。谢谢!这是最后一个包,我现在可以编译所有的东西了。