【问题标题】:Error in configure file配置文件出错
【发布时间】:2013-09-09 00:59:15
【问题描述】:

我尝试编译一个在配置文件中有这些行的旧程序:

4143 if ac_fn_c_try_compile "$LINENO"; then :
4144  ac_cv_prog_hostcc_works=1  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4145 $as_echo "yes" >&6; }
     else
      as_fn_error $? "installation or configuration problem: host compiler $HOST_CC cannot create
      executables." "$LINENO" 5
     fi

这会导致以下错误:

./configure: line 4145: syntax error near unexpected token `}'
./configure: line 4145: `$as_echo "yes" >&6; }'

我该如何解决这个错误?

【问题讨论】:

  • 哪种语言/编译器?
  • 这是 SUSE Linux 系统上的 GCC。
  • 你检查错误行了吗?
  • 我对配置脚本不是很熟悉,也看不懂错误信息。当我注释掉它运行的括号时,但我怀疑它会做什么: 4144 ac_cv_prog_hostcc_works=1 #{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4145 #$as_echo "yes " >&6; }
  • 4145 行的开头缺少空格,不确定配置脚本是否对缩进敏感。

标签: c linux compiler-errors configure


【解决方案1】:

我发现少了一个分号:

4144  ac_cv_prog_hostcc_works=1;  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5

【讨论】:

    猜你喜欢
    • 2017-06-21
    • 2013-06-28
    • 2023-01-30
    • 2020-10-01
    • 2014-10-27
    • 2021-12-03
    • 2015-08-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多