This is one of those things you probably wouldn't have ever thought about unless you had to compile software yourself and maintain a system so that most (or preferably all!) parts are in a readily compilable state. On a totally unrelated note, there's this Linux distro called Gentoo...
ncdu is being rewritten in Zig. Which is cool! Rewriting commonly used tools in memory-safe languages is A Good Thing. The problem is that Zig is one of the newcomers to the memory-safe language scene, so this has a few implications:
- The ABIs are not finalized and you end up with software that depends on a specific compiler/runtime version and has to be updated in step with the compiler.
- It's not super robust against seemingly nitpick system differences that have major ramifications.
That second point is what was driving me insane! I was able to compile and install the new version of ncdu, but at runtime it would throw the dreaded Inconsistency in registered CommandLine options error that has to do with software linking to LLVM incorrectly. I had recently emerge -e @world to resolve other gremlins in the system to do with a new LLVM major version, but this one was persistent.
So I had a few options at this point:
- Keep banging my head on LLVM (ow) until it started working correctly
- Downgrade to the last C++ version of
ncduand hope it's supported for a while - Use Something Else
... And you know what? There are multiple projects with varying levels of drop-in compatibility to ncdu that implement a filesystem analyzer in Rust or Go or other languages! I settled on gdu which is very nearly a drop-in replacement for ncdu but written in Go. Works great, no complaints, moved on with my life. (... she says after having just run an emerge -e @world which took about 16 hours of the computer's life.)
.png)