我遇到了和发布的问题相同的问题这里,但就我而言,使用的是 Ubuntu 12.04 LTS Live USB,在~/trimaran/openimpact
文件夹内。
我尝试执行./install_openimpact
,然后 shell 最后回复我:
Processing platform/x86lin_gcc/IPA_lib/__impact_lib.c
gcc -w -E -m32 -DIMPACT_FIX -I/home/ubuntu/trimaran/openimpact/platform/x86lin_gcc/include -I/home/ubuntu/trimaran/openimpact/include -I/home/ubuntu/trimaran/openimpact/config/x86lin_c platform/x86lin_gcc/IPA_lib/__impact_lib.c > platform/x86lin_gcc/IPA_lib/__impact_lib.i
impact-edgcpfe --pcode -m -w platform/x86lin_gcc/IPA_lib/__impact_lib.i
"platform/x86lin_gcc/IPA_lib/__impact_lib.c", line 1943: error: declaration is
incompatible with "int getnameinfo(const struct sockaddr
*__restrict__, socklen_t, char *__restrict__, socklen_t, char
*__restrict__, socklen_t, int)" (declared at line 679 of
"/usr/include/netdb.h")
int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
^
1 error detected in the compilation of "platform/x86lin_gcc/IPA_lib/__impact_lib.i".
Exiting: non-zero exit code
make[1]: *** [platform/x86lin_gcc/IPA_lib/__impact_lib.pst] Error 1
make[1]: Leaving directory `/home/ubuntu/trimaran/openimpact'
make: *** [all] Error 2
有任何想法吗?
答案1
打开文件platform/x86lin_gcc/IPA_lib/__impact_lib.c
并转到行号:1943,然后在函数中将getnameinfo( )
最后一个参数从更改为 unsigned int flags
,然后 int flags
尝试安装,软件openimpact
就会成功安装。