Fedora and Cross Compiling

David Smith dsmith at redhat.com
Fri Jun 15 13:38:10 UTC 2007

David Woodhouse wrote:
> On Fri, 2007-06-15 at 07:59 -0500, David Smith wrote:
>> Note that we leave things so that native compiles still work.  We then 
>> check native dependencies (_arch == _build_arch) against our mock 
>> chroot's native rpm database, then check cross dependencies (_arch != 
>> _build_arch) against the mock chroot's target rpm database.
>> Target versions of autoconf and sed aren't needed since nothing links 
>> against anything in those packages (those packages are only run 
>> natively).  The only problem with this scheme is that we end up with an 
>> extra native dependency of libblah-devel (which really isn't needed 
>> since nothing links against it in the cross compile).  But the benefit 
>> of unaffected native compiles outweighed the extra dependency.
> I might go so far as to suggest that the benefit of avoiding that
> %if "%{_arch" == "%{_build_arch}" stuff in the specfile might outweigh
> the extra dependencies on autoconf and sed, too.
> One way of handling dependencies in mock for cross-builds might be to
> install the full set of dependencies for _both_ host and target
> architectures. 

I certainly see your point, but when bootstrapping an arch you sometimes 
get in these cases where X requires Y which requires Z which requires X, 
so you have to start chopping requires down to the minimal.

Plus, if a native require is for something quite complicated like perl 
or python, you typically want to postpone that pain for as long as 

David Smith
dsmith at redhat.com
Red Hat
256.217.0141 (direct)
256.837.0057 (fax)

More information about the fedora-devel-list mailing list