Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
hrsOffline
Post subject: Emdebian apt repository, cross compiling  PostPosted: 10.02.2013, 21:47



Joined: 2012-04-08
Posts: 16

Status: Offline
Hi,

I need a cross compiling tool chain for ARM. Emdebian seems nice and easy and is documented in the official Debian wiki.

Can Emdebian be considered an official part of Debian or is it a fork / third party repository that is not supported by Aptosid/Debian? If it breaks can I keep the pieces? Is there another method to get such a tool chain that is prefered over adding the Emdebian repository or is Emdebian The Right Way?
 
 View user's profile Send private message  
Reply with quote Back to top
slhOffline
Post subject: RE: Emdebian apt repository, cross compiling  PostPosted: 10.02.2013, 22:39



Joined: 2010-08-25
Posts: 724

Status: Offline
Emdebian is not an official part of Debian.
 
 View user's profile Send private message  
Reply with quote Back to top
bfreeOffline
Post subject: Re: Emdebian apt repository, cross compiling  PostPosted: 10.02.2013, 22:57
Team Member


Joined: 2010-08-26
Posts: 247

Status: Offline
      hrs wrote:
Can Emdebian be considered an official part of Debian

No. Simply put if it was an official part of Debian then it would be on debian.org.
      hrs wrote:
or is it a fork / third party repository that is not supported by Aptosid/Debian? If it breaks can I keep the pieces?

I won't guess the Debian answer, but I think the only sane answer for aptosid is that you get to keep the pieces like any other third party repository.
      hrs wrote:
Is there another method to get such a tool chain that is prefered over adding the Emdebian repository or is Emdebian The Right Way?

I think Debian is aiming to provide them as part of the ultimate goal of multi-arch but it's not ready yet. In the meantime you could use emdebian in a chroot or virtual machine and protect your supportable aptosid system. aptosid still couldn't support your cross-compiling system in that case but at least your normal system is still clean and supportable. There are lots of other options such as compiling your own to native compiling in an emulator (e.g. qemu-system-arm).

Depending on what you are doing, you may find you actually want a particular toolchain (or at least that some particular toolchain would have the best support for what you are doing). Whatever toolchain it is a virtual machine (or possibly a chroot) should let you use it without risking your regular system.

Of course I may be wrong on some of the above, but hopefully it helps you decide what suits you best Wink
 
 View user's profile Send private message  
Reply with quote Back to top
DonKultOffline
Post subject: RE: Re: Emdebian apt repository, cross compiling  PostPosted: 10.02.2013, 23:41
Team Member


Joined: 2010-09-02
Posts: 481

Status: Offline
You can install a cross-compiler from emdebian relatively easy in your aptosid system, but you shouldn't. The problem is not so much the compiler itself but the packages you will likely need to satisfy your crossbuild dependencies. Many libraries aren't "Multi-Arch: same" and many binaries aren't "Multi-Arch: foreign" yet, so you have to decide between the native and the foreign (and for you on your build machine unexecutable) version. If whatever you might want to cross-compile has very few dependencies you might get away with it, but usually you don't.

So try it in a chroot if you must, for now, but cross-compiling is and should be always a last resort. Native is a lot better as tests can be run (provided upstream has some of course), cross-compiling bugs in the buildsystem are avoided (not that many people do cross compiling as it used to be very hard and only recently becomes easier – but still has disadvantages as I try to tell you here).

Either use an emulator or buy hardware. If you have either of them up and running get 'distcc' installed on host (=your armel box) and the build (=your current box)¹, add the cross-compiler on your build (but make sure it has the exact same version as the native one on the host) and configure distcc correctly to offload as many compile jobs as you like to your build box (with all headers included/preprocessor run as you don't want to install armel -dev packages on your build of course). Linking, testing and stuff will happen natively on your armel box (which is probably a bit low-powered) while compiling will happen on your big badass home box with a few CPUs in parallel.

Worked like a charm ~ one year ago for me (mostly compiling kernels for the box in question), in the meantime both boxes have a different job though and the few bits I needed to compile in the recent past for arm{el,hf} I do completely natively, so I can't help further than these general pointers I guess.


¹ yes, I really didn't messed this up, host-architecture is the architecture you want to run the binary on while build-architecture is the one where your (cross-)compiler is running. The naming can be really confusing for newcomers …

_________________
MfG. DonKult
"I never make stupid mistakes. Only very, very clever ones." ~ The Doctor
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
hrsOffline
Post subject: RE: Re: Emdebian apt repository, cross compiling  PostPosted: 11.02.2013, 11:54



Joined: 2012-04-08
Posts: 16

Status: Offline
Thanks for your replies. Looks like I will not be adding that repository but instead try to digest your alternatives. I do have the hardware (an Allwinner A10 device) but reportedly native compilation is slow.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio