Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Development (http://www.linux-archive.org/debian-development/)
-   -   cross-build-essential (http://www.linux-archive.org/debian-development/622695-cross-build-essential.html)

Wookey 01-19-2012 11:10 AM

cross-build-essential
 
I've thought for a long time that a package like build-essential for
cross-building would be a really good idea.

Currently to get the right tools and libs installed for cross-building
you need to do slightly different things on different distros

Having just been looking at sbuild cross-support it becomes clear that
something like this would be a very useful adititon.

Can anyone see any reason why we shouldn't just have
$arch-crossbuild-essential which depends on the right things?

It can easily be adjusted to be right for the distro it's in, and
removes the need for livebuilder, sbuild, multistrap etc to know
internally.

Currently on Debian you'll need to have made the emdebian repositories
available because otherwise you won't find any cross-compilers, but
hopefully we'll have them in the main archive in the not-too distant.
In Ubuntu it'll just work already (for armel/armhf).

I'll knock these up unless people have major objections.

Wookey
--
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120119121028.GF10922@dream.aleph1.co.uk">http://lists.debian.org/20120119121028.GF10922@dream.aleph1.co.uk

Roger Leigh 01-19-2012 11:44 AM

cross-build-essential
 
On Thu, Jan 19, 2012 at 12:10:28PM +0000, Wookey wrote:
> Having just been looking at sbuild cross-support it becomes clear that
> something like this would be a very useful adititon.
>
> Can anyone see any reason why we shouldn't just have
> $arch-crossbuild-essential which depends on the right things?
>
> It can easily be adjusted to be right for the distro it's in, and
> removes the need for livebuilder, sbuild, multistrap etc to know
> internally.

>From the sbuild POV, this would greatly simplify things, and make
support for all architectures much more robust. Not having
to hard code per-arch package lists and being able to handle it
just like we currently handle build-essential would, IMO, be a
Good Thing.

If it were to use the same file format that build-essential uses,
we would be able to reuse that.


Regards,
Roger

--
.'`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120119124407.GD31980@codelibre.net">http://lists.debian.org/20120119124407.GD31980@codelibre.net

Neil Williams 01-19-2012 12:02 PM

cross-build-essential
 
On Thu, 19 Jan 2012 12:10:28 +0000
Wookey <wookey@wookware.org> wrote:

> I've thought for a long time that a package like build-essential for
> cross-building would be a really good idea.

+1

> Currently to get the right tools and libs installed for cross-building
> you need to do slightly different things on different distros
>
> Having just been looking at sbuild cross-support it becomes clear that
> something like this would be a very useful adititon.
>
> Can anyone see any reason why we shouldn't just have
> $arch-crossbuild-essential which depends on the right things?
>
> It can easily be adjusted to be right for the distro it's in, and
> removes the need for livebuilder, sbuild, multistrap etc to know
> internally.

It should probably depend on build-essential itself as a starting point.

It does need to remain just the essential packages though - is it
actually much more than the relevant g++-$version-$triplet
cross-compiler?

The only issue is that cross-compilers don't always move to newer
versions in line with native compilers. So it would actually be easier
for $arch-crossbuild-essential to *not* be from the same source package
as build-essential.

> Currently on Debian you'll need to have made the emdebian repositories
> available because otherwise you won't find any cross-compilers, but
> hopefully we'll have them in the main archive in the not-too distant.
> In Ubuntu it'll just work already (for armel/armhf).
>
> I'll knock these up unless people have major objections.
>

Feel free to add me to the uploaders list...

--


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

Wookey 01-19-2012 01:32 PM

cross-build-essential
 
+++ Neil Williams [2012-01-19 13:02 +0000]:
> On Thu, 19 Jan 2012 12:10:28 +0000
> Wookey <wookey@wookware.org> wrote:
>
> > I've thought for a long time that a package like build-essential for
> > cross-building would be a really good idea.
>
> +1
>
> It should probably depend on build-essential itself as a starting point.

I suppose so. You won't get far without that.

> It does need to remain just the essential packages though - is it
> actually much more than the relevant g++-$version-$triplet
> cross-compiler?

The current list for sbuild, is:
Ubuntu precise:
armel: dpkg-cross, g++-arm-linux-gnueabi, libc6-dev-armel-cross, pkg-config-arm-linux-gnueabi
armhf: dpkg-cross, g++-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf
Debian Wheezy:
armel: dpkg-cross, c++-compiler-arm-linux-gnueabi, linux-libc-dev-armel-cross
armhf: dpkg-cross, c++-compiler-arm-linux-gnueabihf, linux-libc-dev-armhf-cross
mips: dpkg-cross, c++-compiler-mips-linux-gnu, linux-libc-dev-mips-cross
mipsel: dpkg-cross, c++-compiler-mipsel-linux-gnu, linux-libc-dev-mipsel-cross
powerpc: dpkg-cross, c++-compiler-powerpc-linux-gnu, linux-libc-dev-powerpc-cross
ia64: dpkg-cross, c++-compiler-ia64-linux-gnu, linux-libc-dev-ia64-cross

dpkg-cross is there for the autotools/cmake cross-config support, not the cross-library-mangling
support

Debian doesn't yet have the pkg-config-<triplet> packages. That needs fixing too, along with
getting some cross-toolchains built

> The only issue is that cross-compilers don't always move to newer
> versions in line with native compilers. So it would actually be easier
> for $arch-crossbuild-essential to *not* be from the same source package
> as build-essential.

OK. Although it's just a text file/depends list. It can be maintained anywhere. It may be
problematic to have it in debian when the cross-compilers themselves are not there yet (only in
emdebian toolchain repo) - a package can't depend on things that don't exist.

> Feel free to add me to the uploaders list...

righty-ho

Wookey
--
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120119143226.GG10922@dream.aleph1.co.uk">http://lists.debian.org/20120119143226.GG10922@dream.aleph1.co.uk

Karl Goetz 01-19-2012 11:44 PM

cross-build-essential
 
On Thu, 19 Jan 2012 12:10:28 +0000
Wookey <wookey@wookware.org> wrote:

> I've thought for a long time that a package like build-essential for
> cross-building would be a really good idea.
>
> Currently to get the right tools and libs installed for cross-building
> you need to do slightly different things on different distros
>
> Having just been looking at sbuild cross-support it becomes clear that
> something like this would be a very useful adititon.
>
> Can anyone see any reason why we shouldn't just have
> $arch-crossbuild-essential which depends on the right things?

shouldn't it be crossbuild-essential-$arch? it would help tab
completion for apt, and would probably allow easier searching.
thanks,
kk

--
Karl Goetz, (Kamping_Kaiser / VK7FOSS)
http://www.kgoetz.id.au
No, I won't join your social networking group

Paul Wise 01-21-2012 11:37 AM

cross-build-essential
 
On Thu, Jan 19, 2012 at 8:10 PM, Wookey wrote:

> Currently on Debian you'll need to have made the emdebian repositories
> available because otherwise you won't find any cross-compilers, but
> hopefully we'll have them in the main archive in the not-too distant.

Whats the status/blockers for getting these into Debian main?

I would dearly like to be able to compile ARM stuff elsewhere than on
my phone since it is a bit slow ;)

--
bye,
pabs

http://wiki.debian.org/PaulWise


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAKTje6G3QhjPpsC2Hnai2t06Z6e-WYX3440=4ewr4jsskdhV9w@mail.gmail.com">http://lists.debian.org/CAKTje6G3QhjPpsC2Hnai2t06Z6e-WYX3440=4ewr4jsskdhV9w@mail.gmail.com

Neil Williams 01-21-2012 02:29 PM

cross-build-essential
 
On Sat, 21 Jan 2012 20:37:58 +0800
Paul Wise <pabs@debian.org> wrote:

> On Thu, Jan 19, 2012 at 8:10 PM, Wookey wrote:
>
> > Currently on Debian you'll need to have made the emdebian repositories
> > available because otherwise you won't find any cross-compilers, but
> > hopefully we'll have them in the main archive in the not-too distant.
>
> Whats the status/blockers for getting these into Debian main?

Hector has more details but it's about just how to create the
cross-compilers themselves. It's the same source, built in a different
way - so the cross compiler package would need to build depend on the
relevant source package. There's also the problem of exactly how to
install the foreign architecture libgcc1 cross binary and other packages
needed for the compiler (during the build and runtime).

$ dpkg -s g++-4.4-arm-linux-gnueabi|grep Depends
Depends: gcc-4.4-arm-linux-gnueabi-base (= 4.4.5-8),
gcc-4.4-arm-linux-gnueabi (= 4.4.5-8), libstdc++6-4.4-dev-armel-cross
(= 4.4.5-8), libc6 (>= 2.11), libgmp3c2, libmpfr4

$ dpkg -s gcc-4.4-arm-linux-gnueabi|grep Depends
Depends: gcc-4.4-arm-linux-gnueabi-base (= 4.4.5-8),
cpp-4.4-arm-linux-gnueabi (= 4.4.5-8), binutils-arm-linux-gnueabi (>=
2.20.1-15~), libgcc1-armel-cross (>= 1:4.4.5-8), libgomp1-armel-cross
(>= 4.4.5-8), libc6 (>= 2.11)

$ dpkg -s cpp-4.4-arm-linux-gnueabi|grep Depends
Depends: gcc-4.4-arm-linux-gnueabi-base (= 4.4.5-8), libc6 (>= 2.11),
libgmp3c2, libmpfr4

$ dpkg -s binutils-arm-linux-gnueabi|grep Depends
Depends: binutils, libc6 (>= 2.11), zlib1g (>= 1:1.1.4)

The cross-dependency resolution is yet another feature of Debian which
is waiting for MultiArch...

The cross compilers we want in Debian won't do things like depend on
libgcc1-armel-cross but instead on libgcc1 [armel]. This is one of the
situations to which Raphael referred in another thread as "unneeded" -
i386/amd64 packages depending directly on armel packages. i.e.
cross-architecture multiarch dependencies. It is going to have to be
solved to get cross-compilers into Debian. It's probably going to have
to be solved to make Multiarch work with cross-building in the first
place.

One final question is the combination of cross-compilers to support -
in particular IIRC there are particular problems with biarch
architectures like sparc. There are a lot of problems trying to support
too many cross-compiler target architectures.

May be best to start with armel+armhf and wait until someone else steps
up to help with mips|mipsel.

> I would dearly like to be able to compile ARM stuff elsewhere than on
> my phone since it is a bit slow ;)

