使用gcc8.1.1编译gcc6.4.0

使用gcc8.1.1编译gcc6.4.0,gcc,makefile,Gcc,Makefile,我试图在Fedora28中安装gcc6.4.0,但出现了如下错误 In file included from ../.././libgcc/unwind-dw2.c:401:0: ./md-unwind-support.h: In function ‘x86_64_fallback_frame_state’: ./md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type ‘struct ucontex_t

我试图在Fedora28中安装gcc6.4.0,但出现了如下错误

In file included from ../.././libgcc/unwind-dw2.c:401:0:
./md-unwind-support.h: In function ‘x86_64_fallback_frame_state’:
./md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type ‘struct ucontex_t’
       sc = (struct sigcontext *) (void *) &uc_->uc_mcontext;
                                               ^~
最后的信息是:

make[3]: *** [../.././libgcc/shared-object.mk:14: unwind-dw2.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/home/rx/program/gcc-6.4.0/x86_64-pc-linux-gnu/libgcc'
make[2]: *** [Makefile:17378: all-stage1-target-libgcc] Error 2
make[2]: Leaving directory '/home/rx/program/gcc-6.4.0'
make[1]: *** [Makefile:23677: stage1-bubble] Error 2
make[1]: Leaving directory '/home/rx/program/gcc-6.4.0'
make: *** [Makefile:914: all] Error 2
我试过了,但还是失败了


我错过什么了吗?谢谢大家!

这是由于glibc的最新版本发生了更改,需要更改GCC源代码。GCC6.4.0是在这些更改发生之前发布的,因此您需要自己修补代码。需要解决的问题是

我尝试过前面的解决方案,但还是失败了


那是不可能的。你确定你不仅在第61行做了这两个建议的更改吗?

我认为你没有准确地显示错误。你确定上面写的是
struct ucontex\u t
而不是
struct ucontext
?该链接不再可访问。可以更新吗?gcc.gnu.org服务器刚刚被替换,一些链接还没有运行。该提交也可见,感谢快速更新。根据您的回答,我找到了searchig提交的文件。这个补丁是否有可能适用于GCC 4.9?它不是,但您只需要更改一个文件中的一行或两行(与您正在构建GCC的体系结构相关的一行),所以我相信您可以找到它。