Download

How to fix packaging errors after cloning a project?

I’ve cloned an architectural project I was working on so I could experiment with new lighting methods and also play with the new sun position plug-in. Turns out the new duplicte is better than the original but obviously now that i’ve cloned it the whole thing instantly fails when I go to package it.

Is there some good method to fix whatever is causing this? I imagine it’s something to do with the orginal project name being referanced wrong, now that the original file name has a ‘2’ after the name.

Below is the log after the fail, which happens pretty much right away. Any tips would be great!!


ATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2374: ‘GInternalProjectName’: redefinition; multiple initialization
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see declaration of ‘GInternalProjectName’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2374: ‘GIsGameAgnosticExe’: redefinition; multiple initialization
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see declaration of ‘GIsGameAgnosticExe’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2374: ‘GForeignEngineDir’: redefinition; multiple initialization
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see declaration of ‘GForeignEngineDir’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2374: ‘GFNameTableForDebuggerVisualizers_MT’: redefinition; multiple initialization
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see declaration of ‘GFNameTableForDebuggerVisualizers_MT’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2374: ‘GObjectArrayForDebugVisualizers’: redefinition; multiple initialization
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see declaration of ‘GObjectArrayForDebugVisualizers’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2084: function ‘void *operator new(std::size_t)’ already has a body
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see previous definition of ‘new’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2084: function ‘void *operator new](std::size_t)’ already has a body
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see previous definition of ‘new]’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2084: function ‘void *operator new(std::size_t,const std::nothrow_t &) throw()’ already has a body
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see previous definition of ‘new’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2084: function ‘void *operator new](std::size_t,const std::nothrow_t &) throw()’ already has a body
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see previous definition of ‘new]’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2084: function ‘void operator delete(void *) throw()’ already has a body
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see previous definition of ‘delete’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2084: function ‘void operator delete](void *) throw()’ already has a body
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see previous definition of ‘delete]’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2084: function ‘void operator delete(void *,const std::nothrow_t &) throw()’ already has a body
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see previous definition of ‘delete’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2084: function ‘void operator delete](void *,const std::nothrow_t &) throw()’ already has a body
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see previous definition of ‘delete]’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2084: function ‘void operator delete(void *,std::size_t) throw()’ already has a body
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see previous definition of ‘delete’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2084: function ‘void operator delete](void *,std::size_t) throw()’ already has a body
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see previous definition of ‘delete]’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2084: function ‘void operator delete(void *,std::size_t,const std::nothrow_t &) throw()’ already has a body
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see previous definition of ‘delete’
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq2.cpp(4): error C2084: function ‘void operator delete](void *,std::size_t,const std::nothrow_t &) throw()’ already has a body
UATHelper: Packaging (Windows (64-bit)): E:\Unreal Projects\fort_le_crocq2\Intermediate\Source\fort_le_crocq.cpp(4): note: see previous definition of ‘delete]’
UATHelper: Packaging (Windows (64-bit)): ERROR: UBT ERROR: Failed to produce item: E:\Unreal Projects\fort_le_crocq2\Binaries\Win64\fort_le_crocq.pdb
UATHelper: Packaging (Windows (64-bit)): (see C:\Users\K3D-3D DESIGN\AppData\Roaming\Unreal Engine\AutomationTool\Logs\F+UNREAL+UE_4.21\UBT-fort_le_crocq-Win64-Development.txt for full exception trace)
UATHelper: Packaging (Windows (64-bit)): Total build time: 6.98 seconds (Parallel executor: 0.00 seconds)
PackagingResults: Error: UBT ERROR: Failed to produce item: E:\Unreal Projects\fort_le_crocq2\Binaries\Win64\fort_le_crocq.pdb
UATHelper: Packaging (Windows (64-bit)): Took 7.1924114s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Packaging (Windows (64-bit)): ERROR: UnrealBuildTool failed. See log for more details. (C:\Users\K3D-3D DESIGN\AppData\Roaming\Unreal Engine\AutomationTool\Logs\F+UNREAL+UE_4.21\UBT-fort_le_crocq-Win64-Development.txt)
UATHelper: Packaging (Windows (64-bit)): (see C:\Users\K3D-3D DESIGN\AppData\Roaming\Unreal Engine\AutomationTool\Logs\F+UNREAL+UE_4.21\Log.txt for full exception trace)
UATHelper: Packaging (Windows (64-bit)): AutomationTool exiting with ExitCode=5 (5)
PackagingResults: Error: UnrealBuildTool failed. See log for more details. (C:\Users\K3D-3D DESIGN\AppData\Roaming\Unreal Engine\AutomationTool\Logs\F+UNREAL+UE_4.21\UBT-fort_le_crocq-Win64-Development.txt)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults: Error: Unknown Error

I managed to fix this at last but will leave the thread in case anyone else needs it.

My fix was in the project folder in - intermediate/source there are 3 files with .build .cpp and .cs extensions. For some reason there were 3 version of the old filename and 3 versions of the new file name. Deleting the 3 with the old file name fixed the package error.

Not sure why they would be copied with old filename and not renamed during project clone but UE4 is funny like that ay.

Next time just delete Intermediate folder at all

Thank you both, this fixed my problem!

it worked well with me thanks!

yeah deleting Intermediate for package is solution.

Thank you both alot

Fixed my problem as well… Thanks a lot…

thank you guys, helped me too.

Wow, this was killing me. Solved it for me too. I can’t thank you enough. UE 4.23.

Thank goodness this is documented here. I was frustrated that I got this error after changing my project’s name.

Thanks so much! Sometimes it helps also to delete ‘Saved’, ‘Build’ and ‘Binaries’.

2020 and 4.24version, it worked me too !

Thank you this fixed my issue with cloning projects for the Quest. I appreciate the Knowledge!

Thanks

Thanks a lot!