I my view there is nothing to fix. On LM13 the build was done on a non-clean build environment. On LM17.3 you appear to have either a corrupt file system, or something went wrong cloning the gitb as at lea one source file is damaged. On my LM (version 18) everything builds just fine after only running prepare4cdk.sh on a standard installation.

Regards,

Audioniek