docker不能编译程序(可能未被macrosAC_MSG_ERRORmacros)

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

https://github.com/adaptivecomputing/torque

当试图运行autoconf我给错误“可能未定义的macros:AC_MSG_ERROR”

谷歌有几十个这个确切的错误的结果。 他们大多数是通过安装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 .时得到的错误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和普通服务器之外编译这个程序。 我怀疑有一个图书馆或缺less的东西。

任何人都可以解释为什么我得到这个错误,或更好的,如何解决它?

您将需要安装autoconf,automake和libtool。 可能还有pkgconfig。 之后,运行autogen.sh脚本。 autotool脚本现在应该就位,你可以configuration包。

正如@BrettHale所说,你需要安装automake (我没有在yum install line中看到),因为力矩肯定会使用它。 和这个:

 RUN autoconf 

可能应该是:

 RUN ./autogen.sh 

它会调用autoconf ,以及其他的东西。 我还是不明白你为什么似乎马上死亡。 AC_MSG_ERROR等是autoconf的基本macros的一部分。 几乎像那些macros在docker中是不可读的…

Interesting Posts