carla: Carla on ppc64le building of Unreal Engine fails

Hi everyone,

I am trying to build Carla for the ppc64le architecture on a POWER8 machine. The machine runs RHEL 7.5 and I am trying to build in a Docker container based on an NVIDIA CUDA Ubuntu 16.04 image. So far I have basically followed the documentation for building on Linux (https://carla.readthedocs.io/en/latest/how_to_build_on_linux/), but when compiling the Unreal Engine, I get two error messages I have not been able to fix, yet: When executing Setup.sh it exits successfully, but I get:
Register the engine installation... ./Setup.sh: line 45: ./UnrealVersionSelector-Linux-Shipping: cannot execute binary file: Exec format error
Looks to me like this binary is not compiled for ppc64le, but I don’t even know if it is important. When running GenerateProjectFiles.sh:
/usr/lib/mono/4.5/Microsoft.CSharp.targets: error : Compiler crashed with code: 139. Cannot open assembly './../../../Binaries/DotNET/UnrealBuildTool.exe': No such file or directory.
I have checked, the file UnrealBuildTool.exe is really not there. I suppose it should have been generated in a previous step.
I have found this pull request to the UE project https://github.com/EpicGames/UnrealEngine/pull/2585, but have not been able to successfully incorporate it.

Has anyone tried this before? Any experiences or ideas to share? Am I missing something?
Please ask, if I have left anything obscured. I have also posted this in the Unreal Engine forums: https://forums.unrealengine.com/development-discussion/engine-source-github/1611491-building-unreal-engine-on-ppc64le

Any help would be appreciated 😃

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

I’m porting Raptor Engineering’s port of UE4.20.3-release from the kb9vqf/UnrealEngine/tree/release branch.

You can track it’s progress in the edowson/UnrealEngine/tree/4.22-ppc64le branch.

Additional notes for setting up and installing Ubuntu-18.04 on a Power9 system like the Talos II Secure Workstation can be found in the edowson/raptor-talos-ii-power9-technote repo. It includes notes for setting NVIDIA Tesla GPU drivers and CUDA.

I still have to port several fixes for third party libraries to ppc64el.

In the meantime, you can prepare a Power9 host using the technotes, as well as install the following packages on your system, in order to get the a basic environment to compile the UE4.22.3 sources on ppc64le

Install common development packages:

sudo apt install --no-install-recommends -q -y \
python-dev \
python3-dev

sudo apt-get install --no-install-recommends -q -y \
autotools-dev \
autoconf \
automake \
cmake \
dos2unix \
libtool

sudo apt-get install --no-install-recommends -q -y \
libtool libc++-dev libc++abi-dev \
libglib2.0-dev libhdf5-dev libwebsockets-dev \
freeglut3-dev  libvulkan-dev wayland-protocols \
libegl1-mesa-dev libglu1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev mesa-common-dev

Install required libraries:

sudo apt-get install --no-install-recommends -q -y \
libfreetype6-dev \
libomp-dev

Install X11 development libraries:

sudo apt-get install --no-install-recommends -q -y \
libx11-dev \
libxcursor-dev \
libxext-dev \
libxi-dev \
libxt-dev \
libxv-dev \
libxinerama-dev \
libxkbcommon-dev \
libxrandr-dev \
libxrender-dev \
x11-xkb-utils \
x11proto-input-dev \
x11proto-randr-dev \
x11proto-scrnsaver-dev \
x11proto-xinerama-dev \
x11-xserver-utils \
xauth \
xdg-user-dirs \
xdg-utils \
xfonts-base \
xkb-data \

Install mono development tools:

# setup sources.list
sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update

sudo apt-get install --no-install-recommends -q -y \
mono-devel \
mono-dmcs

Build clang-8.0.1 on linux by running the Engine/Build/BatchFiles/Linux/Toolchain/BuildClangOnLinux.sh script.

@qhaas The current status is that I’m down to only a few more libraries need to be added to the Engine/Build/BatchFiles/Linux/BuildThirdParty.sh script and to fix some linker errors on ppc64le.

KissFFT, Steam API, WebRTC
Opus
libStrophe
FBX: some more to be disabled

Run this script to build the ppc64le toolchain. Engine/Build/BatchFiles/Linux/Toolchain/DockerOnWindows/build_linux_toolchain/build_linux_toolchain.sh

Just modify line 27 to build just one targets to save time:

TARGETS="powerpc64le-unknown-linux-gnu"

The BuildThirdParty.sh has detection logic for the clang toolchain. An earlier set of patches had that for the Linux/Setup.sh script, which I will have to reintroduce. This way, if a user runs Setup.sh, it will check for existence of the clang-8 toolchain and trigger a build. I’ll parameterize the build_linux_toolchain.sh script later, to accept an argument to over-ride the default target list, to save time during the build process.