首页 > 解决方案 > 我从条中收到此错误消息:[.gnu.build.attributes]: 损坏的 GNU 构建属性注释:错误的注释类型:错误的值

问题描述

我在 Fedora 31 上为我的 c++ 程序创建了一个 rpm 包。我已经在 Debian 10 上创建了一个 .deb 包,没有问题,但是在 Fedora 31 上,当我使用 shell 命令时:

strip --strip-unneeded --remove-section=.comment --remove-section=.note ttxtgm

我收到此错误消息:

strip:ttxtgm[.gnu.build.attributes]: 损坏的 GNU 构建属性 注意:错误的笔记类型:错误的值

我不明白这个可执行文件有什么问题。我使用 g++ 来构建我的程序。在 Debian 10 上执行的相同命令 shell 可以正常工作。我无法从 strip 中找到有关此错误消息的任何信息。

标签: linuxg++fedorastrip

解决方案


这是最近在 Fedora 31 中引入的一个 binutils 错误:

它正在修复binutils-2.32-29.fc31,此binutils 更新。一旦它命中 Fedora 镜像,您可以使用以下命令安装它:

dnf update --enablerepo=updates-testing binutils

在此之前,您可以直接从 Koji 安装构建,从binutils-2.32-29.fc31 构建

dnf install https://kojipkgs.fedoraproject.org//packages/binutils/2.32/29.fc31/x86_64/binutils-2.32-29.fc31.x86_64.rpm

推荐阅读