On Apr 4, 2008, at 6:46 PM, DB wrote:
> I'm brand-new to RPM and am researching a problem for someone
> fairly new to RPM.
> We build software on several platforms (including 2 versions of
> Linux and 2 versions of Solaris), and we use RPM 4.3.3 (from what I
> can tell). In the Solaris 8 build, we're getting an error when the
> RPM is put together. The compress/strip commands complain that 8
> binary files are in an "unrecognizable format." It then puts the
> binary plus an empty garbage file into the RPM.
> Here's two snippets from the log, the first showing the tar of the
> binary, and the next showing the error where the empty garbage file
> is created:
> + tar xf -
> + tar chf - BinaryName
> + /usr/lib/rpm/redhat/brp-compress
> + /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
> /usr/bin/strip: Unable to recognise the format of the input file /
> I'll have to do a more exhaustive search of the system, but so far
> this happens to just 8 binary files for this particular build.
> These files have nonsense names, such as stXyzzy and are placed in
> the same destination directory as the binary.
> Has anyone seen this type of problem before? Can you point me to
> what I else I need to research, and whether there are rpm options
> that might prevent this from happening?
The first step is to reproduce the problem outside of rpmbuild:
The next step is to identify the format of BinaryName. One way is
The file should be ELF format. This command will display what is in
the ELF file:
readelf -a /home/mydir/RPM/BinaryName
Additional information is needed to diagnose your problem and suggest
Meanwhile, if you simply edit /usr/lib/rpm/redhat/brp-strip, and add
at the top, then rpmbuild will not attempt stripping the file. One
achieve the same effect by changing a macro to not attempt running
But putting a band-aid, by not attempting stripping, to avoid the
problem solves nothing.
There is also eu-strip that can be used instead of /usr/bin/strip. eu-
strip (from elfutils) is often smarter
about ELF internals.
73 de Jeff
Received on Sat Apr 5 18:30:51 2008