Error compiling UE4 on Fedora 24

Hi guys,

I’m having this error when I try to run “make” on the UE4 path

I already run Setup.sh and GenerateProjectsFiles.sh, and both finish successfully.

So, when I “make” the source, the console retrieve this:


[me@pc UnrealEngine]$ make
bash "/home/me/UnrealEngine"/Engine/Build/BatchFiles/Linux/Build.sh CrashReportClient Linux Shipping  

/usr/lib/mono/4.5/Microsoft.Common.targets: error : Access to the path "/home/me/UnrealEngine/Engine/Source/Programs/DotNETCommon/DotNETUtilities/obj/Development/DotNETUtilities.csproj.FilesWrittenAbsolute.txt" is denied.  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) <0x413ccb20 + 0x006ef> in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, System.String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) <0x413ccac0 + 0x0004f> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamWriter.CreateFile (System.String path, Boolean append, Boolean checkHost) <0x414c1200 + 0x0009f> in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize, Boolean checkHost) <0x414c1080 + 0x0006f> in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) <0x414c1030 + 0x00037> in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append) <0x414c0f50 + 0x00033> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
  at Microsoft.Build.Tasks.WriteLinesToFile.Execute () <0x414c0bd0 + 0x000ff> in <filename unknown>:0 


/usr/lib/mono/4.5/Microsoft.Common.targets: error : Access to the path "/home/me/UnrealEngine/Engine/Source/Programs/EnvVarsToXML/EnvVarsToXML/obj/Development/EnvVarsToXML.csproj.FilesWrittenAbsolute.txt" is denied.  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) <0x413ccb20 + 0x006ef> in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, System.String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) <0x413ccac0 + 0x0004f> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamWriter.CreateFile (System.String path, Boolean append, Boolean checkHost) <0x414c1200 + 0x0009f> in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize, Boolean checkHost) <0x414c1080 + 0x0006f> in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) <0x414c1030 + 0x00037> in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append) <0x414c0f50 + 0x00033> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
  at Microsoft.Build.Tasks.WriteLinesToFile.Execute () <0x414c0bd0 + 0x000ff> in <filename unknown>:0 
/usr/lib/mono/4.5/Microsoft.Common.targets: error : Access to the path "/home/me/UnrealEngine/Engine/Source/Programs/UnrealBuildTool/obj/Development/UnrealBuildTool.csproj.FilesWrittenAbsolute.txt" is denied.  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) <0x413ccb20 + 0x006ef> in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, System.String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) <0x413ccac0 + 0x0004f> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamWriter.CreateFile (System.String path, Boolean append, Boolean checkHost) <0x414c1200 + 0x0009f> in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize, Boolean checkHost) <0x414c1080 + 0x0006f> in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) <0x414c1030 + 0x00037> in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append) <0x414c0f50 + 0x00033> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
  at Microsoft.Build.Tasks.WriteLinesToFile.Execute () <0x414c0bd0 + 0x000ff> in <filename unknown>:0 

Failed to build to build tool (UnrealBuildTool)
Makefile:257: fallo en las instrucciones para el objetivo 'CrashReportClient-Linux-Shipping'
make: *** [CrashReportClient-Linux-Shipping] Error 1

I think “it’s a permission problem”, so I tried to run as root:


[root@pc UnrealEngine]# make
bash "/home/me/UnrealEngine"/Engine/Build/BatchFiles/Linux/Build.sh CrashReportClient Linux Shipping  
Building CrashReportClient...
Using clang version '3.8.0' (string), 3 (major), 8 (minor), 0 (patch)
Creating makefile for CrashReportClient (no existing makefile)
Performing full C++ include scan (no include cache file)
Building UnrealHeaderTool...
Using clang version '3.8.0' (string), 3 (major), 8 (minor), 0 (patch)
Target is up to date
Parsing headers for CrashReportClient
  Running UnrealHeaderTool CrashReportClient "/home/me/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Shipping/CrashReportClient.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -NoEnginePlugins
Refusing to run with the root privileges.
Error: Failed to generate code for CrashReportClient - error code: CrashOrAssert (3)
UnrealHeaderTool failed for target 'CrashReportClient' (platform: Linux, module info: /home/me/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Shipping/CrashReportClient.uhtmanifest).
Makefile:257: fallo en las instrucciones para el objetivo 'CrashReportClient-Linux-Shipping'
make: *** [CrashReportClient-Linux-Shipping] Error 3

So… what i have to chroot and chown properly to run make with my user?

Thanks

First: Make sure you are not out of disk space!

Second: Make sure you are not running any restrictive SELinux or similar systems.

Third: What are the permissions of these files? Specifically, if you “ls -l” on the files it tries to open, what does it say?


/home/me/UnrealEngine/Engine/Source/Programs/DotNETCommon/DotNETUtilities/obj/Development/DotNETUtilities.csproj.FilesWrittenAbsolute.txt


In general, to change the ownership to yourself on all files, run this (assuming you’re in your home directory):


sudo chown -R `whoami` UnrealEngine/

In general, to make sure that the owner has read/write permission on all files, run this:


chmod -R u+rw UnrealEngine/

Thanks !!!

I follow your steps and it works:

First: edited /etc/selinux/config…



# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#       targeted - Targeted processes are protected,
#       mls - Multi Level Security protection.
SELINUXTYPE=targeted


Then reboot.

Second: chown the UnrealEngine directory to me as you type.

Third: chmod the Unreal directory as you type.

And finally make.

Thanks!!!

—UPDATE—

I try the same in other fedora 24 pc with SELinux enforcing. It works, so the first step can be skipped.

I have same problem, and answer solved my problem, Thanks!!
(Xubuntu 16.04.3)