Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xbuild: command not found in RunUAT.sh on UE-4.20 #204

Closed
slonopotamus opened this issue Sep 14, 2021 · 5 comments
Closed

xbuild: command not found in RunUAT.sh on UE-4.20 #204

slonopotamus opened this issue Sep 14, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@slonopotamus
Copy link
Collaborator

slonopotamus commented Sep 14, 2021

Output of the ue4-docker info command:

$ ue4-docker info
ue4-docker version:         0.0.90 (latest available version is 0.0.90)
Operating system:           Linux (Gentoo/Linux, 5.10.52-gentoo-x86_64)
Docker daemon version:      20.10.7
NVIDIA Docker supported:    No
Maximum image size:         No limit detected
Available disk space:       572.47 GiB
Total system memory:        31.32 GiB physical, 32 GiB virtual
Number of processors:       8 physical, 16 logical

Additional details:

  • Are you accessing the network through a proxy server? No

Way to reproduce:

  1. Linux
  2. ue4-docker build 4.20.3 --no-engine --exclude ddc --exclude debug --exclude templates
  3. ue4-docker test 4.20.3

Expected: test passes

Actual:

$ ue4-docker test 4.20.3
[ue4-docker test] Starting a container using the "adamrehn/ue4-full:4.20.3" image...
[ue4-docker test] Running test "build-and-package.py"...
[RUN COMMAND] ['git', 'clone', '--depth=1', 'https://gitlab.com/ue4-test-projects/4.20/BasicCxx.git', '/tmp/tmp3kek3inc/BasicCxx'] {}
Cloning into '/tmp/tmp3kek3inc/BasicCxx'...
[RUN COMMAND] ['ue4', 'package', 'Shipping'] {'cwd': '/tmp/tmp3kek3inc/BasicCxx'}

Running AutomationTool...

AutomationTool exists: Deleting
Deleting all AutomationScript dlls
Compiling AutomationTool with xbuild
xbuild Source/Programs/AutomationTool/AutomationTool.csproj /p:Configuration=Development /p:Platform=AnyCPU /verbosity:quiet /nologo /p:TargetFrameworkProfile=
/home/ue4/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh: line 79: xbuild: command not found
RunUAT ERROR: AutomationTool failed to compile.
Using user-specified engine root: /home/ue4/UnrealEngine
Traceback (most recent call last):
  File "/usr/local/bin/ue4", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/ue4cli/cli.py", line 222, in main
    SUPPORTED_COMMANDS[command]['action'](manager, args)
  File "/usr/local/lib/python3.6/dist-packages/ue4cli/cli.py", line 94, in <lambda>
    'action': lambda m, args: m.packageDescriptor(os.getcwd(), args),
  File "/usr/local/lib/python3.6/dist-packages/ue4cli/UnrealManagerBase.py", line 454, in packageDescriptor
    self.packageProject(dir, args[0] if len(args) > 0 else 'Shipping', args[1:])
  File "/usr/local/lib/python3.6/dist-packages/ue4cli/UnrealManagerBase.py", line 429, in packageProject
    ] + extraArgs)
  File "/usr/local/lib/python3.6/dist-packages/ue4cli/UnrealManagerBase.py", line 371, in runUAT
    Utility.run([self.getRunUATScript()] + args, cwd=self.getEngineRoot(), raiseOnError=True)
  File "/usr/local/lib/python3.6/dist-packages/ue4cli/Utility.py", line 145, in run
    raise Exception('child process ' + str(command) + ' failed with exit code ' + str(returncode))
Exception: child process ['/home/ue4/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh', 'BuildCookRun', '-utf8output', '-clientconfig=Shipping', '-serverconfig=Shipping', '-project=/tmp/tmp3kek3inc/BasicCxx/BasicCxx.uproject', '-noP4', '-cook', '-build', '-stage', '-prereqs', '-pak', '-archive', '-platform=Linux', '-nodebuginfo', '-allmaps', '-archivedirectory=/tmp/tmp3kek3inc/BasicCxx/dist'] failed with exit code 1
Using user-specified engine root: /home/ue4/UnrealEngine
Traceback (most recent call last):
  File "/tmp/workspace/build-and-package.py", line 22, in <module>
    run(["ue4", "package", "Shipping"], cwd=projectDir)
  File "/tmp/workspace/build-and-package.py", line 8, in run
    return subprocess.run(command, check=True, **kwargs)
  File "/usr/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ue4', 'package', 'Shipping']' returned non-zero exit status 1.
[ue4-docker test] Error: test "build-and-package.py" failed!

Initial analysis:

  1. We don't have system mono installed. It is installed by Setup.sh, but we only run that in ue4-source.
  2. RunUAT.sh in 4.20 is missing a call to SetupMono.sh that was added in 4.21, so it doesn't use bundled version of Mono
@slonopotamus slonopotamus added the bug Something isn't working label Sep 14, 2021
@slonopotamus
Copy link
Collaborator Author

slonopotamus commented Sep 14, 2021

@meetakshay99
Copy link

Yes, adding the call for SetupMono.sh fixes the problem. The error of xbuild: command not found does not occur anymore.

@adamrehn
Copy link
Owner

@slonopotamus I reckon the most appropriate place for this would be in patch-broken-releases.py, since it's where we currently implement version-specific patching logic.

@slonopotamus
Copy link
Collaborator Author

slonopotamus commented Mar 26, 2022

I am actually not sure that ad-hoc strings replacement in random engine files is a good idea in a long-term. A kinda better solution would be to just keep those changes in UE fork. We should not try to fix each and every engine bug and such approach (with a fork) makes it much easier to see which changes are relevant to what engine versions.

@slonopotamus
Copy link
Collaborator Author

Given that we're going to drop 4.20 support (#296 (comment)) and there is a workaround (patch your engine fork), I want to close this as WONTFIX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants