我试图在Ubuntu 14.04 x64中编译GCC 3.4.6.它已经有更新版本的GCC-4.8.2.
我跑./configure --prefix=/usr/local/gcc-3.4和make.
我最终遇到了几个错误,我可以找到解决方案.
最后我结束了这个错误,我找不到任何解决方案.
../../gcc/unwind-dw2.c: In function `uw_frame_state_for':
../../gcc/unwind-dw2.c:1031: error: field `info' has incomplete type
make[2]: *** [libgcc/32/unwind-dw2.o] Error 1
make[2]: Leaving directory `/home/hp-11/Documents/gcc-3.4.6/build/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/home/hp-11/Documents/gcc-3.4.6/build/gcc'
make: *** [all-gcc] Error 2
Run Code Online (Sandbox Code Playgroud)
有人知道怎么解决吗?如果需要更多详细信息,请与我们联系.
Kon*_*rov 17
关于siginfo和siginfo_t,这是一个古老的知名问题
您只需要查看所有地方的GCC来源
struct rt_sigframe { \
int sig; \
struct siginfo *pinfo; \
void *puc; \
struct siginfo info; \
struct ucontext uc; \
} *rt_ = (CONTEXT)->cfa; \
sc_ = (struct sigcontext *) &rt_->uc.uc_mcontext; \
Run Code Online (Sandbox Code Playgroud)
这个是在gcc/config/i386/linux.h中,但你的拱可能会有所不同
而手动更换struct siginfo *到siginfo_t *和struct siginfo到siginfo_t,使之成为最新的POSIX兼容.在每个rt_sigframe声明中,最常见的是两个这样的地方,包括你info的问题领域.