C 配置文件中出现错误
我尝试编译一个在配置文件中包含以下行的旧程序:C 配置文件中出现错误,c,linux,compiler-errors,configure,C,Linux,Compiler Errors,Configure,我尝试编译一个在配置文件中包含以下行的旧程序: 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
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; }'
如何修复此错误?我发现缺少分号:
4144 ac_cv_prog_hostcc_works=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
哪种语言/编译器?这是SUSE Linux系统上的GCC。您检查错误行了吗?我对配置脚本不太熟悉,不理解错误消息。当我注释掉括号时,它会运行,但我怀疑它会做什么:4144 ac_cv_prog_hostcc_works=1#{$as#u echo“$as#me:${as_lineno-$lineno}:结果:yes”>&5 4145#$as#echo“yes”>&6;}您在第
4145行的开头缺少空格,不确定配置脚本是否对缩进敏感。