[Rpm-maint] Problems using RPM to build cross-compiled (MinGW/Windows) packages
rc040203 at freenet.de
Mon Aug 11 06:23:30 UTC 2008
On Mon, 2008-08-04 at 14:58 +0100, Richard W.M. Jones wrote:
> On Mon, Aug 04, 2008 at 07:56:31AM -0500, Mark Hatle wrote:
> > You will want to probably define _strip as true or provide a custom
> > __os_install_post. This is a necessity if you are creating a cross
> > compiler with binaries for another architecture.
> I maybe should have said that I'm aware of the workarounds used to
> modify __os_install_post and was just wondering if we could get
> something in base RPM instead, but ...
Well, IMO the only applicable approach is to tighten the paths rpm's
scripts are searching (or to add some parameter to them).
> > For packages compiled to run on a different target the right approach is
> > to provide a macro file that will be autoloaded by rpm using
> > --target=i686-mingw32. In this file you can specify all of the things
> > that a target package uses to compile, strip, etc.
> ... I didn't know you could do this, and it looks like a better
> approach to try.
This won't help.
rpm's --target causes rpm to build rpms for a different rpm-platform (in
your case: rpms which are supposed to be installed on mingw).
Your problem however is rpm (and __os_install_post, STRIP etc.) not
being able to distinguish and mistreating host and target binaries when
building rpms (in your case: linux-rpms containing mingw binaries).
This is not related to rpm's --target at all. rpm's target is something
completely different than configure's --build/--host/--target.
More information about the Rpm-maint