User: Password:
|
|
Subscribe / Log in / New account

Fedora mulls ARM as a primary architecture

Fedora mulls ARM as a primary architecture

Posted Mar 22, 2012 18:05 UTC (Thu) by wookey (subscriber, #5501)
In reply to: Fedora mulls ARM as a primary architecture by pboddie
Parent article: Fedora mulls ARM as a primary architecture

Having been involved in arm support in Debian for 13 years and this (cross-building) debate for much of that time it's kind of amusing to see the reaction in Fedora-land with talk of the 'craziness' of native build farms for slow arches and the 'idiocy' of not cross-building everything.

Debian has of course been doing this (native building on build farms for all arches)for 15 years. The distro isn't broke because of it, in fact code quality is dramatically improved as a result, but yes, security updates do take longer. And yes you have to do some things differently (like not doing regular complete-rebuilds on all arches).

Cross-building will never be as reliable as native-building. You can't run tests*, and for some things at least you can't ask the machine: you have to ask some config, which is more likely to get stale than the machine. That's _why_ it's good CS practise to run configure- and build-time tests to check things, which is why builds increasingly do this. Calling it 'broken' is hopelessly simplistic. This trend does annoy the hell out of cross-compiling peeps.

On the other hand cross-building remains useful even as ARM hardware gets faster, and it could work a whole heap better than it does now (in Debian/Ubuntu). Multiarch is indeed a big part of making that reliable, but there will always be tradeoffs, as anyone who's actually done some will be able to tell you.

If anyone _is_ interested in making ARM cross-building work better in the multi-arch context, then do please look at my multiarch cross-autobuilder and fix things (as you'll see there is plenty to fix right now as the state could reasonably be summarised as 'mostly broken'). It's particularly bad today as there is version skew on libc so almost no cross-build-deps installed):
http://people.linaro.org/~wookey/buildd/precise/sbuild-ma...

Of course that's just Ubuntu (Debian unstable will be added shortly now that multiarch dpkg has finally arrived). Fedora is not (yet?/ever?) using multiarch so would need to use a different cross-build mechanism anyway, such as the Open Build System or Scratchbox models ('fake-native' building using emulation and native back-end tools such as the compiler), or classical/sysroot mechanisms.

Personally I think it's important that cross-building works as well as it reasonably can in a distro, for the same reasons that it's good for a distro to build properly on lots of architectures. It improves code quality, roots out things that are just plain wrong, and makes things like bootstrapping new ports and rebuilding for optimisations _much_ easier.

But suggesting that a whole distro should be built this way does not make much sense outside of some relatively small use-cases (e.g. arches where you have no choice such as AVR, and subset rebuilds for speed reasons, and for build-time configurability of the sort that Yocto/OE/buildroot/openbricks/ptxdist take advantage of). Native-building must be considered canonical for large binary-package distros, and cross-building will remain subsidiary to that.

All IMHO of course, but I claim to have some clue.

* You might be able to run tests via qemu, but that may be available for the target arch and it may not give the same results.


(Log in to post comments)

Fedora mulls ARM as a primary architecture

Posted Mar 22, 2012 19:30 UTC (Thu) by jcm (subscriber, #18262) [Link]

Jon Corbet, can you please add a G+ style "+1" button so I can go around +'ing everything wookey says? ktnxbye.

Fedora mulls ARM as a primary architecture

Posted Mar 22, 2012 22:35 UTC (Thu) by pboddie (guest, #50784) [Link]

I don't disagree with most of what you've written, but I will dispute the following:

Cross-building will never be as reliable as native-building. You can't run tests*, and for some things at least you can't ask the machine: you have to ask some config, which is more likely to get stale than the machine.

There are configuration-level tests which I accept are difficult to manage unless you're building natively, and there are validation-level tests which are actually needed to show that the executables really do work on the target hardware, but I see no need to punctuate the build process with the latter and permeate the process with native executable dependencies. It's a bit like the multi-stage aspect of things like debootstrap: a certain amount of time can be done without depending on the target environment, and then stuff that actually requires the target environment can be done there.

Where ample resources are available to do the heavy lifting of compilation on one architecture, it's wasteful to disregard those and to put the burden on the target architecture. I look forward to the point where people try and build PyPy for ARM - that's already a very heavy (and not parallelised) exercise on x86(-64) requiring a fast CPU and lots of RAM - so the case for cross-compilation isn't a curious historical anomaly just yet.

Fedora mulls ARM as a primary architecture

Posted Mar 23, 2012 1:02 UTC (Fri) by wookey (subscriber, #5501) [Link]

Yes, you are right that it makes a lot of sense to separate out the validation tests into something that is run later on the real hardware (not least becuase the build hardware and the runtime hardware may not pass/fail in exactly the same way). The catch is that most build-systems include the tests as one of the build targets and expect to do them at build-time using build-time paths and the source code files, not later, using install-time paths and the files available in the installed package.

We probably could fix this - I must admit I've not really looked at it in any detail. Maybe it's not even too difficult?

Fedora mulls ARM as a primary architecture

Posted Mar 23, 2012 5:30 UTC (Fri) by khim (subscriber, #9252) [Link]

We probably could fix this - I must admit I've not really looked at it in any detail. Maybe it's not even too difficult?

it's not that difficult to fix, but it's PITA to keep fixed. Unless you are doing cross-compilation geared project like Android (in which case on-target compilation bitrots instead).

Fedora mulls ARM as a primary architecture

Posted Apr 4, 2012 20:09 UTC (Wed) by cmsj (guest, #55014) [Link]

Fortunately pypy has a fast build time on arm at the moment because it ftbfs after 6 minutes ;)

https://launchpad.net/ubuntu/+source/pypy/1.8+dfsg-2/+bui...


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds