I'm creating an rpm package for my c++ program on Fedora 31. I've already created a .deb package on Debian 10 without issues, but on Fedora 31, when I use the shell command:
strip --strip-unneeded --remove-section=.comment --remove-section=.note ttxtgm
I get this error message:
strip:ttxtgm[.gnu.build.attributes]: corrupt GNU build attribute note: wrong note type: bad value
I can't understand what is the problem with this executable. I use g++ to build my program. The same command shell executed on Debian 10 works fine. I couldn't find any information about this error message from strip.
This is a binutils bug that was recently introduced into Fedora 31:
It is being fixed in binutils-2.32-29.fc31
, with this binutils update. Once it hits the Fedora mirrors, you can install it using:
dnf update --enablerepo=updates-testing binutils
Before that, you can install the build directly from Koji, from the binutils-2.32-29.fc31 build:
dnf install https://kojipkgs.fedoraproject.org//packages/binutils/2.32/29.fc31/x86_64/binutils-2.32-29.fc31.x86_64.rpm