upvote
The GNU versions work fine in macOS. Apple doesn’t want to distribute them, but that’s mean you can’t use them.
reply
> Apple doesn’t want to distribute them

Apple can't distribute them - coreutils is GPLv3, which is incompatible with Apple's immutable system volume.

reply
That's a brand new excuse, Apple refused to distribute GPLv3 when GPLv3 was first published, 20ish years ago. How is GPLv3 incompatible with their system volume, yet GPLv2 is still fine?
reply
GPLv3 added language which specifically requires that GPLv3 software embedded in products be distributed with "Installation Information" explaining how modified versions of that software can be installed. It is not at all clear how this would apply to software in an immutable, signed system volume. This language was not present in GPLv2.

https://www.gnu.org/licenses/gpl-3.0.en.html#section6

(There are other issues with GPLv3 which make it a dubious choice for companies like Apple, but this one is particularly problematic.)

reply
This isn't new, GPLv2 is somehow compatible. This is the entire reason Mac OS ships an old version of bash but recent git.
reply
Of course, but any script meant for Mac is going to assume Mac core utils, even assume zsh instead of bash. You don't want to be the one person on the team with a non-stock setup.
reply
> The GNU versions work fine in macOS. Apple doesn’t want to distribute them, but that’s mean you can’t use them.

We also test GNU coreutils on macOS. It is a bit tricky since the other maintainers and I don't own any macOS machines for testing. But we seem to do well enough with a shared system that Adélie Linux kindly allows the compile farm [1] to use, along with some additional CI machines.

[1] https://portal.cfarm.net/

reply
POSIX compliance doesn't buy you anything because you're trying to use GNU extensions, which aren't in POSIX.
reply
I'm not trying to. And it's not even like GNU/Linux/whatever is a superset of POSIX and I'm using the extensions. There are mutual differences in basic functionality.
reply
If you stick to POSIX, things generally work everywhere. It's not really a question of what is better, just what is portable.
reply
I don't know how compatible my Mac will really be with a Free/OpenBSD machine. Last time I tested this theory, some C code I was building on Mac clang didn't build on FreeBSD clang cause I was unknowingly using some extension enabled by default. But that was about 12 years ago.
reply
Sounds like it's Apple who's behind
reply
In some cases they are, but that's not the cause for the mismatch vs GNU.
reply