[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Creating debs using a cross-build envronment?



On Thu, 23 Feb 2012 14:16:42 +0100
Svante Signell <svante.signell@telia.com> wrote:

> On Thu, 2012-02-23 at 13:03 +0000, Neil Williams wrote:
> > You don't need cross-build tools for that. Your doing a native build,
> > so just use the normal Debian packaging tools (dpkg-buildpackage) and
> > build for hurd-i386.
> 
> I'm doing that natively for most packages already. Some packages are
> problematic though, so maybe a cross-build can be of use.

How? When a package will not build natively, it won't cross build
either. You need to identify a subset of the package.
 
> > > b) And to enable support for gnat in GNU/Hurd, either as a deb or
> > > binaries created by the cross-build environment and copied to the target
> > > for native .deb builds there.
> > 
> > Forget about linux-i386/hurd-i386 cross-building and just change the
> > package in such a way that it can build a minimal .deb which provides
> > enough functionality without the complicating dependencies, such that
> > you can then build the next stage. Cross-building is not the answer
> > here and even if you are convinced it is, Emdebian cannot provide the
> > toolchains to do it.
> 
> I think cross-building is the _only_ answer here since gnat needs gnat,
> see my previous mail.

No, we've been here before in Emdebian. When foo needs foo, foo needs
to be modified to build mini-foo which doesn't need extra stuff, and
provides just enough functionality to allow mini-foo to be installed
(natively) and then support the building of another foo before you maybe
go on and build the full foo.

perl does this, compilers do this. The issue with cross-building is
that you cannot run the binaries compiled as cross binaries on the
system which is doing the build. So the best solution here is to build
natively, building only a small subset of the functionality.

Identifying the subset is the hard part.

Even if you do a cross-build, you're still going to need to build this
mini-foo subset natively in order to execute it during the cross-build
of the rest of the package.

This is where CC_FOR_BUILD comes in. Quite a few packages use this kind
of method.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgpnLeH2GqAVn.pgp
Description: PGP signature


Reply to: