Not a Mac user, so I can only go by what I find, but ...
That problem looks similar to
this one. The bottom line in that case was that the MacOS linker didn't like deep dependency trees. Could that be the same here with the lengthy list of input files?