https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797
--- Comment #13 from Jack Howarth <howarth.at.gcc at gmail dot com> --- (In reply to Francois-Xavier Coudert from comment #12)> > Some potential confirmation of this: compiling with the 10.12 Xcode 8 on the > 10.13 machine with APFS leads to the same error. > > Another difference between HFS+ and APFS is file ordering: “Calling > readdir(2) on a directory in APFS returns filenames in hash order, whereas > HFS+ returns filenames in lexicographical order.” It might be an interesting exercise to encrypt the APFS volume and see if that throws just enough additional filesystem overhead in to make the problem go latent.