Error compiling GCC 3.4.6 in Ubuntu 14.04

空扰寡人 提交于 2019-12-10 01:54:45

问题


I am trying to compile GCC 3.4.6 in Ubuntu 14.04 x64. It already has newer version of GCC-4.8.2.

I ran ./configure --prefix=/usr/local/gcc-3.4 and make.

I ended up in several errors for which I could find solutions on searching.

Error 1

Error 2

Finally I ended up in this error, which I couldn't find any solution.

../../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

Does anybody know how to fix it? Please let me know if more details are needed.


回答1:


This is old good-known problem, regarding siginfo and siginfo_t

All you need is to look at you GCC sources for all places like

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;   \

this one is inside gcc/config/i386/linux.h but your arch may differ

And manually replace struct siginfo * to siginfo_t * and struct siginfo to siginfo_t, making it newest POSIX compatible. In every rt_sigframe declaration there is most common to be two such places, including your info field of problem.



来源:https://stackoverflow.com/questions/26375445/error-compiling-gcc-3-4-6-in-ubuntu-14-04

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!