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 10:56 UTC (Thu) by slashdot (guest, #22014)
In reply to: Fedora mulls ARM as a primary architecture by jcm
Parent article: Fedora mulls ARM as a primary architecture

This is, indeed, a prime example of cluelessness. Even worse, they don't even realize it!

First of all, you are supposed to be releasing good source code as well as binaries, and if cross compilation is so broken, you are supposed to fix it.

Second, even if you are totally lazy and don't want to fix it, YOU CAN WORK AROUND IT.

Again, simply build packages in a full ARM system (either native or running on x86 with qemu-arm), and then replace gcc, as and ld either with a distcc (or other remote) client, or if running in qemu, with native cross-compilers.

Of course, this should only be done if a package fails to build with normal cross compilation.

The idea of running a compile farm on an embedded architecture like ARM is just insane and idiotic.

I mean, if the next architecture you want to support only comes inside a dishwasher, do you purchase a cluster of dishwashers to build the distribution?


(Log in to post comments)

Fedora mulls ARM as a primary architecture

Posted Mar 22, 2012 13:14 UTC (Thu) by khim (subscriber, #9252) [Link]

First of all, you are supposed to be releasing good source code as well as binaries, and if cross compilation is so broken, you are supposed to fix it.

Citation is needed really badly. I see no such requirements in GPLv2, GPLv3 or any other sane license. And I, for one, just flat our refuse to spend my time doing useless work. Sometimes cross-compilation makes sense (for example if I build package for Arduino), but often it's just easier to use native build.

Again, simply build packages in a full ARM system (either native or running on x86 with qemu-arm), and then replace gcc, as and ld either with a distcc (or other remote) client, or if running in qemu, with native cross-compilers.

This may break native compilation instead. Sometimes it's not a big deal (for example some ARM-packages here can not be build on ARM because linker needs >4GB of address space), but presumably they want to keep this possibility - and then it must be tested.

The idea of running a compile farm on an embedded architecture like ARM is just insane and idiotic.

Sure. As long as ARM remains “an embedded architecture”. But in this case it makes little sense to promote it to “primary architecture” status. The whole tempest started as admission that ARM is no longer just an embedded architecture. Well, if that's true then it should be capable enough to build itself.

Fedora mulls ARM as a primary architecture

Posted Mar 22, 2012 13:50 UTC (Thu) by slashdot (guest, #22014) [Link]

> I see no such requirements in GPLv2, GPLv3 or any other sane license.

It's not a legal requirement, but having a non-broken build system (which includes cross build capability) is a part of releasing open source quality software.

> This may break native compilation instead

Then test native compilation too once in a release cycle.

> Sure. As long as ARM remains “an embedded architecture”. But in this case it makes little sense to promote it to “primary architecture” status

Embedded architectures can be extremely important, since everyone uses a cell phone for instance; that doesn't mean it's a good idea to use them as build farm servers.

Maybe ARM servers will be viable eventually, but definitely not now.

For instance according to Wikipedia, Cortex A15 has 1/3 the Dhrystone IPC of Core i7 2600k, which isn't a good sign, although it could perhaps still win on system price/performance (kind of unlikely though).

Fedora mulls ARM as a primary architecture

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

Embedded architectures can be extremely important, since everyone uses a cell phone for instance; that doesn't mean it's a good idea to use them as build farm servers.

And this is a concern right now for anyone doing development for things like mobile phones. The attitude amongst the people who are supposedly most active (and best funded) has apparently mostly been to ignore the need for a decent cross-compilation workflow and instead either claim that running the compiler on a phone is "not that bad" or use second-rate workarounds like qemu, wasting an absurd amount of CPU time and energy emulating a native compiler and toolchain.

It should be completely possible to cross-build a distribution: very little code is actually in an architecture-specific machine language, and the build process should be using portable languages as well. I have high hopes that stuff like multiarch will help to work around the issues with tools and their liking for specific, immutable filesystem paths. That cross-building cannot be done for a distribution (various Debian-related efforts seem to undermine such claims) shouldn't be an excuse for not doing anything about it.

It has been over two decades since ARM had any kind of performance advantage over mainstream architectures, and although you can certainly go and buy a bunch of ARM-based devices to do parallel native builds, and although the performance per core of ARM-based devices is improving, it's wasteful and absurd to suggest that people would go and buy a cluster of modestly performing gadgets when the machine on their desk/lap/rack could race through the process in comparatively little time.

To label anyone as clueless may be rude, but it is fair to state that the situation is ridiculous.

Fedora mulls ARM as a primary architecture

Posted Mar 22, 2012 18:05 UTC (Thu) by wookey (subscriber, #5501) [Link]

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.

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

Fedora mulls ARM as a primary architecture

Posted Mar 23, 2012 12:16 UTC (Fri) by nhippi (subscriber, #34640) [Link]

Cross-building, as enabled in debian via multi-arch, isn't really intended for crossbuilding the distro except for special cases. Such as bootstrapping a new architecture.

The main target of cross-building is developers, who want to run their edit - build - run - debug cycle as fast as possible.

For building a distro, native building enables the eat-our-own-dogfood testing of all the build tools. It is not just the testsuites, but everything that is run during builds.

Fedora mulls ARM as a primary architecture

Posted Mar 23, 2012 23:53 UTC (Fri) by dlang (subscriber, #313) [Link]

there were discussions just recently about how RHEL/CentOS is a hard thing to maintain because the packages aren't compiled with the compiler and libraries shipped with RHEL.

this makes me doubt the 'eat your own dogfood' justification. There is some of that, but it's a rule they break in so many other cases (because it's so much work to compile everything)

Fedora mulls ARM as a primary architecture

Posted Mar 24, 2012 0:07 UTC (Sat) by rahulsundaram (subscriber, #21946) [Link]

You misunderstood the situation. Packages *are* built with the compiler in RHEL however during the development of a release, the compiler or libraries sometimes gets bumped up and not everything is rebuild because it would invalidate testing to some extend and this isn't specific to RHEL. Packages fail to build from source in other distributions as well. Usually they have some tracking mechanism to minimize this.


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