[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 10:53:13 +0100
Svante Signell <svante.signell@telia.com> wrote:

> Hi,
> I found some Debian tools to create .deb packages available, like
> pdebuild-cross, buildcross, xapt, xdeb, dpkg-cross, most of them
> developed by emdebian. According to your web pages all these tools seems
> to create GNU/Linux packages for a specific CPU using GNU/Linux as
> build/host environment. Are there tools available also for another OS,
> in my case GNU/Hurd. 

A change of kernel is a change of architecture. However, there has been
no testing of cross-compiling on anything other than i386-linux,
amd64-linux and powerpc-linux. i.e. whatever cross targets are
available from Emdebian, they are all Linux build & host.

There is no hurd support in either Debian or Emdebian except hurd-i386.

> Up til now I have created a cross build environment with gcc-4.4,
> eglibc-2.13, gnumach and hurd libraries, etc. Next step would be to
> create .debs for the target architecture.

What is the target architecture? arm-linux-gnueabi (armel) ?

Are you trying to invent an ARM Hurd architecture? This is NOT
supported by dpkg currently.

# Bidirectional mapping between a Debian triplet and a Debian arch.
# Supported variables: <cpu>
# <Debian triplet>      <Debian arch>
uclibceabi-linux-arm    uclibc-linux-armel
uclibc-linux-<cpu>      uclibc-linux-<cpu>
gnueabihf-linux-arm     armhf
gnueabi-linux-arm       armel
gnuspe-linux-powerpc    powerpcspe
gnulp-linux-i386        lpia
gnu-linux-<cpu>         <cpu>
gnu-kfreebsd-<cpu>      kfreebsd-<cpu>
gnu-knetbsd-<cpu>       knetbsd-<cpu>
gnu-kopensolaris-<cpu>  kopensolaris-<cpu>
gnu-hurd-<cpu>          hurd-<cpu>
bsd-freebsd-<cpu>       freebsd-<cpu>
bsd-openbsd-<cpu>       openbsd-<cpu>
bsd-netbsd-<cpu>        netbsd-<cpu>
bsd-darwin-<cpu>        darwin-<cpu>
sysv-solaris-<cpu>      solaris-<cpu>
uclibceabi-uclinux-arm  uclinux-armel
uclibc-uclinux-<cpu>    uclinux-<cpu>

Debian only supports Hurd for i386 (hurd-i386).


Are you trying to create hurd-arm ? If so, look at the dpkg sources and
work out what the architecture values would need to be. Which ARM CPU
are you targeting?

> I know most packages can be
> built natively, but not all, like gnat, etc.

Those which don't build natively for hurd have zero chance of
cross-building for hurd and might not even cross-build on hurd for
a linux target. 

> - what is missing from the built toolset so far (binutils, etc)
> - any emdebian tools usable for this, i.e. for cross OS package
> building?

It's not cross-OS, it's a kernel & architecture issue and that comes
down to whether the cross-compiler can be a) built with the alternative
kernel headers and b) use those headers in preference to the other
kernel within a cross-build and c) whether dpkg can recognise the new

What are you trying to do?

0: Use a GNU/Hurd machine to cross-build for devices running linux?
Which CPU?

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?

2: Use a Hurd machine to cross-build for devices running Hurd. See 1.

3: Natively build Hurd packages on a Hurd machine - in which case, you
don't need anything from Emdebian.


Neil Williams

Attachment: pgpCaT241qPFv.pgp
Description: PGP signature

Reply to: