【问题标题】:./configure on Cygwin hangs when "checking for a BSD-compatible install..."Cygwin 上的 ./configure 在“检查与 BSD 兼容的安装...”时挂起
【发布时间】:2023-12-28 18:52:01
【问题描述】:

我在 Windows 7 中使用 Cygwin 并尝试编译一个库,Zyre。我的“配置”文件是由 autoconf 自动生成的。当我从命令行运行./configure 生成生成文件时,它只是说

checking for a BSD-compatible install...

就是这样。没有错误,没有抱怨,什么都没有。我等了 > 1 小时,还尝试重新启动几次。 有什么问题?我该怎么做才能让它发挥作用?

以下是我使用的平台的一些背景信息:

which install 给出/usr/bin/install

中断后的config.log文件为:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libzre configure 1.0.0, which was
generated by GNU Autoconf 2.69.  Invocation command line was

$ ./configure 
[..]
install_sh=''
[..]

【问题讨论】:

  • 你打断它后config.log里面说什么?
  • 运行which install,看看install程序./configure正在使用什么。

标签: cygwin configure autoconf


【解决方案1】:

我花了很长时间在互联网上搜索正确的主题,但最后,我找到了它并解决了问题。 Ptomato 和 Jack,感谢您的提示!

一方面,./configure 没有找到任何与 BSD 兼容的安装。另一方面,which install 发现了一个安装。在this blog about autoconf's configure.inthis manual about Autoconf 的帮助下,我的注意力被吸引到配置的install_sh 变量上——在我的例子中它是空的。

解决方案是通过以下方式编辑文件configure(我之前使用 autoconf 生成的):到行

install_sh

我加了

/usr/bin/install -c

给了然后

install_sh = '/usr/bin/install -c'

其中/usr/bin/install 是我的which install 命令的输出。现在,我的./configure 命令运行了。

【讨论】:

  • 这只会引出一个新问题:为什么configure 脚本会以这种方式生成?通过生成比源代码附带的脚本更好的configure 脚本,看看运行autoconf 是否会产生相同的效果。从包的维护者运行autoconf 到现在,Autoconf 可能已经有了相关的改进。您可能会在 tarball 中找到一个名为 bootstrapautogen.sh 的脚本;如果是这样,请运行它们,因为它们会更完整地重建所有生成的脚本、Makefile 等。如果这能解决问题,请让维护者知道。
  • 嘿 Warren,事实上,我的 configure 脚本是由一个名为 autogen.sh 的文件生成的。对不起,如果我没有说清楚的话。
  • autogen.sh 调用 autoconf 等等。
最近更新 更多