It seems the ATen/core/TensorBody.h header file is generated during the build and ends up inside the build folder. When I first tried to compile I got the file not found problem and compilation stopped. Simply resuming the compilation a few times (WITHOUT cleaning the build in between so that it keeps whatever it has built so far) eventually got the whole thing to build. There is evidently an explicit build dependency missing somewhere that ensures that ATen/core/TensorBody.h is generated prior to it being required. Because I use 16 parallel jobs for my build, eventually the header gets built anyway and allows the rest to start succeeding. For your mobile scenario, if repeated retriggers of the build process don’t eventually let it succeed then I suspect that the missing explicit build dependency means that whatever generates ATen/core/TensorBody.h is never pulled into the build at all? Not sure.