Error when building: -waitmutex" exited with code 5 . Please verify that you have sufficient rights to run this command

I’m having a strange problem and Im not sure how to proceed. When I try building my project in Visual Studio, I get the following error:

Error MSB3075: The command E:\Unreal Engine - Git\Engine\Build\BatchFiles\Rebuild.bat MyGameEditor Win64 Development E:\Unreal Harddrive\MyGame\MyGame.uproject     MyGame	C:\ProgramFiles(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets

When I try to run Rebuild.bat by itself (with commands) I get:

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>E:\Unreal Engine - Git\Engine\Build\BatchFiles\Build.bat E
picSpaceOnlineEditor Win64 Development E:\MyGame\MyGame.uproject -waitmutex
Creating makefile for MyGameEditor (no existing makefile)
Performing full C++ include scan (no include cache file)
Building UnrealHeaderTool...
Target is up to date
Parsing headers for MyGameEditor
  Running UnrealHeaderTool E:\MyGame\MyGame.uproject E:\MyGame\Intermediate\Build\Win64\MyGameEditor\Development\UnrealHeader
Tool.manifest -LogCmds=loginit warning, logexit warning, logdatabase error -Unattended -WarningsAsErrors
E:/MyGame/Source/MyGame/ProjectVersionBlueprint.h(17) : LogCompile:Error: Remapping old metadata key FriendlyName to new key DisplayName, please update the declaration.
Error: Failed to generate code for MyGameEditor - error code: OtherCompilationError (5)
UnrealHeaderTool failed for target MyGameEditor (platform: Win64, module info: E:\MyGame\Intermediate\Build\Win64\MyGameEditor\Development\UnrealHeaderTool.manifest).

C:\Windows\System32>

Hey Taurian-

The error appears to be referring to line 17 of the ProjectVersionBlueprint.h file. If you see “FriendlyName” on that line can you instead change it to “DisplayName” (or the other way around if you see DisplayName).

Cheers

I saw that, and I could’ve sworn I fixed it. I double checked and yeah… it still wasn’t changed. Incredible.

Thanks,

T

I met the same problem,who can solve it?

Hey Jackzhou_beijing-

There is no solution I can provide without more information about your exact error. Please post the output from your compile attempt to help.

Last night I try to solve this problem and found that though the VS2105 gave the error “Error MSB3075: The command…have sufficient rights to run this command…” , but the actual question was not the “rights problem”.

when I run the command in windows CMD line, the output prompt that some .h file had problem. so the “Error MSB3075:…” may be a compile problem, because the compile failed ,some binary file was not generated , the command could not find them.

Unfortunately that is not enough information for me to understand why the compile is failing. Please post a screenshot of the VS output tab to show what is being reported as the cause for the compile failure.

I got this error too today. Can anybody help me?

Hey SillyMind69-

The OtherCompilationError(5) line above indicates an error without a unique error code. You can find more information about the error if you switch to the Output tab. You should find the OtherCompilationError(5) line there as well and the actual error should be stated a line or two above that.

Well, the errors were all pointing to the use of ‘::’ in my .cpp file. (All of them being added by the engine)

So I checked my header and for some reason the comment from the first line was ‘Fill //…’ Instead of ‘//Fill…’

It is working now, thank you!

Nice tip thanks.

Hi - not sure if this will help, but I had the same error, with additional errors saying that VS17 cannot get access to certain files. I use Perforce, so I unlocked everything - still no joy. I then went to the file it said it cannot access and Unlocked it (Right-Click file, and uncheck ReadOnly). Still no joy. I then went to the Root folder (the project name folder) and Unchecked -Only, and selected to Uncheck all children folders and files. It worked after that. Not sure why but it seems to be ok now.

If this is a bad way, or just crappy way to fix it, then I would love to hear the correct way to fix it.
Thanks

Hi there,
I have had the same problem when I wrote

  1. private:
  2. UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Enemy")
  3. bool EnemyDirection;

but when I changed the access modifier from private to public the error was lost.
That works for me, so try it

Hi there,

You don’t have to make your properties public to able to expose them to blueprints. You can encapsulate your data in c++ and still expose them to blueprints by using the meta specifier AllowPrivateAccess on these private variables.

 private:

 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(AllowPrivateAccess = true))
 bool EnemyDirection;

The above code will compile without any issues.

I’m using UE 4.18 and in the list of available meta properties, there is no AllowPrivateAccess property (you can check it out on your own: docs/latest#Valid_Meta_Properties).
But I found this meta there (docs/latest/API)
So, after I adding it to my code it still works well.
Thanks.
But I want to stress on one of the problems which could invoke the error 5.

This problem was fixed in my case by using UPROPERTY(EditAnywhere) in place of UPROPERTY(VisibleDefaultOnly, Category = Mesh).
Still don’t know why.

In my case, was fixed by enabling IncrediBuild services (or theoretically they can be disabled or deleted, with Manage Extensions window) .

I just came across the same issue. This started to happen to me after I did an upgrade on Visual Studio 2017 to version 15.7.2. I was able to solve this problem by rebuilding the solution.

Right-click in the solution and click on Rebuild or type Ctrl+Alt+F7.

如果上面几个答案没用的话,试试我这个。

If those answers are useless,Try mine.

这个问题我花了大半天时间来搜索解决方案。终于找到了有用的东西

I spent almost half day to search for the solution to this.Finally, I found something useful.

可以参考一下上面两个问题的答案,其实两个都一样。

You can refer these two links above. Both the same, either one will be fine.

为了方便你们,我直接复制了解决方案:

For your convenient, I copyed it :

This is a known issue with changing to 4.12 and using tasks. It can be resolved by simply adding “GameplayTasks” to the PublicDependencyModuleNames section inside your ‘ProjectName’.Build.cs For example:
PublicDependencyModuleNames.AddRange(new string[] { “Core”, “CoreUObject”, “Engine”, “InputCore”, “AIModule”, “GameplayTasks” });

在YourProjectName.Build.cs里的PublicDependencyModuleNames加上GameplayTasks就行。

Add GameplayTasks to PublicDependencyModuleNames of the YourProjectName.Build.cs file~.

SIMPLE ANSWER: You most likely declared UPROPERTY() within your header file as private or forgot to make it public since classes members are private by default (hot tip). This I found to be the main issue for most people getting this compiler error.

SIMPLE SOLUTION: Declare public: before writing out your UPROPERTY() or use the “AllowPrivateAccess” property such shown in the example below.

Ex. UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(AllowPrivateAccess = true))

I hope this helps. Give thumps up if it did.