0: get a faster phone :-)

1: use the Emdebian toolchains for Squeeze in a chroot.

2: get a second armel board with a faster processor...

--


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

Vincent Danjean 01-21-2012 08:03 PM

cross-build-essential
 
Le 21/01/2012 16:29, Neil Williams a écrit :
> On Sat, 21 Jan 2012 20:37:58 +0800
> Paul Wise <pabs@debian.org> wrote:
>
>> On Thu, Jan 19, 2012 at 8:10 PM, Wookey wrote:
>>
>>> Currently on Debian you'll need to have made the emdebian repositories
>>> available because otherwise you won't find any cross-compilers, but
>>> hopefully we'll have them in the main archive in the not-too distant.
>>
>> Whats the status/blockers for getting these into Debian main?
[...]
> The cross-dependency resolution is yet another feature of Debian which
> is waiting for MultiArch...

While waiting on proper MultiArch in Debian (when will dpkg with
multiarch properly uploaded in Debian...), I prepared (mostly for
teaching needs) cross-compiler packages for mipsel and armel.
I compiled them on i386 and amd64, using compiler and software
from squeeze. If you need them, you can add:

deb http://people.debian.org/~vdanjean/debian unstable mipsel-cross armel-cross

I compiled (for use in cross-build) the binutils package, the
gcc-4.4 package and the gdb package using the support from the
Debian package itself. Note that, for the latter (gdb),
due to bug in the squeeze package for cross compilation, I use
the unstable (7.3-1) version + a patch found in one of the gdb
bug. It seems that the version in experimental is now ok (the
bugs are closed and there is even a gdb-multiarch package)

