Re: Creating debs using a cross-build envronment?
On Thu, 2012-02-23 at 13:42 +0000, Neil Williams wrote:
> On Thu, 23 Feb 2012 14:16:42 +0100
> Svante Signell <email@example.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.
Aren't there differences?
> > > > 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.
Any ideas wrt gnat? Otherwise I'll try the cross-build effort. Looks
like I need to do both a cross-build and porting gnat to Hurd at the
same time (some progress already).
> 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.
When using a VM, like kvm it's no problem, Just build in a Linux
environment, copy the target files to Hurd in kvm, and test.
> Identifying the subset is the hard part.
I agree with you that it probably is.
> 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.
OK, that's the way forward if cross-build method does not work?
> This is where CC_FOR_BUILD comes in. Quite a few packages use this kind
> of method.
I think I understand, but can you give documentation references, or