Live data from Hacker News

Clang now makes binaries an original Pi B+ can't run

rachelbythebay.com

71–80 of 150 posts

Re: Clang now makes binaries an original Pi B+ can't run

#71

Earlier quoted context omitted.

Phones, not TV's, but that's pretty much the idea. Even better, the ARM core was tacked on as a sort of "dammit, I supposed we'll have to run applications" kinda thing and isn't even necessarily initialised during boot. Raspberry Pi's actually boot on a really fringe processor called a VideoCore. Arguably the GPU bootstraps the CPU, which makes my brain hurt.

I guess technically a CPU core within the GPU ASIC block loads code into the main CPU. What a weird design. Feels like the kinda of things that Wozniak would come up with to shave cost from the Apple Macintosh.

AFAIK Woz only really worked on Apple II and Apple /// but his Apple II disk drive controller lived on and was included in the Mac.

Re: Clang now makes binaries an original Pi B+ can't run

#72
post #4

You'll see a whole bandwagon of people saying things like, "supporting old hardware is BAD! It takes time and money that nobody has!", as though someone needs to be hired to sit around and do nothing but pore over code and constantly rewrite code for old hardware. There's plenty of evidence to the contrary, but since when has evidence mattered when it comes to defending the right of big business / big distro to do wh…

Your stance is:

    1/ Old hardware is free to support because the software for it just keeps working

    2/ Lazy Linux people didn't test the software that stopped working on old hardware
Those two things you believe to be true are inconsistent with one another. For example, in this context.

What you're missing is that code changes to do new stuff and sometimes those changes are incompatible with old hardware or operating systems. If noone is testing said old systems and the developer doesn't remember said eccentricities, the old systems will break when the new stuff lands.

If anything it might be better to spend the resources deleting the support for old hardware (probably at the point where people stop testing on it) so that people using the old stuff get a much clearer message that they also need to use old tools with it. It's hard to get sign off to do that either, leaving the probably broken stuff lying around is the spend-no-time-now choice.

Re: Clang now makes binaries an original Pi B+ can't run

#73
post #70
post #66

Earlier quoted context omitted.

Ah, thanks! I dug a little more and found that the original test [1] from llvm-toolchain was a little different in the upstream Debian repository. It set the triple to armv7l for armhf hosts. But I haven't yet found a similar repository on the Raspbian side. I guess I'd expect to find it within their GitHub org, but my searching didn't reveal it. [1] https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/comm...

Yeah, Raspbian doesn't seem to be developed as a community project. There's no package tracker[1] like Debian or Ubuntu. I suppose they don't tend to diverge much, in practice. Anyway, I suppose this all means Raspberry Pi OS/Raspbian are able to patch this, without requiring it to first be fixed in Debian or Clang. [1] https://raspberrypi.stackexchange.com/questions/1179/does-ra...

Interesting.

Uncovering this slight difference really makes me long for something like the Debian GitLab instance (or really any kind of public change tracking) to document a bug or suggest a change.

Agreed, sure looks like it's Raspbian's build configuration to fix.

Re: Clang now makes binaries an original Pi B+ can't run

#74
Title is unfortunately sensational. This is a default target change. Turns out clang still can build binaries for the Pi B+. You just need to be explicit about the architecture. So perhaps a small title change that's more clear about this being only default setting change?

Re: Clang now makes binaries an original Pi B+ can't run

#75

I doubt this is a deliberate change. Picking up information from the environment - a sibling mentions /etc/env.d/gcc - seems fairly likely. I'd guess the default triple is something like arm-unknown-linux unless clang finds or is is told something more specific to use, and the mechanism by which it gets told to use something more specific has fallen over. This might mean there are no arm v6 buildbots running, or it m…

> Picking up information from the environment - a sibling mentions /etc/env.d/gcc - seems fairly likely.

Why would CLANG do this ?

Re: Clang now makes binaries an original Pi B+ can't run

#76
post #8

[flagged]

It's not explicitly stated but in her reproduction she is actually running it on the pi, and compilers very much do normally compile for the arch that they are running on by default. A compiler which compiles for a different arch is called a cross-compiler. Unless you explicitly asked for a cross compile, it is indeed surprising for a compiler to emit a binary that won't run on the same machine.