If these packages can be useful for other, feel free to use them.

Regards,
Vincent

PS: my student successfully used these packages on Debian squeeze/testing
and unstable but also in Ubuntu (for Ubuntu Lucid, you will have to install
the libmpfr4 package from Maverick (no other dependency))

--
Vincent Danjean GPG key ID 0x9D025E87 vdanjean@debian.org
GPG key fingerprint: FC95 08A6 854D DB48 4B9A 8A94 0BF7 7867 9D02 5E87
Unofficial pkgs: http://moais.imag.fr/membres/vincent.danjean/deb.html
APT repo: deb http://people.debian.org/~vdanjean/debian unstable main


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F1B280F.1090104@free.fr">http://lists.debian.org/4F1B280F.1090104@free.fr

Neil Williams 01-21-2012 09:32 PM

cross-build-essential
 
On Sat, 21 Jan 2012 22:03:11 +0100
Vincent Danjean <vdanjean.ml@free.fr> wrote:

> Le 21/01/2012 16:29, Neil Williams a écrit :
> > The cross-dependency resolution is yet another feature of Debian which
> > is waiting for MultiArch...
>
> While waiting on proper MultiArch in Debian (when will dpkg with
> multiarch properly uploaded in Debian...), I prepared (mostly for
> teaching needs) cross-compiler packages for mipsel and armel.
> I compiled them on i386 and amd64, using compiler and software
> from squeeze. If you need them, you can add:

