I'm trying to rebuild rpm-4.2-1.src.rpm on RHL 9. When I do, the rpmbuild -ba dies with the following: extracting debug info from /var/tmp/rpm-root/usr/bin/rpmgraph extracting debug info from /var/tmp/rpm-root/usr/bin/rpm2cpio extracting debug info from /var/tmp/rpm-root/bin/rpm 12874 blocks + /usr/lib/rpm/redhat/brp-compress + /usr/lib/rpm/redhat/brp-strip /usr/bin/strip + /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip /usr/bin/strip: /var/tmp/rpm-root/usr/lib/stn0s9x1/libelf.a: Invalid operation /usr/bin/strip: /var/tmp/rpm-root/usr/lib/stCBMye8/libelf.a: Invalid operation error: Bad exit status from /var/tmp/rpm-tmp.78583 (%install) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.78583 (%install) Looks like the debug madness is trying to strip two files which shouldn't be stripped, but I don't know how to fix the .spec to prevent that (short of turning off debugging altogether ;-)
rpm-4.2 builds for me on Red Hat 9 (obviously, duh), so there's something different with your build system. Try installing elfultils and redhat-rpm-config to use eu-strip, not strip.
They're already installed: [cricker@fubar cricker]$ rpm -q redhat-rpm-config elfutils redhat-rpm-config-8.0.21-1 elfutils-0.76-3 [cricker@fubar cricker]$ Any other ideas? (fwiw, I'm not the only person seeing this. It's been mentioned on the fedora devel lists, for example)
Try upgrading binutils? Nope, all I know is that rpm-4.2 builds for me in Red Hat 9.
I get the same error when trying to compile crossmingw32-platform on RH9. Adding to the spec file %define __spec_install_post %{nil} as suggested at http://www.geocrawler.com/archives/3/87/2003/5/0/10468452/ did remove the problem.
Chris, does the method presented in comment #4 fix the problem for you?
FYI, I just got the same problem on a faad2 static lib (but have seen to here and there already...) and here's an interesting output : -bash-3.00# strip libfaad.a -bash-3.00# This one worked. But : -bash-3.00# eu-strip libfaad.a this is an archive member Segmentation fault -bash-3.00# During the build, I got lots of these messages, that I don't understand, but might be somewhat related : *** Warning: Linking the shared library libmp4.la against the *** static library ../../../common/mp4ff/libmp4ff.a is not portable! Anyway, seems like a problem with eu-strip to me. I though that eu-strip had been introduced to solve the issues with the regular strip... seems like things are reversed in this case.
This should be fixed in newer releases. If it's not, reopen with details on problems with the current generation of stuff.