Update.... The Pi had not been re-booted for a while, and I think a memory leak elsewhere in the system was causing the build to fail. I shut it down and re-started and the build has got past the previous error point...so far so good. Building on 2 Pi's now to make sure...