Description of problem: When trying to run rpmbuild --ba --target=%{secondary_arch} $package.spec on a multiarch capable machine (aka, i386 on x86_64, ppc64 on ppc, etc), the necessary /usr/lib/rpm/arch-linux/macros files do not exist to set the proper paths and compile options. For example, to compile i386 on x86_64, %{_libdir} needs to change to /usr/lib instead of /usr/lib64 and RPM_OPT_FLAGS/CFLAGS needs to have -m32 added to the compiler options to compile properly, as well as proper linking options. Since the secondary arch macro files are contained in the base rpm package, and the base rpm package is not multilib installable (you get conflicts if you try), it becomes impossible to compile an rpm for a secondary arch on the primary arch without hand munging the spec file. Version-Release number of selected component (if applicable): 4.4.2-37.el5
The RPM rebase in 5.3 / Fedora 9 includes a fix for this issue.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-0079.html