RPM build problem.

David Muse david.muse at firstworks.com
Fri Dec 12 15:49:07 UTC 2003

On Fri, 12 Dec 2003 15:36:26 +0900
Naoki <naoki at valuecommerce.com> wrote:

> Hello all.
> I'm building binary RPMS on a Fedora box and then using them on a
> Solaris box. Problem is during the RPM build phase a 'strip' ( or
> something I'm not sure yet ) is destroying the binary files. 
> Don't know if this is the best place to ask but fedora users are a smart
> bunch.
> On my box : file appname
> appname: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), dynamically
> linked (uses shared libs), stripped
> After the rpm build, and install my binaries are now buggered :
> appname: ELF 32-bit MSB executable unknown machine Version 1,
> dynamically linked, stripped
> Any ideas?

I ran into this problem on Redhat 8, 9 and now Fedora while building
RPMS for an arm platform.  The problem is with the strip command itself.
Long ago, strip used to abort if the file it was told to strip was from a
different architecture than the one it was compiled for.  These days, it
just goes ahead and strips it and outputs a warning indicating that the
file might be ruined.  It would be nice if there was an option to get the
earlier behavior, but there doesn't appear to be.

If you create a .rpmmacros file with the following contents:

%__os_install_post    %{nil}

rpmbuild will skip the entire strip phase.

David Muse
david.muse at firstworks.com

More information about the users mailing list