gcc - 使用gcc8.1.1编译gcc6.4.0
问题描述
我尝试在 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 源代码进行更改。GCC 6.4.0 是在这些更改发生之前发布的,因此您需要自己修补代码。所需的修复是 https://gcc.gnu.org/viewcvs/gcc/trunk/libgcc/config/i386/linux-unwind.h?r1=249731&r2=249730&pathrev=249731
我尝试了以前的解决方案,但仍然失败。
那是不可能的。您确定您在那里进行了建议的两项更改,而不仅仅是在第 61 行?
推荐阅读
- scala - 如何为特定文件/目录指定 Scala 样式规则?
- javascript - Angular函数被多次调用
- c# - 如何在wpf中将接口集合保存在xml中
- android - 在 android 上使用 SSL 证书获取
- android - Kotlin 是否有办法将接口的实现委托给另一个类?
- python - 根据多指标前两级选择
- c++ - 按照说明操作后无法构建 .dll
- vim - MacVim - 在打开文件的语言快捷方式之间切换
- docker - Rabbitmq 3.7.6 记录到文件不能使用 docker create 命令
- java - 在 Java 中验证 Http 请求的方法?