./md-unwind-support.h:65:47: 错误:dereferencing pointer to incomplete type ‘struct ucontext’的解决方法

9 篇文章 0 订阅

  这个错误是在使用cmake编译低版本gcc时候出现的。报错信息如下所示:

./md-unwind-support.h:65:47: 错误: dereferencing pointer to incomplete type ‘struct ucontext’
       sc = (struct sigcontext *) (void *) &uc_->uc_mcontext;
                                               ^

  在我这里,md-unwind-support.h文件在build/x86_64-unknown-linux-gnu/libgcc下,其实在最后的错误信息处有写路径。解决办法就是,打开该文件,找到出错的65行,往上四行,也就是61行的位置,是*uc_的定义,将该行改为:

struct ucontext_t *uc_ = context->cfa;

  然后再执行make就可以继续编译了。
  
  
参考链接:
我的AI之路(13)–解决编译gcc/g++源码过程中出现的错误

  • 9
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
"/pkg/qct/software/llvm/release/arm/14.0.0/bin/clang" -g -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -c -include AutoGen.h -mlittle-endian -fno-short-enums -save-temps -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -fno-builtin -Wno-address -fno-asynchronous-unwind-tables -target aarch64-linux-gnu -fcolor-diagnostics -fdiagnostics-format=vi -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unknown-warning-option -Wno-unused-function -Wno-bitwise-op-parentheses -mcmodel=small -ffixed-x18 -mstrict-align -fstack-protector -Wno-nonportable-include-path -Wno-misleading-indentation -fno-common -mtune=cortex-a53 -I/home/chen-docker/bin/boot/boot_images/BuildLogs/QcomPkg/SocPkg/LeMans/AU/Include -include /home/chen-docker/bin/boot/boot_images/boot/QcomPkg/Include/Library/DebugLib.h -DQCOM_EDK2_PATCH -DDISABLE_DEP -DENABLE_XN -DENABLE_ASLR -DENABLE_DEP_64 -DENABLE_EXEC_CODE_READY_TO_BOOT -DENABLE_AUTO_PLAT -DMAX_DDR_REGIONS=6 -mstrict-align -mcpu=cortex-a53 -DPRODMODE -c -o /home/chen-docker/bin/boot/boot_images/Build/LeMansAU/Core/RELEASE_CLANG140LINUX/AARCH64/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib/OUTPUT/./HiiLib.obj @/home/chen-docker/bin/boot/boot_images/Build/LeMansAU/Core/RELEASE_CLANG140LINUX/AARCH64/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib/OUTPUT/inc.lst /home/chen-docker/bin/boot/boot_images/edk2/MdeModulePkg/Library/UefiHiiLib/HiiLib.c /pkg/qct/software/llvm/release/arm/14.0.0/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory GNUmakefile:373: recipe for target '/home/chen-docker/bin/boot/boot_images/Build/LeMansAU/Core/RELEASE_CLANG140LINUX/AARCH64/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib/OUTPUT/HiiLib.obj' failed Building ... /home/chen-docker/bin/boot/boot_images/edk2/MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf [AARCH64] make: *** [/home/chen-docker/bin/boot/boot_images/Build/LeMansAU/Core/RELEASE_CLANG140LINUX/AARCH64/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib/OUTPUT/HiiLib.obj] Error 127 make: Nothing to be done for 'tbuild'. build.py... : error 7000: Failed to execute command make tbuild [/home/chen-docker/bin/boot/boot_images/Build/LeMansAU/Core/RELEASE_CLANG140LINUX/AARCH64/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib]错误在哪里?
最新发布
07-20
根据错误消息,错误发生在执行 `/pkg/qct/software/llvm/release/arm/14.0.0/bin/clang` 命令时。具体错误是 `libtinfo.so.5: cannot open shared object file: No such file or directory`,也就是找不到共享库文件 `libtinfo.so.5`。 这个错误通常是由于缺少对应的共享库文件或库文件路径配置不正确导致的。你可以尝试以下几个解决方法: 1. 安装缺失的库文件:根据错误消息,缺失的库文件是 `libtinfo.so.5`。你可以尝试使用包管理器安装该库文件。例如,在基于 Debian/Ubuntu 的系统上,可以运行 `sudo apt-get install libtinfo5` 命令来安装该库文件。 2. 更新库文件路径:如果你已经安装了库文件,但仍然遇到该错误,可能是因为库文件路径配置不正确。你可以通过设置 LD_LIBRARY_PATH 环境变量来指定正确的库文件路径。例如,`export LD_LIBRARY_PATH=/path/to/lib`,将 `/path/to/lib` 替换为包含 `libtinfo.so.5` 的目录路径。 3. 检查编译环境:确保编译环境中的依赖项和工具链已正确安装。你可能需要检查并安装所需的 LLVM、Clang 版本以及其他依赖项。 4. 更新构建脚本:如果以上解决方法都不起作用,你可能需要检查构建脚本中的编译命令和相关配置,确保正确设置了库文件路径和其他编译选项。 请注意,根据具体情况,可能存在其他原因导致该错误。如果以上解决方法都不起作用,你可以提供更多关于你的项目和构建环境的信息,以便我能够提供更具体的建议。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zeeq_

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值