Build error after upgrading to 4.15: "Failed to produce item"

I’m going through the “My First FPS Project” on the wiki, and about 3/4 of the way through decided to upgrade to 4.15. Since doing that though, every time I build after there have been changes I get the following errors:

Description:
Failed to produce item: C:\Users\Lava\Documents\Unreal Projects\MyFirstFPS 4.15\Intermediate\Build\Win64\UE4Editor\DebugGame\UE4Editor-MyFirstFPS-8880-Win64-DebugGame.lib	

File:
ERROR



Description:
The command ""C:\Program Files\Epic Games\UE_4.15\Engine\Build\BatchFiles\Build.bat" MyFirstFPSEditor Win64 DebugGame "C:\Users\Lava\Documents\Unreal Projects\MyFirstFPS 4.15\MyFirstFPS.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.

File:
Microsoft.MakeFile.Targets	41	

I made sure to check filesystem permissions since it said something about not having sufficient rights. If I hit rebuild instead of just build, then I don’t get this error, but the next time I change something and hit just build, it happens again.

It doesn’t seem like it’s actually breaking anything, my changes do seem to show up fine. Am I good to keep using 4.15 or would it be best to fall back until this gets resolved?

Thanks in advance!

I’m also running into the same problem after upgrading to 4.15:

ERROR : UBT error : Failed to produce item: C:\z\myproj\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-myproj-140.lib
2>  Total build time: 40.70 seconds (Local executor: 0.00 seconds)
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command ""C:\Program Files\Epic Games\UE_4.15\Engine\Build\BatchFiles\Build.bat" myprojEditor Win64 Development "C:\z\myproj\myproj.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.

Glad to know it’s not just me. Have you tried a fresh project to see if it happens there? I’ve been pretty deep in Maya land the last few days and haven’t gotten around to it yet, but will probably check sometime this week.

Can reproduce using fresh c++ project (happens both when starting from a 4.14.3 project and upgrading to 4.15 and just starting from a fresh 4.15-project).

Perhaps this is an issue with Visual Studio or some windows lib/SDK. Do you use VS too? I used the unsupported VS2017RC, uninstalled that but the error is still in VS2015.

It seems like the compile is actually successful even though the error is shown (feels kinda bad though). Hot reload runs and updates the project.

This is the repro I used:

  1. create new 4.15 c++ project from epic launcher
  2. VS2015 automatically starts
  3. Create a new c++ class, Atest derived from AActor and wait for it to compile and open
  4. drop the new actor into the default scene
  5. introduce a variable UPROPERTY(EditAnywhere) float foo; in test.h
  6. compile from VS, should output Build: 2 succeeded
  7. see that the test1 instance in the world outliner has got a Foo property in it’s details pane
  8. change float foo; to float bar;
  9. compile from VS, this time Build: 1 succeeded, 1 failed is output along with the error message above
  10. see that the test1 instance in the world outliner (surprisingly) has got a Bar property in it’s details pane

seems like my .dll, UE4Editor-permissionrepro-787.dll, is linked and picked up by the editor:

LogHotReload: New module detected: UE4Editor-permissionrepro-787.dll
LogHotReload: Starting Hot-Reload from IDE
LogClass: Could not find existing class test in package /Script/permissionrepro for HotReload, assuming new class
LogHotReload: Re-instancing test after hot-reload.
LogContentBrowser: Native class hierarchy updated for 'permissionrepro' in 0.0019 seconds. Added 2 classes and 2 folders.
Display: HotReload successful (0 functions remapped  0 scriptstructs remapped)
LogContentBrowser: Native class hierarchy populated in 0.0120 seconds. Added 2249 classes and 459 folders.
Display: HotReload took  0.2s.

But the .lib UE4Editor-permissionrepro-339.lib is not, hence (perhaps?):

LogClass: Could not find existing class test in package /Script/permissionrepro for HotReload, assuming new class

Would be great to get some UE staff on this. Even though modules seem to load into editor fine, not being able to output a .lib file has some dev consequences, e.g. breaks breakpoints in DebugGame builds

I am also experiencing this issue. Upgrade project from 4.14 to 14.15. Rebuild ends with no errors, If I hit build I get this error back again.

Hello!

We are also experiencing this issue in our project. We recently switched from 4.14.3 to 4.15 - at the first sight everything worked fine however today I wanted to do some change in native code and unfortunately build (hot reload) of the project always fails as it cannot create one .lib file. The rebuild always work.

I have tried everything that I have though about it is:

  • Install unreal again in different location,
  • Removed all Intermediate data/regenerated projects
  • Tested on second programmer computer - exactly the same error.
  • Tested on completely new project - exactly the same error.

Also we have tried to go back to 4.14.3 - it works fine here.

The compilation log is: http://pastebin.com/JXHMwsS0

Here you can see the full log from the UBT with -verbose specified: http://pastebin.com/1kSShx1Q

I’m seeing something very similar. If I close the editor, I can rebuild my project, but if I try a hot reload with the editor open, my project fails in the same way as above. Closing the editor for every compile crushes any semblance of a good workflow.

seems like there is an issue now: Unreal Engine Issues and Bug Tracker (UE-42205)
and corresponding bug report: Generating dll while UE4 editor is opened - Platform & Builds - Epic Developer Community Forums

I’ve also been experiencing this issue almost every time I make a change in source code, glad to see there is a bug report and issue flagged for it. Hopefully it is fixed in the next patch/hotfix.

It has been fixed in 4.15.1 yesterday!

Ah I seem to have been logged out of the launcher so didn’t notice the update, that’s awesome.