It’s explicitly stated: “I figured, okay, maybe it's doing some optimization because it was built on the 4B. So, I went and did a build on the B+ natively. It also broke.”

So she was originally compiling on a newer RPi, but immediately switched to compiling on the same one that couldn’t run it. And I believe the actual system images for RPi are built to support all models (there aren’t separate downloads for different models unless you want 64-bit) so it’s not crazy to think that everything would work building on a newer model.

This is just a packaging defect, Clang/LLVM isn’t being configured correctly by RPiOS (Raspbian).

Re: Clang now makes binaries an original Pi B+ can't run

#77
post #4

You'll see a whole bandwagon of people saying things like, "supporting old hardware is BAD! It takes time and money that nobody has!", as though someone needs to be hired to sit around and do nothing but pore over code and constantly rewrite code for old hardware. There's plenty of evidence to the contrary, but since when has evidence mattered when it comes to defending the right of big business / big distro to do wh…

This has nothing to do with the distro; it looks like an upstream LLVM bug. And it does demonstrate the problem: old code doesn’t change, but interfaces and invariants do. Those external changes do represent maintainer burden. Armv6 isn’t really “old hardware” in the “disused, actively rotting” sense. That’s reserved for things like Itanium or HPPA, which distributions (and upstreams) would do perfectly well to remov…

Raspberry Pi Zero (W) are still great. There will be millions of them around in use for decades to come. I will probably always have a few in some drawer. Sad to hear that anyone even considers deprecating support for that hardware. Not to mention all other ARMv6 hardware still around. We need some baseline hardware types that just will always be supported, to add some friction to software rot and bloat in general.

Re: Clang now makes binaries an original Pi B+ can't run

#78
post #67

Earlier quoted context omitted.

And kiosks, like the McDonald's ordering kiosks. I wouldn't be surprised if they spend more on installation than on building the device itself!

I haven't interacted with these much, but in all such things, eg TVs, others, I get peeved at the thought process. Typical dev time for a new UI from scratch is years. And price drop on parts and their availability will be different down the road. I wonder of people are running all tests, DEV work in KVM or other emulation stacks for DEV, but then not accurately locking clock rate, and limiting RAM during testing. Be…

> I mean, outside of caring about customers every buying anything with your name again, there's the laughing stock factor.

The problem is, there is no competition, everyone sucks and only builds to "it works somewhat" quality. Hence, no incentive for anyone to invest more money.

Re: Clang now makes binaries an original Pi B+ can't run

#79
post #68

Earlier quoted context omitted.

Phones, not TV's, but that's pretty much the idea. Even better, the ARM core was tacked on as a sort of "dammit, I supposed we'll have to run applications" kinda thing and isn't even necessarily initialised during boot. Raspberry Pi's actually boot on a really fringe processor called a VideoCore. Arguably the GPU bootstraps the CPU, which makes my brain hurt.

Are you sure about that? As I understand it, the other product that chip was used in was a Roku stick. It's true that videocore was intended to be a GPU for phones, though.

I remember a Nokia device that used Videocore, I not sure if it ever made it to market.

Re: Clang now makes binaries an original Pi B+ can't run

#80
post #77

Earlier quoted context omitted.

This has nothing to do with the distro; it looks like an upstream LLVM bug. And it does demonstrate the problem: old code doesn’t change, but interfaces and invariants do. Those external changes do represent maintainer burden. Armv6 isn’t really “old hardware” in the “disused, actively rotting” sense. That’s reserved for things like Itanium or HPPA, which distributions (and upstreams) would do perfectly well to remov…

Raspberry Pi Zero (W) are still great. There will be millions of them around in use for decades to come. I will probably always have a few in some drawer. Sad to hear that anyone even considers deprecating support for that hardware. Not to mention all other ARMv6 hardware still around. We need some baseline hardware types that just will always be supported, to add some friction to software rot and bloat in general.

> Sad to hear that anyone even considers deprecating support for that hardware.

I don’t think anybody has. This appears to have been entirely an accidental regression.

Post reply on HN