I'm also outright depressed with just how much "throw it over the wall and walk away" attitude there is upstream. Not only do various packages' configure/build scripts insist on auto-detecting CPU capabilities and using those instead of just doing as they are damn well told by the CFLAGS, there is also outright CFLAGS overriding going on, e.g. the rpm passed CFLAGS are set first followed by the package set CFLAGS. That just seems outright broken because the latter set of options should override, and in fact in some packages there are situations where something really messed up happens with things like -march=armv5tel being passed along with -mcpu=cortex-a8 which is clearly incompatible (and gcc emits a warning with words to that effect.
I am debating whether to even bother filing what is likely to be hundreds of bugs upstream about it just to make a point, because I expect they will all be closed as "won't fix, builds on my x86-64 machine and the rest of the world can burn for all I care”.
On Sep 20, 2019, at 17:40, Gordan Bobic <gor...@redsleeve.org> wrote:I'm also outright depressed with just how much "throw it over the wall and walk away" attitude there is upstream. Not only do various packages' configure/build scripts insist on auto-detecting CPU capabilities and using those instead of just doing as they are damn well told by the CFLAGS, there is also outright CFLAGS overriding going on, e.g. the rpm passed CFLAGS are set first followed by the package set CFLAGS. That just seems outright broken because the latter set of options should override, and in fact in some packages there are situations where something really messed up happens with things like -march=armv5tel being passed along with -mcpu=cortex-a8 which is clearly incompatible (and gcc emits a warning with words to that effect.While there is doubtless some of that attitude out there, I suspect that much more of it is simple ignorance. Many of us on the application development side came to Linux at a time when the market had pretty much flattened out the available hardware choices to two: x86 (cheap, ubiquitous and ‘Windows compatible') and PowerPC (available, but ‘Apple based’ and hence expensive). Thus, the art of crafting a build system to be able to deal gracefully with multiple architectures (not to mention cross-compiling toolchains!) was not deeply bred in the bone. I know that this was the case with myself. The advent of inexpensive ARM boards like the BeagleBone and the Raspberry Pi led to a revelation to me in this regard.
I am debating whether to even bother filing what is likely to be hundreds of bugs upstream about it just to make a point, because I expect they will all be closed as "won't fix, builds on my x86-64 machine and the rest of the world can burn for all I care”.It might be well to remember that these are Open Source projects; presumably, a great many of the maintainers of which are motivated by goals beyond the simple “it’s just a job”.
While filing hundreds of bug reports does indeed sound like a daunting task, would it perhaps be practical to work up a short guide or FAQ delineating the most common problems and “gotchas” found when attempting to cross-compile packages and how to avoid them? I for one would find such a thing quite useful.
When it comes to RH, that's questionable. See the link to a bugzilla I posted in the other message on this thread. When the distro package maintainer won't accept your bugfixes out of pure lazyness, it is difficult to be an apologist for that kind of behaviour.It's not the only example either. I filed a LOT of bugs on RHBZ in my time, and a large fraction of then were "won't fix" closed. Eventually I stopped bothering.
I am not technically cross compiling. I am building using mock, which creates a suitable arch chroot (in this case armv5tel). It just happens to all be running on a fairly obscene spec aarch64 box (Gigabyte MP30-AR0 with 128GB of RAM). A lot of this might not manifest if building on an ARMv5 machine, but my DreamPlugs would take days to do what the aarch64 box achieves in minutes. And it would still be a bug, even if it didn't manifest under certain circumstances.