Cross-compilers for mips and mipsel are available from Emdebian, based
on Squeeze. What's missing are toolchains based on wheezy or sid.

http://www.emdebian.org/crosstools.html

The current toolchains necessarily depend on the packages generated by
dpkg-cross which is how we have to deal with foreign architecture
packages until we get MultiArch.

> PS: my student successfully used these packages on Debian squeeze/testing
> and unstable but also in Ubuntu (for Ubuntu Lucid, you will have to install
> the libmpfr4 package from Maverick (no other dependency))

Yes, the Emdebian toolchains built on Squeeze are installable and
usable on Wheezy and Sid. There is still a need to build toolchains
based on gcc-4.6.

--


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

Wookey 01-23-2012 02:28 PM

cross-build-essential
 
+++ Paul Wise [2012-01-21 20:37 +0800]:
> On Thu, Jan 19, 2012 at 8:10 PM, Wookey wrote:
>
> > Currently on Debian you'll need to have made the emdebian repositories
> > available because otherwise you won't find any cross-compilers, but
> > hopefully we'll have them in the main archive in the not-too distant.
>
> Whats the status/blockers for getting these into Debian main?

To do this properly requires cross-dependencies to be enabled/allowed
in the buildd and archive infrastructure. arm-linux-gnueabi-gcc
build-depends on libc-dev:armel

Currently the buildd's don't know how to do this, and we don't allow
either build-depenencies or package dependecnies outside the
architecture.

After discussions at last year's debconf everyone is basically happy
that this stuff should be allowed where a good case is made (and this
is a good case), but various bits of infrastructure and scripts need
to be tweaked so they still work.

Currently debian cross-tools are built by the emdebian team (well,
Hector Oron in practice) using the buidlcross script (in experimental
these days) which uses dpkg-cross to generate the cross-libraries and
do the builds.

Ubuntu uses a different scheme, with a package that depends on the
various linux-source, binutils-source, gcc-source, eglibc-source
packages to do a 3-stage bootstrap and thus generate cross-packages.
This avoids cross-arch dependencies so it can be built in existing
infrastructure. Unfortunately the maintainer has never quite managed
to get his jobs list short enough to upload this to Debian, and it's
always going to be an interim solution anyway.

Last feb when we mooted uploading this for the time being it made
sense. Having got to this point I'd prefer to fix the cross-arch
dependency issues and upload some cleaner cross-compiler packages.

However right now no-one is really working on this much. Hector is
busy with armhf stuff (and a new job). I'm working on sbuild/buildd
multiarch cross-building.

If anyone wants to take the glory by actually making this work (it
probably isn't very hard at this stage) you are very welcome. The
debian-embedded list is the place where this stuff gets discussed.

> I would dearly like to be able to compile ARM stuff elsewhere than on
> my phone since it is a bit slow ;)

Would be nice wouldn't it? You should be able to use the emdebian
cross-tools fairly painlessly, but they do regularly get out-of-sync
with the main archive due to 'busy maintainers' syndrome which then
causes breakage.

Wookey
--
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120123152844.GX10922@dream.aleph1.co.uk">http://lists.debian.org/20120123152844.GX10922@dream.aleph1.co.uk


All times are GMT. The time now is 12:12 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.