It seems there are two problems here.
The first one is "Error parsing dependencies file <outputOfQmlimportscanner>:illegal value at 0"
This is a duplicate of
QTBUG-58930, that is fixed now.
The second one is ".. is not a valid Mach-O binary (invalid magic 7f454c46)"
Apparently, qmlplugindumper is trying to load on the host platform also the library compiled for the target platform.
However, since it loads also the correct one it is able to do its job anyway, but of course, it shouldn't try to load the wrong library.
Do the warnig appear on 5.7 ? If not, I woneder if the second problem is triggered by the first; my guess is that, not being able to read dependencies (because of
QTBUG-58930) it try to load unneeded libraries.
Please let me know if the problem persists with 5.9.0 Beta or later version of Qt.