compilation - docker 无法编译程序(可能是未定义的宏AC_MSG_ERROR)

标签 compilation autoconf docker torque

我正在尝试在Docker容器中编译以下程序。

https://github.com/adaptivecomputing/torque

尝试运行autoconf时,出现错误“可能未定义的宏:AC_MSG_ERROR”

Google针对此确切错误有数十个结果。通过安装pkg-config或libtool-ltdl可以解决大多数问题

从我的docker文件中可以看到,这两个软件包都已安装。

FROM centos

RUN yum install -y autoconf make autogen gcc gcc-c++ openssl-devel git libxml2-devel libtool libtool-ltdl
RUN git clone git://github.com/adaptivecomputing/torque.git -b 4.2.6.1 /tmp/pbs_server
RUN cd /tmp/pbs_server
RUN autoconf
RUN ./configure --with-debug
RUN make -j4
RUN make install

这是我在运行docker build .时遇到的错误
Step 4 : RUN autoconf  
configure.ac:50: error: possibly undefined macro: AC_MSG_ERROR  
      If this token and others are legitimate, please use m4_pattern_allow.  
      See the Autoconf documentation.  
configure.ac:54: error: possibly undefined macro: AM_INIT_AUTOMAKE  
configure.ac:57: error: possibly undefined macro: AM_PROG_CC_C_O  
configure.ac:63: error: possibly undefined macro: AM_MAINTAINER_MODE  
configure.ac:82: error: possibly undefined macro: AM_CONFIG_HEADER  
configure.ac:144: error: possibly undefined macro: AM_CONDITIONAL  
configure.ac:644: error: possibly undefined macro: AC_PROG_LIBTOOL  
configure.ac:651: error: possibly undefined macro: AM_PROG_LEX  
configure.ac:2053: error: possibly undefined macro: AC_DECL_H_ERRNO  
configure.ac:2056: error: possibly undefined macro: AC_DECL_FD_SET_SYS_SELECT_H  
configure.ac:2138: error: possibly undefined macro: AC_C_BIGENDIAN_CROSS  
configure.ac:2204: error: possibly undefined macro: AC_CREATE_GENERIC_CONFIG  

我在docker外部和普通服务器内部编译此程序没有问题。我怀疑有一个图书馆或缺少的东西。

谁能解释为什么我遇到此错误,或者更好的方法是如何解决该错误?

最佳答案

正如@BrettHale所说,您需要安装automake(我在yum install行中看不到),因为扭矩肯定会使用它。还有这个:

RUN autoconf

可能应该是:
RUN ./autogen.sh

它将调用autoconf以及其他内容。我仍然不明白为什么你所做的事情会立即死亡。 AC_MSG_ERROR等是autoconf基本宏的一部分。几乎就像那些宏在docker中是不可读的...

关于compilation - docker 无法编译程序(可能是未定义的宏AC_MSG_ERROR),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21591858/

相关文章:

选择 autoconf 和 automake 版本

xcode - 如何将编译源中的文件从一个目标复制并粘贴到另一个目标?

makefile - 使用自动工具构建时如何生成源文件

python - 如何将 Docker 添加到 Django + Gunicorn + Nginx + Fabric

java - 如何将一个整数字符串放入一个整数数组中?

c - 在 Autoconf 项目中强制执行严格的 C99

linux - autoconf 在 Linux Mint 上提示 "C compiler cannot create executables"

java - Docker 容器中的 AWS SAM CLI 导致 ClassNotFoundException

docker rabbitmq 如何使用 docker 文件公开端口和重用容器

c++ - 编译器在添加字符时停止优化未使用的字符串