【问题标题】:How can I do in order to generate the makefile with ./configure?如何使用 ./configure 生成 makefile?
【发布时间】:2021-08-25 08:06:15
【问题描述】:

我正在尝试安装 EZTrace,这是一个旨在从 HPC 自动生成执行跟踪的工具。我从这里下载了安装文件夹,https://eztrace.gitlab.io/eztrace/index.html。解压后发现有一个README文件:

Requirements
=============================================
In order to run EZTrace, you need the following software:

  * autoconf 2.63;

  * libelf or libbfd. Otherwise, only eztrace.old would be installed and the
    functionality would be limited, see the FAQ section.
    On Debian, libelf can be installed from command line by the following
    command: apt-get install libelf-dev

  * [Optional] Any MPI implementation.    

Building EZTrace
=============================================
At first, you need to configure EZTrace by invoking the configure script:

$ ./configure --prefix=<WHERE_YOU_INSTALL_EZTRACE>

Options to configure. You can pass several options to the configure script for
specifying where it should find the needed libraries:
--with-litl=$LITL_ROOT or ARG(=no): specify where LiTL is installed
--with-gtg=$GTG_ROOT: specify where GTG is installed.
--with-mpi=$MPI_ROOT: specify where MPI is installed. The mpi.h file must be
  located in the $MPI_ROOT/include/ directory.
--with-mpi-include=<PATH_TO_MPI.H>: specify the directory that contains the
  mpi.h file.
--with-papi=$PAPI_ROOT: specify where PAPI is installed. The papi.h file must be
  located in the $PAPI_ROOT/include directory and libpapi should be in 
  $PAPI_ROOT/lib

Once EZTrace is configured, just type:

$ make
$ make install

我检查了我是否已经安装了需求(完成)。到达./configure 命令时,我遇到了一个问题,我通过输入autoreconf -i 解决了这个问题。

问题是,在执行./configure 命令和执行make 命令后,我得到这个错误:

make: *** No targets specified and no makefile found.  Stop.

(这是因为命令 ./configure 没有按预期生成生成文件)。 我只有Makefile.am & Makefile.in

我尝试检查这个命令块:

aclocal
autoconf
autoheader
automake --add-missing

我得到了:

autoheader: error: AC_CONFIG_HEADERS not found in configure.ac
automake: warning: LINK was already defined in condition USE_CUDA, which is included in condition TRUE ...
src/modules/cuda/Makefile.am:15: ... 'LINK' previously defined here

我想提一下,我位于一个名为

的文件夹中
"/home/hakim/Téléchargements/eztrace-eztrace-1.1-9"

请帮忙生成makefile?

【问题讨论】:

  • 您发布的链接包含指向 tarball 的链接。为什么您尝试从 VCS 引导而不是使用 tarball?
  • 我刚刚下载了压缩包,发现它只是 VCS 的快照。提交错误报告;他们的 tarball 格式不正确。他们应该使用make dist 生成一个包含 Makefile 的 tarball。他们不应该要求用户引导项目。
  • configure 命令失败。当它失败时,它不会生成生成文件。当它不生成makefile 时,您无法运行make。自述文件中的每个步骤都暗示“如果失败,请停止并修复它,以便在继续下一步之前继续工作”。您的问题应该重写为“为什么配置失败并出现 XYZ 错误以及如何使其工作”。我怀疑该系统被编写为使用比您拥有的版本更旧(或更新)的 autoconf 版本。太糟糕了,该软件的作者没有包含他们测试的版本。
  • 请求 RPM 或 DEB 文件是一个太过分的桥梁。这意味着开发人员必须担心二进制兼容性、不同的操作系统版本等。FOSS 的部分目标是我们可以让想要编写软件的人这样做,而其他想要构建发行版的人也这样做.他们不必是,而且往往不是同一个人。您可以在您的发行版中提供这些软件包,但要求上游开发人员这样做太多了。
  • 然而,确实 autotools 不打算与裸存储库分发一起使用。应该发生的是,开发人员在他们自己的系统上使用 autotools 来生成源代码分发(通常作为 tarball),然后用户下载并自己编译它,但不需要任何 autotools 软件:他们只需要一个编译器和 make。对我来说,这似乎是对开发人员提出的一个非常合理的要求。

标签: c makefile configure autoconf automake


【解决方案1】:
  • 不要运行autoheader - 项目未设置为使用它
  • automake 警告是警告,而不是错误。

通常,引导自动工具项目的最简单方法是运行autoreconf -fiv。 这将创建一个 configure 脚本,您需要运行该脚本才能创建 Makefile。

autoreconf -fiv
./configure
make

编辑:EZtraze

最初的答案(上图)是对一般问题(“如何使用 ./configure 生成 makefile?”)的一般答案。

对于特定项目,例如 EZtrace,阅读自述文件通常会有所帮助。 您已经引用了自述文件,但无论出于何种原因,您似乎遗漏了关键部分:

Getting EZTrace
=============================================
* You can get the latest stable release on EZTrace website:
  http://eztrace.gforge.inria.fr/

* Current development version is available via GIT
  git clone git://scm.gforge.inria.fr/eztrace/eztrace.git

After getting the latest development version (from GIT), you need to run
'./bootstrap' and only then build the tool.

(git 版本您已链接到包含此部分的页面上可用的发布 tarball)。

它明确告诉你必须先运行./bootstrap

所以你的问题的答案是:请阅读文档。

(另请注意,特定软件包的构建过程通常不在此处;请使用该软件包的支持论坛)

【讨论】:

  • 我还是有同样的问题。 ./configure 命令不会生成 makefile。我总是得到:configure: creating ./config.status config.status: error: cannot find input file: Makefile.in configure: error: ./configure failed for extlib/gtg
  • 看起来extlib/gtg/Makefile.in 不存在。 eztrace 是否试图在其 VCS 中部署其依赖项?他们不应该那样做。
  • afaics,他们的 VCS 设置存在各种问题(如签入 autom4te.cache/ directories、签入 failed patch attempts 并且通常已过时和/或损坏 m4
猜你喜欢
  • 2012-02-15
  • 1970-01-01
  • 2012-01-30
  • 2015-03-31
  • 2011-12-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-09-10
相关资源
最近更新 更多