Download

build process tries to get access out of the UE root directory

Hello anyone.

I’m working on automating the UE4 build for NixOS Linux. Here is the part of the story Fixing ue4 package · Issue #17162 · NixOS/nixpkgs · GitHub.

It more or less works now in a debug environment (from nix-shell), but fails if I run it from nix-builder daemon, which enforces a rather restricted environment.
The particular point I stumbled upon now is somethere inside GenerateProjectFiles.sh. First, I had to disable bash ./GenerateGDBInit.sh because it tried to modify ~/.gdb_init and it doesn’t make sense in a build environment. But now the generator fails with the strange exception:



Running system mono, version: 5
ERROR: Unhandled exception: System.UnauthorizedAccessException: Access to the path "/homeless-shelter" is denied.
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x0005e] in <e43a126f8091498b8305f3e930f5fe70>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in <e43a126f8091498b8305f3e930f5fe70>:0
at System.IO.DirectoryInfo.Create () [0x00000] in <e43a126f8091498b8305f3e930f5fe70>:0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.Create()
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00036] in <e43a126f8091498b8305f3e930f5fe70>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in <e43a126f8091498b8305f3e930f5fe70>:0
at System.IO.DirectoryInfo.Create () [0x00000] in <e43a126f8091498b8305f3e930f5fe70>:0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.Create()
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00036] in <e43a126f8091498b8305f3e930f5fe70>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in <e43a126f8091498b8305f3e930f5fe70>:0
at System.IO.DirectoryInfo.Create () [0x00000] in <e43a126f8091498b8305f3e930f5fe70>:0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.Create()
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00036] in <e43a126f8091498b8305f3e930f5fe70>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in <e43a126f8091498b8305f3e930f5fe70>:0
at Tools.DotNETCommon.DirectoryReference.CreateDirectory (Tools.DotNETCommon.DirectoryReference Location) [0x00000] in <8257f59e97d844daa4326663e38ed46e>:0
at UnrealBuildTool.XmlConfig.CreateDefaultConfigFile (Tools.DotNETCommon.FileReference Location) [0x00006] in <63f48abaca3c4cb58ea9e471d9e76918>:0
at UnrealBuildTool.XmlConfig.FindInputFiles () [0x0010a] in <63f48abaca3c4cb58ea9e471d9e76918>:0
at UnrealBuildTool.XmlConfig.ReadConfigFiles (Tools.DotNETCommon.FileReference OverrideCacheFile) [0x000d4] in <63f48abaca3c4cb58ea9e471d9e76918>:0
at UnrealBuildTool.UnrealBuildTool.Main (System.String] ArgumentsArray) [0x001d5] in <63f48abaca3c4cb58ea9e471d9e76918>:0
builder for '/nix/store/qmkshcdvfl166nmr0q4n8zgyj5lk6g21-ue4-4.26.0.drv' failed with exit code 6


What /homeless-shelter is supposed to be and why the builder tries to escape the source root directory? Is there any easy way to fix this? I’m afraid it’s not an option to add a stub directory to a build env.

1 Like