[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 12:03:24 +0100
Svante Signell <svante.signell@telia.com> wrote:

> On Thu, 2012-02-23 at 10:38 +0000, Neil Williams wrote:
> > On Thu, 23 Feb 2012 10:53:13 +0100
> > Svante Signell <svante.signell@telia.com> wrote:
> So the emdebian cross tools are only cross CPU, not cross OS, right?

There is no support for kernels other than linux from Emdebian.

Please don't confuse things with terming it cross-OS, it isn't, it is
still cross-architecture but hurd is one of those architectures which
isn't supported as a target for cross-compilation in Emdebian. Just the
same as there's no cross-compiler to compile for amd64 on armel (it's
for armel on amd64, not bi-directional). There are so many permutations,
not all can be covered or are worth covering. Some of those
combinations are between different kernels, some are not. It just so
happens that the only people who have put in the time to develop cross
toolchains for Emdebian only care about the Linux kernel.

A lot of the confusion here would have been prevented with more details
of what you actually wanted to achieve in the original post.

> > 1: Use a linux machine to cross-build for devices running Hurd? (No
> > idea whether Hurd even runs on machines which would be the target of a
> > cross-build). Again, which CPU?
> 
> Yes, and CPU is i386. Haven't tried a cross-built boot of Hurd, that
> requires much more work than I've done so far. Hurd runs natively on x86
> boxes, where the hardware is supported, and in VMs, like qemu/kvm I use.

So if the right kernel is running in the environment, (whether as a
chroot or a VM or emulator) what is the problem with compiling natively
using the headers and libraries for that kernel?

Cross-building for hurd-i386 on linux-i386 isn't going to avoid any of
the problems inherent in building natively on hurd-i386. In fact,
cross-building ADDS more problems - always. Cross-building is only done
at all when it is significantly faster (i.e. on amd64 for armel).

More likely you need to disable features / configuration stages for the
particular package until you get to a subset which can be built
natively and then use that to build the later stages. That is
bootstrapping code and doesn't necessarily have anything to do with
cross-building.

> a) I just asked about creating target .debs using the cross built tools
> instead of just binaries. 

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.

> 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.

-- 


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

Attachment: pgps_dsW5mD2v.pgp
Description: PGP signature


Reply to: