Errors from UE4 Source when Packaging

link textI’m trying to package a project for windows using a source build with up-to-date code from the Release branch. I can build the engine just fine and all of my project’s C++ files are fine but I’m getting hundreds of errors from the UE4 source when I try to package. Here’s a snippet:

... Many more of these "doesn't exist" warnings
ActionGraph.IsActionOutdated: Module.OverlayEditor.cpp: Produced item "Module.OverlayEditor.cpp.obj" doesn't exist.
ActionGraph.IsActionOutdated: Module.OverlayEditor.cpp: Produced item "Module.OverlayEditor.cpp.txt" doesn't exist.
ActionGraph.IsActionOutdated: Module.QuadricMeshReduction.cpp: Produced item "Module.QuadricMeshReduction.cpp.txt" doesn't exist.
BuildMode.Build: Using Visual Studio 2019 14.21.27702 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702) and Windows 10.0.16299.0 SDK (C:\Program Files (x86)\Windows Kits\10).
ParallelExecutor.ExecuteActions: Building 254 actions with 12 processes...
ParallelExecutor.ExecuteActions:   [1/254] Module.QuadricMeshReduction.cpp
ParallelExecutor.ExecuteActions:   C:/Users/Sean/Projects/UnrealEngine/Engine/Source/Developer/MeshSimplifier/Private/QuadricMeshReduction.cpp(6): fatal error C1083: Cannot open include file: 'MeshUtilities.h': No such file or directory
ParallelExecutor.ExecuteActions:   [2/254] Module.LocalizationService.cpp
ParallelExecutor.ExecuteActions:   C:/Users/Sean/Projects/UnrealEngine/Engine/Source/Developer/LocalizationService/Private/DefaultLocalizationServiceProvider.cpp(14): error C3861: 'FMessageLog': identifier not found
ParallelExecutor.ExecuteActions:   [3/254] MeshBoneReduction.cpp
ParallelExecutor.ExecuteActions:   C:\Users\Sean\Projects\UnrealEngine\Engine\Source\Developer\MeshBoneReduction\Private\MeshBoneReduction.cpp(138): error C2027: use of undefined type 'FSkelMeshSection'
ParallelExecutor.ExecuteActions:   C:\Users\Sean\Projects\UnrealEngine\Engine\Source\Developer\MeshBoneReduction\Public\MeshBoneReduction.h(10): note: see declaration of 'FSkelMeshSection'
ParallelExecutor.ExecuteActions:   C:\Users\Sean\Projects\UnrealEngine\Engine\Source\Developer\MeshBoneReduction\Private\MeshBoneReduction.cpp(144): error C2027: use of undefined type 'FSkelMeshSection'
ParallelExecutor.ExecuteActions:   C:\Users\Sean\Projects\UnrealEngine\Engine\Source\Developer\MeshBoneReduction\Public\MeshBoneReduction.h(10): note: see declaration of 'FSkelMeshSection'

... many more of these errors

The errors I’m getting are mostly undeclared identifier, undefined type, “cannot open file ‘filename.h’”, and bad override specifier errors. So I’m guessing there’s something wrong with the include paths not letting the files reach to headers? But why would this affect game packaging since the engine build has already succeeded?

I’ve tried getting latest and merging, regenerating solution files, regenerating project files, cleaning + rebuilding engine, etc. but no luck.

I’ve also attached my full log file.

OK, I fixed it! I tried packaging via UE4 non-source version of UE4, and I still got a packaging failure, but the error was much more clear. It said something about issues packaging “UnrealEd”, whose header I had included for one of my files. This solution worked for me, and I was able to package in both the source and non-source UE4 versions: