【问题标题】:docker unable to compile program (possibly undefied macro AC_MSG_ERROR)docker 无法编译程序(可能是未定义的宏 AC_MSG_ERROR)
【发布时间】:2014-02-06 00:51:21
【问题描述】:

我正在尝试在 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 外部和普通服务器内部编译这个程序没有问题。我怀疑有一个图书馆或缺少的东西。

谁能解释我为什么会收到这个错误,或者更好的是,如何解决它?

【问题讨论】:

    标签: compilation autoconf docker torque


    【解决方案1】:

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

    RUN autoconf
    

    应该是:

    RUN ./autogen.sh
    

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

    【讨论】:

      【解决方案2】:

      您需要安装 autoconf、automake 和 libtool。并且可能是 pkgconfig。之后,运行autogen.sh 脚本。自动工具脚本现在应该就位了,您可以配置包。

      【讨论】:

        猜你喜欢
        • 2012-02-07
        • 2015-04-18
        • 2018-06-14
        • 1970-01-01
        • 1970-01-01
        • 2019-05-07
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多