Difference between revisions of "Software/ThirdParty/Guides/Epic/UnrealEngine"

From RCS Wiki
Jump to navigation Jump to search
(Set category)
 
(28 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
=== Required OS dependencies ===
 
=== Required OS dependencies ===
  
  <nowiki>clang-4.0 dos2unix autotools-dev automake cmake libtool libc++-dev libc++abi-dev libx11-dev libxext-dev libegl1-mesa-dev mesa-common-dev libgl1-mesa-dev libgles2-mesa-dev libglib2.0-dev libglu1-mesa-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxrender-dev libvulkan-dev libxcursor-dev libxt-dev libxi-dev libxv-dev libwebsockets-dev freeglut3-dev wayland-protocols x11proto-input-dev x11proto-randr-dev x11proto-scrnsaver-dev x11proto-xinerama-dev</nowiki>
+
  <nowiki>clang-5.0 dos2unix autotools-dev automake cmake libtool libc++-dev libc++abi-dev libx11-dev libxext-dev libegl1-mesa-dev mesa-common-dev libgl1-mesa-dev libgles2-mesa-dev libglib2.0-dev libglu1-mesa-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxrender-dev libvulkan-dev libxcursor-dev libxt-dev libxi-dev libxv-dev libhdf5-dev libwebsockets-dev freeglut3-dev wayland-protocols x11proto-input-dev x11proto-randr-dev x11proto-scrnsaver-dev x11proto-xinerama-dev</nowiki>
  
 
=== Required OS setup ===
 
=== Required OS setup ===
  <nowiki>update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-4.0 100
+
  <nowiki>update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 100
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-4.0 100</nowiki>
+
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 100</nowiki>
  
=== Build Instructions ===
+
=== Required licenses ===
 +
 
 +
You will need to set up an account with Epic / GitHub and accept the EULA terms for access to the source code to continue.  If you cannot accept the terms but still want to play Unreal Tournament 4 on OpenPOWER, the only recourse available to you would be to contact Epic and ask for them to allow release of alpha builds for OpenPOWER.
 +
 
 +
To proceed, navigate to the [https://www.unrealengine.com/en-US/eulacheck Unreal Engine licensing page] and follow the instructions, then come back here once you have access to the source code.
  
<nowiki>=================================================================================
+
'''Important: All of the links below for source download will return 404 unless you are logged in to GitHub with the account that has source code access enabled.'''
PhysX-3.4
 
https://developer.nvidia.com/physx-source-github
 
  
Use POWER version from:
+
=== Current Status ===
https://github.com/kb9vqf/PhysX-3.4 , branch v3.4.0
+
* Editor seems to be working properly as of GIT commit 1057ebacec3649a44bf6b5617112a12d9b9e56b0
=================================================================================
+
* OpenGL mode appears to function correctly, Vulkan mode loads but triggers a failure in the radeonsi Vulkan stack when mousing over the right hand navigational view.
 +
* OpenGL can run into an overflow condition with very complex scenes; this manifests as scene lights turning off / back on somewhat randomly based on what is in view. This limitation of OpenGL is supposed to be fixed in Vulkan, but Vulkan support is still at a very early stage and loads to a black screen much of the time or outright crashes.
  
Build process:
+
=== Known Issues ===
 +
* AMD GPUs have known bugs as of Q3 2018.  While we expect these to be fixed over time, in the interim the kernel and mesa need to be patched to work properly<ref>https://bugs.freedesktop.org/show_bug.cgi?id=106258#c40</ref>.
 +
* LLVMPipe cannot be used because it only exposes Shader Model 4 interfaces, while UE4/UT4 require Shader Model 5 or higher (or even Vulkan) to support their advanced rendering features.
  
cd PhysX-3.4
+
=== Build Instructions ===
cd PhysX_3.4/Source/compiler/linux64
 
make
 
cd ../../../..
 
cd APEX_1.4/compiler/linux64
 
make
 
  
=================================================================================
+
<nowiki>=================================================================================
 
UE4
 
UE4
 
https://www.unrealengine.com/en-US/ue4-on-github
 
https://www.unrealengine.com/en-US/ue4-on-github
Line 34: Line 34:
 
Use POWER version from:
 
Use POWER version from:
 
https://github.com/kb9vqf/UnrealEngine
 
https://github.com/kb9vqf/UnrealEngine
=================================================================================
+
=================================================================================</nowiki>
  
Build process:
+
==== Dependencies ====
  
# Environment
+
<nowiki># Environment
 
export TARGET_ARCH=powerpc64le-unknown-linux-gnu
 
export TARGET_ARCH=powerpc64le-unknown-linux-gnu
 
export UE4_ROOT_DIR=$PWD
 
export UE4_ROOT_DIR=$PWD
Line 136: Line 136:
 
make
 
make
 
cd $UE4_ROOT_DIR
 
cd $UE4_ROOT_DIR
 +
mkdir -p ThirdParty/Linux/LibCxx/lib/Linux/${TARGET_ARCH}/
 +
cp -Rp /usr/lib/powerpc64le-linux-gnu/libc++.a ThirdParty/Linux/LibCxx/lib/Linux/${TARGET_ARCH}/
 +
cp -Rp /usr/lib/powerpc64le-linux-gnu/libc++abi.a ThirdParty/Linux/LibCxx/lib/Linux/${TARGET_ARCH}/
 +
cd $UE4_ROOT_DIR
 +
cd Engine/Source/ThirdParty/openexr/OpenEXR-1.7.1/ilmbase-1.0.3
 +
dos2unix -ascii -f *
 +
cp -Rp /usr/share/misc/config.guess config.guess
 +
chmod +x configure
 +
./configure
 +
make
 +
mkdir -p ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}
 +
cp -Rp Half/.libs/libHalf.a ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/
 +
cp -Rp Iex/.libs/libIex.a ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/
 +
cp -Rp IexMath/.libs/libIexMath.a ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/
 +
cp -Rp IlmThread/.libs/libIlmThread.a ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/
 +
cp -Rp Imath/.libs/libImath.a ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/
 +
rm -rf ../../Deploy/include/OpenEXR
 +
mkdir -p ../../Deploy/include/OpenEXR
 +
cp -Rp ../../Deploy/include/*.h ../../Deploy/include/OpenEXR
 +
cd $UE4_ROOT_DIR
 +
cd Engine/Source/ThirdParty/openexr/OpenEXR-1.7.1/openexr-1.7.1
 +
dos2unix -ascii -f *
 +
cp -Rp /usr/share/misc/config.guess config.guess
 +
chmod +x configure
 +
LDFLAGS="-L$PWD/../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/" ./configure --with-ilmbase-prefix=$PWD/../../Deploy
 +
make || true
 +
cp -Rp IlmImf/.libs/libIlmImf.a ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/
 +
cd $UE4_ROOT_DIR
 +
cd Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/alembic
 +
mkdir build
 +
cd build
 +
cmake -DCMAKE_CXX_FLAGS="-fPIC -I/usr/include/OpenEXR -I/usr/include/hdf5/serial" -DILMBASE_INCLUDE_DIR="${UE4_ROOT_DIR}/Engine/Source/ThirdParty/openexr/Deploy/include/" -DILMBASE_ROOT="${UE4_ROOT_DIR}/Engine/Source/ThirdParty/openexr/Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/" -DILMBASE_VERSION="1.0.3" -DALEMBIC_HDF5_LIBS="-lhdf5_serial -lhdf5_serial_hl" -DALEMBIC_ILMBASE_LIBS="-lHalf -lImath -lIex" -DUSE_TESTS=OFF -DALEMBIC_NO_BOOTSTRAP=1 -DALEMBIC_NO_OPENGL=1 -DALEMBIC_SHARED_LIBS=OFF ..
 +
make
 +
mkdir -p ../../AlembicDeploy/Linux/lib/${TARGET_ARCH}
 +
cp -Rp lib/Alembic/libAlembic.a ../../AlembicDeploy/Linux/lib/${TARGET_ARCH}/
 +
cd $UE4_ROOT_DIR
 +
cp -Rp Engine/Source/ThirdParty/openexr/Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/*.a Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/AlembicDeploy/Linux/lib/${TARGET_ARCH}/
 +
cp /usr/lib/powerpc64le-linux-gnu/hdf5/serial/libhdf5.a Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/AlembicDeploy/Linux/lib/${TARGET_ARCH}/hdf5.a
  
 
# Header fixup
 
# Header fixup
 
cd Engine/Source/ThirdParty/zlib/v1.2.8/include/Linux/
 
cd Engine/Source/ThirdParty/zlib/v1.2.8/include/Linux/
cp -Rp x86_64-unknown-linux-gnu powerpc64le-unknown-linux-gnu
+
cp -Rp x86_64-unknown-linux-gnu ${TARGET_ARCH}
 
cd $UE4_ROOT_DIR
 
cd $UE4_ROOT_DIR
 
cd Engine/Source/ThirdParty/OpenSSL/1_0_2h/include/Linux/
 
cd Engine/Source/ThirdParty/OpenSSL/1_0_2h/include/Linux/
cp -Rp x86_64-unknown-linux-gnu powerpc64le-unknown-linux-gnu
+
cp -Rp x86_64-unknown-linux-gnu ${TARGET_ARCH}
 
cd $UE4_ROOT_DIR
 
cd $UE4_ROOT_DIR
 
cd Engine/Source/ThirdParty/libcurl/7_48_0/include/Linux/
 
cd Engine/Source/ThirdParty/libcurl/7_48_0/include/Linux/
cp -Rp x86_64-unknown-linux-gnu powerpc64le-unknown-linux-gnu
+
cp -Rp x86_64-unknown-linux-gnu ${TARGET_ARCH}
 
cd $UE4_ROOT_DIR
 
cd $UE4_ROOT_DIR
 
cd Engine/Source/ThirdParty/libWebSockets/libwebsockets/include/Linux/
 
cd Engine/Source/ThirdParty/libWebSockets/libwebsockets/include/Linux/
cp -Rp x86_64-unknown-linux-gnu powerpc64le-unknown-linux-gnu
+
cp -Rp x86_64-unknown-linux-gnu ${TARGET_ARCH}
 
cd $UE4_ROOT_DIR
 
cd $UE4_ROOT_DIR
  
Line 156: Line 194:
  
 
# ICU fixup
 
# ICU fixup
cd Engine/Source/ThirdParty/ICU/icu4c-53_1/Linux/powerpc64le-unknown-linux-gnu
+
cd Engine/Source/ThirdParty/ICU/icu4c-53_1/Linux/${TARGET_ARCH}
 
mkdir lib
 
mkdir lib
 
mv *.a lib
 
mv *.a lib
Line 167: Line 205:
 
cd $UE4_ROOT_DIR
 
cd $UE4_ROOT_DIR
  
# NVIDIA PhysX install
+
# NVIDIA PhysX build
mkdir Engine/Source/ThirdParty/PhysX3/Lib/Linux/powerpc64le-unknown-linux-gnu
+
mkdir -p Engine/Binaries/ThirdParty/PhysX3/Linux/${TARGET_ARCH}/
cp -Rp <NVIDIA PhysX libraries>/PhysX_3.4/Bin/linux64/libPhysX3*.so Engine/Source/ThirdParty/PhysX3/Lib/Linux/powerpc64le-unknown-linux-gnu/
+
mkdir -p Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cp -Rp <NVIDIA PhysX libraries>/PxShared/bin/linux64/lib* Engine/Source/ThirdParty/PhysX3/Lib/Linux/powerpc64le-unknown-linux-gnu/
+
cd Engine/Source/ThirdParty/PhysX3/PhysX_3.4/Source/compiler/cmake/linux
cd Engine/Source/ThirdParty/PhysX3/Lib/Linux/powerpc64le-unknown-linux-gnu/
+
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug .
mv libPhysX3CharacterKinematicCHECKED_x64.so libPhysX3CharacterKinematicCHECKED.so
+
make
mv libPhysX3CharacterKinematicDEBUG_x64.so libPhysX3CharacterKinematicDEBUG.so
+
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Checked .
mv libPhysX3CharacterKinematicPROFILE_x64.so libPhysX3CharacterKinematicPROFILE.so
+
make
mv libPhysX3CharacterKinematic_x64.so libPhysX3CharacterKinematic.so
+
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Profile .
mv libPhysX3CHECKED_x64.so libPhysX3CHECKED.so
+
make
mv libPhysX3CommonCHECKED_x64.so libPhysX3CommonCHECKED.so
+
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release .
mv libPhysX3CommonDEBUG_x64.so libPhysX3CommonDEBUG.so
+
make
mv libPhysX3CommonPROFILE_x64.so libPhysX3CommonPROFILE.so
+
cp -Rp *.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
mv libPhysX3Common_x64.so libPhysX3Common.so
+
cp -Rp pxshared_bin/*.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
mv libPhysX3CookingCHECKED_x64.so libPhysX3CookingCHECKED.so
+
cp -Rp *.so /usr/lib/
mv libPhysX3CookingDEBUG_x64.so libPhysX3CookingDEBUG.so
+
cp -Rp physx_bin/pxshared_bin/*.so /usr/lib/
mv libPhysX3CookingPROFILE_x64.so libPhysX3CookingPROFILE.so
+
cd $UE4_ROOT_DIR
mv libPhysX3Cooking_x64.so libPhysX3Cooking.so
+
cd Engine/Source/ThirdParty/PhysX3/APEX_1.4/compiler/cmake/linux
mv libPhysX3DEBUG_x64.so libPhysX3DEBUG.so
+
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DPX_STATIC_LIBRARIES=1 -DAPEX_LINUX_SHARED_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPHYSX_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PhysX_3.4" -DAPEX_ENABLE_UE4=1 -DUSE_RESPONSE_FILES=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug .
mv libPhysX3GpuCHECKED_x64.so libPhysX3GpuCHECKED.so
+
make
mv libPhysX3GpuDEBUG_x64.so libPhysX3GpuDEBUG.so
+
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DPX_STATIC_LIBRARIES=1 -DAPEX_LINUX_SHARED_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPHYSX_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PhysX_3.4" -DAPEX_ENABLE_UE4=1 -DUSE_RESPONSE_FILES=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Checked .
mv libPhysX3GpuPROFILE_x64.so libPhysX3GpuPROFILE.so
+
make
mv libPhysX3Gpu_x64.so libPhysX3Gpu.so
+
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DPX_STATIC_LIBRARIES=1 -DAPEX_LINUX_SHARED_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPHYSX_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PhysX_3.4" -DAPEX_ENABLE_UE4=1 -DUSE_RESPONSE_FILES=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Profile .
mv libPhysX3PROFILE_x64.so libPhysX3PROFILE.so
+
make
mv libPhysX3_x64.so libPhysX3.so
+
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DPX_STATIC_LIBRARIES=1 -DAPEX_LINUX_SHARED_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPHYSX_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PhysX_3.4" -DAPEX_ENABLE_UE4=1 -DUSE_RESPONSE_FILES=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release .
 +
make
 +
cp -Rp *.a $UE4_ROOT_DIR/Engine/Binaries/ThirdParty/PhysX3/Linux/${TARGET_ARCH}/
 +
cp -Rp *.so $UE4_ROOT_DIR/Engine/Binaries/ThirdParty/PhysX3/Linux/${TARGET_ARCH}/
 +
cp -Rp physx_bin/pxshared_bin/*.so $UE4_ROOT_DIR/Engine/Binaries/ThirdParty/PhysX3/Linux/${TARGET_ARCH}/
 +
cp -Rp *.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
 +
cp -Rp *.so $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
 +
cp -Rp physx_bin/*.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
 +
cp -Rp physx_bin/pxshared_bin/*.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
 +
cp -Rp physx_bin/pxshared_bin/*.so $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
 +
cd $UE4_ROOT_DIR
 +
cd Engine/Source/ThirdParty/PhysX3/NvCloth/compiler/cmake/linux
 +
cmake -DPX_STATIC_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPXSHARED_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PxShared" -DCMAKE_BUILD_TYPE=Debug .
 +
make
 +
cmake -DPX_STATIC_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPXSHARED_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PxShared" -DCMAKE_BUILD_TYPE=Checked .
 +
make
 +
cmake -DPX_STATIC_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPXSHARED_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PxShared" -DCMAKE_BUILD_TYPE=Profile .
 +
make
 +
cmake -DPX_STATIC_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPXSHARED_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PxShared" -DCMAKE_BUILD_TYPE=Release .
 +
make
 +
cp -Rp *.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
 +
cd $UE4_ROOT_DIR
 +
 
 +
# Fixup NVIDIA PhysX
 +
cd $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
 +
mv libPhysX3CharacterKinematicCHECKED_x64.a libPhysX3CharacterKinematicCHECKED.a
 +
mv libPhysX3CharacterKinematicDEBUG_x64.a libPhysX3CharacterKinematicDEBUG.a
 +
mv libPhysX3CharacterKinematicPROFILE_x64.a libPhysX3CharacterKinematicPROFILE.a
 +
mv libPhysX3CharacterKinematic_x64.a libPhysX3CharacterKinematic.a
 +
mv libPhysX3CHECKED_x64.a libPhysX3CHECKED.a
 +
mv libPhysX3CommonCHECKED_x64.a libPhysX3CommonCHECKED.a
 +
mv libPhysX3CommonDEBUG_x64.a libPhysX3CommonDEBUG.a
 +
mv libPhysX3CommonPROFILE_x64.a libPhysX3CommonPROFILE.a
 +
mv libPhysX3Common_x64.a libPhysX3Common.a
 +
mv libPhysX3CookingCHECKED_x64.a libPhysX3CookingCHECKED.a
 +
mv libPhysX3CookingDEBUG_x64.a libPhysX3CookingDEBUG.a
 +
mv libPhysX3CookingPROFILE_x64.a libPhysX3CookingPROFILE.a
 +
mv libPhysX3Cooking_x64.a libPhysX3Cooking.a
 +
mv libPhysX3DEBUG_x64.a libPhysX3DEBUG.a
 +
mv libPhysX3GpuCHECKED_x64.a libPhysX3GpuCHECKED.a
 +
mv libPhysX3GpuDEBUG_x64.a libPhysX3GpuDEBUG.a
 +
mv libPhysX3GpuPROFILE_x64.a libPhysX3GpuPROFILE.a
 +
mv libPhysX3Gpu_x64.a libPhysX3Gpu.a
 +
mv libPhysX3PROFILE_x64.a libPhysX3PROFILE.a
 +
mv libPhysX3_x64.a libPhysX3.a
 
mv libPxFoundationCHECKED_x64.so libPxFoundationCHECKED.so
 
mv libPxFoundationCHECKED_x64.so libPxFoundationCHECKED.so
 
mv libPxFoundationDEBUG_x64.so libPxFoundationDEBUG.so
 
mv libPxFoundationDEBUG_x64.so libPxFoundationDEBUG.so
 
mv libPxFoundationPROFILE_x64.so libPxFoundationPROFILE.so
 
mv libPxFoundationPROFILE_x64.so libPxFoundationPROFILE.so
 
mv libPxFoundation_x64.so libPxFoundation.so
 
mv libPxFoundation_x64.so libPxFoundation.so
mv libPxPvdSDKCHECKED_x64.so libPxPvdSDKCHECKED.so
+
mv libPxPvdSDKCHECKED_x64.a libPxPvdSDKCHECKED.a
mv libPxPvdSDKDEBUG_x64.so libPxPvdSDKDEBUG.so
+
mv libPxPvdSDKDEBUG_x64.a libPxPvdSDKDEBUG.a
mv libPxPvdSDKPROFILE_x64.so libPxPvdSDKPROFILE.so
+
mv libPxPvdSDKPROFILE_x64.a libPxPvdSDKPROFILE.a
mv libPxPvdSDK_x64.so libPxPvdSDK.so
+
mv libPxPvdSDK_x64.a libPxPvdSDK.a
cd $UE4_ROOT_DIR
+
mv libLowLevelAABBCHECKED_x64.a libLowLevelAABBCHECKED.a
cp -Rp <NVIDIA PhysX libraries>/APEX_1.4/lib/linux64/lib* Engine/Source/ThirdParty/PhysX3/Lib/Linux/powerpc64le-unknown-linux-gnu/
+
mv libLowLevelAABBDEBUG_x64.a libLowLevelAABBDEBUG.a
cp -Rp <NVIDIA PhysX libraries>/PhysX_3.4/Lib/linux64/lib* Engine/Source/ThirdParty/PhysX3/Lib/Linux/powerpc64le-unknown-linux-gnu/
+
mv libLowLevelAABBPROFILE_x64.a libLowLevelAABBPROFILE.a
cp -Rp <NVIDIA PhysX libraries>/PxShared/lib/linux64/lib* Engine/Source/ThirdParty/PhysX3/Lib/Linux/powerpc64le-unknown-linux-gnu/
+
mv libLowLevelAABB_x64.a libLowLevelAABB.a
 +
mv libLowLevelCHECKED_x64.a libLowLevelCHECKED.a
 +
mv libLowLevelClothCHECKED_x64.a libLowLevelClothCHECKED.a
 +
mv libLowLevelClothDEBUG_x64.a libLowLevelClothDEBUG.a
 +
mv libLowLevelClothPROFILE_x64.a libLowLevelClothPROFILE.a
 +
mv libLowLevelCloth_x64.a libLowLevelCloth.a
 +
mv libLowLevelDEBUG_x64.a libLowLevelDEBUG.a
 +
mv libLowLevelDynamicsCHECKED_x64.a libLowLevelDynamicsCHECKED.a
 +
mv libLowLevelDynamicsDEBUG_x64.a libLowLevelDynamicsDEBUG.a
 +
mv libLowLevelDynamicsPROFILE_x64.a libLowLevelDynamicsPROFILE.a
 +
mv libLowLevelDynamics_x64.a libLowLevelDynamics.a
 +
mv libLowLevelParticlesCHECKED_x64.a libLowLevelParticlesCHECKED.a
 +
mv libLowLevelParticlesDEBUG_x64.a libLowLevelParticlesDEBUG.a
 +
mv libLowLevelParticlesPROFILE_x64.a libLowLevelParticlesPROFILE.a
 +
mv libLowLevelParticles_x64.a libLowLevelParticles.a
 +
mv libLowLevelPROFILE_x64.a libLowLevelPROFILE.a
 +
mv libLowLevel_x64.a libLowLevel.a
 +
mv libPhysX3ExtensionsCHECKED_x64.a libPhysX3ExtensionsCHECKED.a
 +
mv libPhysX3ExtensionsDEBUG_x64.a libPhysX3ExtensionsDEBUG.a
 +
mv libPhysX3ExtensionsPROFILE_x64.a libPhysX3ExtensionsPROFILE.a
 +
mv libPhysX3Extensions_x64.a libPhysX3Extensions.a
 +
mv libPhysX3VehicleCHECKED_x64.a libPhysX3VehicleCHECKED.a
 +
mv libPhysX3VehicleDEBUG_x64.a libPhysX3VehicleDEBUG.a
 +
mv libPhysX3VehiclePROFILE_x64.a libPhysX3VehiclePROFILE.a
 +
mv libPhysX3Vehicle_x64.a libPhysX3Vehicle.a
 +
mv libSceneQueryCHECKED_x64.a libSceneQueryCHECKED.a
 +
mv libSceneQueryDEBUG_x64.a libSceneQueryDEBUG.a
 +
mv libSceneQueryPROFILE_x64.a libSceneQueryPROFILE.a
 +
mv libSceneQuery_x64.a libSceneQuery.a
 +
mv libSimulationControllerCHECKED_x64.a libSimulationControllerCHECKED.a
 +
mv libSimulationControllerDEBUG_x64.a libSimulationControllerDEBUG.a
 +
mv libSimulationControllerPROFILE_x64.a libSimulationControllerPROFILE.a
 +
mv libSimulationController_x64.a libSimulationController.a
 +
mv libPsFastXmlCHECKED_x64.a libPsFastXmlCHECKED.a
 +
mv libPsFastXmlDEBUG_x64.a libPsFastXmlDEBUG.a
 +
mv libPsFastXmlPROFILE_x64.a libPsFastXmlPROFILE.a
 +
mv libPsFastXml_x64.a libPsFastXml.a
 +
mv libPxTaskCHECKED_x64.a libPxTaskCHECKED.a
 +
mv libPxTaskDEBUG_x64.a libPxTaskDEBUG.a
 +
mv libPxTaskPROFILE_x64.a libPxTaskPROFILE.a
 +
mv libPxTask_x64.a libPxTask.a
 +
cd $UE4_ROOT_DIR</nowiki>
 +
 
 +
==== Engine Build ====
 +
 
 +
<nowiki># Environment
 +
export TARGET_ARCH=powerpc64le-unknown-linux-gnu
 +
export UE4_ROOT_DIR=$PWD
  
 
# Build engine
 
# Build engine
make
+
make</nowiki>
 +
 
 +
=== References ===
 +
<references />
  
# Install NVIDIA PhysX shared libraries to host
+
[[Category:Ports]]
cp -Rp Engine/Source/ThirdParty/PhysX3/Lib/Linux/powerpc64le-unknown-linux-gnu/*.so /usr/lib/
 
cp -Rp <NVIDIA PhysX libraries>/PhysX_3.4/Bin/linux64/libPhysX3*.so /usr/lib/
 
cp -Rp <NVIDIA PhysX libraries>/PhysX_3.4/Lib/linux64/lib* /usr/lib/</nowiki>
 

Latest revision as of 01:31, 26 June 2022

Unreal Engine 4 on Debian Buster, OpenPOWER Edition

Required OS dependencies

clang-5.0 dos2unix autotools-dev automake cmake libtool libc++-dev libc++abi-dev libx11-dev libxext-dev libegl1-mesa-dev mesa-common-dev libgl1-mesa-dev libgles2-mesa-dev libglib2.0-dev libglu1-mesa-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxrender-dev libvulkan-dev libxcursor-dev libxt-dev libxi-dev libxv-dev libhdf5-dev libwebsockets-dev freeglut3-dev wayland-protocols x11proto-input-dev x11proto-randr-dev x11proto-scrnsaver-dev x11proto-xinerama-dev

Required OS setup

update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 100
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 100

Required licenses

You will need to set up an account with Epic / GitHub and accept the EULA terms for access to the source code to continue. If you cannot accept the terms but still want to play Unreal Tournament 4 on OpenPOWER, the only recourse available to you would be to contact Epic and ask for them to allow release of alpha builds for OpenPOWER.

To proceed, navigate to the Unreal Engine licensing page and follow the instructions, then come back here once you have access to the source code.

Important: All of the links below for source download will return 404 unless you are logged in to GitHub with the account that has source code access enabled.

Current Status

  • Editor seems to be working properly as of GIT commit 1057ebacec3649a44bf6b5617112a12d9b9e56b0
  • OpenGL mode appears to function correctly, Vulkan mode loads but triggers a failure in the radeonsi Vulkan stack when mousing over the right hand navigational view.
  • OpenGL can run into an overflow condition with very complex scenes; this manifests as scene lights turning off / back on somewhat randomly based on what is in view. This limitation of OpenGL is supposed to be fixed in Vulkan, but Vulkan support is still at a very early stage and loads to a black screen much of the time or outright crashes.

Known Issues

  • AMD GPUs have known bugs as of Q3 2018. While we expect these to be fixed over time, in the interim the kernel and mesa need to be patched to work properly[1].
  • LLVMPipe cannot be used because it only exposes Shader Model 4 interfaces, while UE4/UT4 require Shader Model 5 or higher (or even Vulkan) to support their advanced rendering features.

Build Instructions

=================================================================================
UE4
https://www.unrealengine.com/en-US/ue4-on-github

Use POWER version from:
https://github.com/kb9vqf/UnrealEngine
=================================================================================

Dependencies

# Environment
export TARGET_ARCH=powerpc64le-unknown-linux-gnu
export UE4_ROOT_DIR=$PWD

# Low level shared libraries and applications
cd Engine/Source/ThirdParty/elftoolchain/build/Linux/libelf
./build_native
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/elftoolchain/build/Linux/libdwarf
./build_native
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/Breakpad/build/Linux
./BuildBreakpad.sh
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/zlib
../libcurl/BUILD.EPIC.sh
cd OpenSSL/OpenSSL_1_0_2h
./config
TARGET_ARCH= make depend
TARGET_ARCH= make
mkdir ../../../OpenSSL/1_0_2h/lib/Linux/${TARGET_ARCH}
cp -Rp libcrypto.a ../../../OpenSSL/1_0_2h/lib/Linux/${TARGET_ARCH}/
cp -Rp libssl.a ../../../OpenSSL/1_0_2h/lib/Linux/${TARGET_ARCH}/
cd ../..
cd zlib/v1.2.8/build
TARGET_ARCH= ./Build.sh
mkdir ../lib/Linux/${TARGET_ARCH}
cp -Rp libz.a ../lib/Linux/${TARGET_ARCH}/
cp -Rp libz_fPIC.a ../lib/Linux/${TARGET_ARCH}/
cd ../..
cd libcurl/curl-7_48_0
./buildconf
LDFLAGS=-L${PWD}/../../OpenSSL/OpenSSL_1_0_2h LD_LIBRARY_PATH=${PWD}/../../OpenSSL/OpenSSL_1_0_2h ./configure --with-zlib=${PWD}/../../zlib/v1.2.8 --with-ssl=${PWD}/../../OpenSSL/OpenSSL_1_0_2h --prefix=$PWD --enable-static --enable-shared --enable-threaded-resolver --enable-hidden-symbols --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --disable-telnet --disable-tftp --disable-dict --disable-pop3 --disable-imap --disable-smtp --disable-gopher --disable-manual --disable-idn
LDFLAGS=-L${PWD}/../../OpenSSL/OpenSSL_1_0_2h LD_LIBRARY_PATH=${PWD}/../../OpenSSL/OpenSSL_1_0_2h make
mkdir ../../../libcurl/7_48_0/lib/Linux/${TARGET_ARCH}
cp -Rp lib/.libs/libcurl.a ../../../libcurl/7_48_0/lib/Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/FreeType2/FreeType2-2.6
cmake .
make
mkdir Lib/Linux/${TARGET_ARCH}
cp -Rp libfreetype.a Lib/Linux/${TARGET_ARCH}/
cp -Rp libfreetype_fPIC.a Lib/Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/libPNG/libPNG-1.5.2
cmake -DPNG_STATIC=ON .
make
mkdir lib/Linux/${TARGET_ARCH}
cp -Rp libpng15.a lib/Linux/${TARGET_ARCH}/libpng.a
cd $UE4_ROOT_DIR
cd Engine/Source/Programs/BreakpadSymbolEncoder
./BuildBreakpadSymbolEncoderLinux.sh
cp -Rp BreakpadSymbolEncoder ../../../Binaries/Linux/BreakpadSymbolEncoder
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/glslang/Build/Linux
./build.sh
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/MikkTSpace
cmake .
make
mkdir lib/Linux/${TARGET_ARCH}
cp -Rp libMikkTSpace.a lib/Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/CEF3/cef_binary_3.2623.1395.g3034273_linux64
cp -Rp ../cef_source/cef_paths2.gypi .
cd ../Build/Linux/
./build.sh
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/VHACD/build/Linux
mkdir ../../Lib/Linux/${TARGET_ARCH}/
make
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/libWebSockets/libwebsockets_src
cmake .
make
mkdir -p ../libwebsockets/lib/Linux/${TARGET_ARCH}/Release/
cp -Rp lib/libwebsockets.a ../libwebsockets/lib/Linux/${TARGET_ARCH}/Release/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/ForsythTriOO
cmake -DCMAKE_BUILD_TYPE=Release .
make
mkdir Lib/Linux/${TARGET_ARCH}/
cp -Rp libForsythTriOptimizer.a Lib/Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/Kiss_FFT/kiss_fft129
mkdir -p Lib/Linux/Release/${TARGET_ARCH}/
cmake .
make clean
make
cp -Rp ../Lib/Linux/Release/${TARGET_ARCH}/*.a Lib/Linux/Release/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/SpeedTree/SpeedTreeSDK-v7.0/Source/Core/Linux
mkdir -p ../../../Lib/Linux/${TARGET_ARCH}/Release
cp -Rp ../../../../Lib/Linux/${TARGET_ARCH}/Release/*.a ../../../Lib/Linux/${TARGET_ARCH}/Release/
cmake .
make clean
make
cd $UE4_ROOT_DIR
mkdir -p ThirdParty/Linux/LibCxx/lib/Linux/${TARGET_ARCH}/
cp -Rp /usr/lib/powerpc64le-linux-gnu/libc++.a ThirdParty/Linux/LibCxx/lib/Linux/${TARGET_ARCH}/
cp -Rp /usr/lib/powerpc64le-linux-gnu/libc++abi.a ThirdParty/Linux/LibCxx/lib/Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/openexr/OpenEXR-1.7.1/ilmbase-1.0.3
dos2unix -ascii -f *
cp -Rp /usr/share/misc/config.guess config.guess
chmod +x configure
./configure
make
mkdir -p ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}
cp -Rp Half/.libs/libHalf.a ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/
cp -Rp Iex/.libs/libIex.a ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/
cp -Rp IexMath/.libs/libIexMath.a ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/
cp -Rp IlmThread/.libs/libIlmThread.a ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/
cp -Rp Imath/.libs/libImath.a ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/
rm -rf ../../Deploy/include/OpenEXR
mkdir -p ../../Deploy/include/OpenEXR
cp -Rp ../../Deploy/include/*.h ../../Deploy/include/OpenEXR
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/openexr/OpenEXR-1.7.1/openexr-1.7.1
dos2unix -ascii -f *
cp -Rp /usr/share/misc/config.guess config.guess
chmod +x configure
LDFLAGS="-L$PWD/../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/" ./configure --with-ilmbase-prefix=$PWD/../../Deploy
make || true
cp -Rp IlmImf/.libs/libIlmImf.a ../../Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/alembic
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS="-fPIC -I/usr/include/OpenEXR -I/usr/include/hdf5/serial" -DILMBASE_INCLUDE_DIR="${UE4_ROOT_DIR}/Engine/Source/ThirdParty/openexr/Deploy/include/" -DILMBASE_ROOT="${UE4_ROOT_DIR}/Engine/Source/ThirdParty/openexr/Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/" -DILMBASE_VERSION="1.0.3" -DALEMBIC_HDF5_LIBS="-lhdf5_serial -lhdf5_serial_hl" -DALEMBIC_ILMBASE_LIBS="-lHalf -lImath -lIex" -DUSE_TESTS=OFF -DALEMBIC_NO_BOOTSTRAP=1 -DALEMBIC_NO_OPENGL=1 -DALEMBIC_SHARED_LIBS=OFF ..
make
mkdir -p ../../AlembicDeploy/Linux/lib/${TARGET_ARCH}
cp -Rp lib/Alembic/libAlembic.a ../../AlembicDeploy/Linux/lib/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cp -Rp Engine/Source/ThirdParty/openexr/Deploy/lib/Linux/StaticRelease/${TARGET_ARCH}/*.a Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/AlembicDeploy/Linux/lib/${TARGET_ARCH}/
cp /usr/lib/powerpc64le-linux-gnu/hdf5/serial/libhdf5.a Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/AlembicDeploy/Linux/lib/${TARGET_ARCH}/hdf5.a

# Header fixup
cd Engine/Source/ThirdParty/zlib/v1.2.8/include/Linux/
cp -Rp x86_64-unknown-linux-gnu ${TARGET_ARCH}
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/OpenSSL/1_0_2h/include/Linux/
cp -Rp x86_64-unknown-linux-gnu ${TARGET_ARCH}
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/libcurl/7_48_0/include/Linux/
cp -Rp x86_64-unknown-linux-gnu ${TARGET_ARCH}
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/libWebSockets/libwebsockets/include/Linux/
cp -Rp x86_64-unknown-linux-gnu ${TARGET_ARCH}
cd $UE4_ROOT_DIR

# Mid level shared libraries and general setup
./Setup.sh
./GenerateProjectFiles.sh

# ICU fixup
cd Engine/Source/ThirdParty/ICU/icu4c-53_1/Linux/${TARGET_ARCH}
mkdir lib
mv *.a lib
cd $UE4_ROOT_DIR

# Opus fixup
cd Engine/Source/ThirdParty/libOpus/opus-1.1
mkdir Linux/${TARGET_ARCH}
cp -Rp .libs/libopus.a Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR

# NVIDIA PhysX build
mkdir -p Engine/Binaries/ThirdParty/PhysX3/Linux/${TARGET_ARCH}/
mkdir -p Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cd Engine/Source/ThirdParty/PhysX3/PhysX_3.4/Source/compiler/cmake/linux
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug .
make
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Checked .
make
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Profile .
make
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release .
make
cp -Rp *.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cp -Rp pxshared_bin/*.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cp -Rp *.so /usr/lib/
cp -Rp physx_bin/pxshared_bin/*.so /usr/lib/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/PhysX3/APEX_1.4/compiler/cmake/linux
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DPX_STATIC_LIBRARIES=1 -DAPEX_LINUX_SHARED_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPHYSX_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PhysX_3.4" -DAPEX_ENABLE_UE4=1 -DUSE_RESPONSE_FILES=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug .
make
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DPX_STATIC_LIBRARIES=1 -DAPEX_LINUX_SHARED_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPHYSX_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PhysX_3.4" -DAPEX_ENABLE_UE4=1 -DUSE_RESPONSE_FILES=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Checked .
make
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DPX_STATIC_LIBRARIES=1 -DAPEX_LINUX_SHARED_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPHYSX_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PhysX_3.4" -DAPEX_ENABLE_UE4=1 -DUSE_RESPONSE_FILES=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Profile .
make
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DPX_STATIC_LIBRARIES=1 -DAPEX_LINUX_SHARED_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPHYSX_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PhysX_3.4" -DAPEX_ENABLE_UE4=1 -DUSE_RESPONSE_FILES=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release .
make
cp -Rp *.a $UE4_ROOT_DIR/Engine/Binaries/ThirdParty/PhysX3/Linux/${TARGET_ARCH}/
cp -Rp *.so $UE4_ROOT_DIR/Engine/Binaries/ThirdParty/PhysX3/Linux/${TARGET_ARCH}/
cp -Rp physx_bin/pxshared_bin/*.so $UE4_ROOT_DIR/Engine/Binaries/ThirdParty/PhysX3/Linux/${TARGET_ARCH}/
cp -Rp *.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cp -Rp *.so $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cp -Rp physx_bin/*.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cp -Rp physx_bin/pxshared_bin/*.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cp -Rp physx_bin/pxshared_bin/*.so $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/PhysX3/NvCloth/compiler/cmake/linux
cmake -DPX_STATIC_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPXSHARED_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PxShared" -DCMAKE_BUILD_TYPE=Debug .
make
cmake -DPX_STATIC_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPXSHARED_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PxShared" -DCMAKE_BUILD_TYPE=Checked .
make
cmake -DPX_STATIC_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPXSHARED_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PxShared" -DCMAKE_BUILD_TYPE=Profile .
make
cmake -DPX_STATIC_LIBRARIES=1 -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPXSHARED_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PxShared" -DCMAKE_BUILD_TYPE=Release .
make
cp -Rp *.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR

# Fixup NVIDIA PhysX
cd $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
mv libPhysX3CharacterKinematicCHECKED_x64.a libPhysX3CharacterKinematicCHECKED.a
mv libPhysX3CharacterKinematicDEBUG_x64.a libPhysX3CharacterKinematicDEBUG.a
mv libPhysX3CharacterKinematicPROFILE_x64.a libPhysX3CharacterKinematicPROFILE.a
mv libPhysX3CharacterKinematic_x64.a libPhysX3CharacterKinematic.a
mv libPhysX3CHECKED_x64.a libPhysX3CHECKED.a
mv libPhysX3CommonCHECKED_x64.a libPhysX3CommonCHECKED.a
mv libPhysX3CommonDEBUG_x64.a libPhysX3CommonDEBUG.a
mv libPhysX3CommonPROFILE_x64.a libPhysX3CommonPROFILE.a
mv libPhysX3Common_x64.a libPhysX3Common.a
mv libPhysX3CookingCHECKED_x64.a libPhysX3CookingCHECKED.a
mv libPhysX3CookingDEBUG_x64.a libPhysX3CookingDEBUG.a
mv libPhysX3CookingPROFILE_x64.a libPhysX3CookingPROFILE.a
mv libPhysX3Cooking_x64.a libPhysX3Cooking.a
mv libPhysX3DEBUG_x64.a libPhysX3DEBUG.a
mv libPhysX3GpuCHECKED_x64.a libPhysX3GpuCHECKED.a
mv libPhysX3GpuDEBUG_x64.a libPhysX3GpuDEBUG.a
mv libPhysX3GpuPROFILE_x64.a libPhysX3GpuPROFILE.a
mv libPhysX3Gpu_x64.a libPhysX3Gpu.a
mv libPhysX3PROFILE_x64.a libPhysX3PROFILE.a
mv libPhysX3_x64.a libPhysX3.a
mv libPxFoundationCHECKED_x64.so libPxFoundationCHECKED.so
mv libPxFoundationDEBUG_x64.so libPxFoundationDEBUG.so
mv libPxFoundationPROFILE_x64.so libPxFoundationPROFILE.so
mv libPxFoundation_x64.so libPxFoundation.so
mv libPxPvdSDKCHECKED_x64.a libPxPvdSDKCHECKED.a
mv libPxPvdSDKDEBUG_x64.a libPxPvdSDKDEBUG.a
mv libPxPvdSDKPROFILE_x64.a libPxPvdSDKPROFILE.a
mv libPxPvdSDK_x64.a libPxPvdSDK.a
mv libLowLevelAABBCHECKED_x64.a libLowLevelAABBCHECKED.a
mv libLowLevelAABBDEBUG_x64.a libLowLevelAABBDEBUG.a
mv libLowLevelAABBPROFILE_x64.a libLowLevelAABBPROFILE.a
mv libLowLevelAABB_x64.a libLowLevelAABB.a
mv libLowLevelCHECKED_x64.a libLowLevelCHECKED.a
mv libLowLevelClothCHECKED_x64.a libLowLevelClothCHECKED.a
mv libLowLevelClothDEBUG_x64.a libLowLevelClothDEBUG.a
mv libLowLevelClothPROFILE_x64.a libLowLevelClothPROFILE.a
mv libLowLevelCloth_x64.a libLowLevelCloth.a
mv libLowLevelDEBUG_x64.a libLowLevelDEBUG.a
mv libLowLevelDynamicsCHECKED_x64.a libLowLevelDynamicsCHECKED.a
mv libLowLevelDynamicsDEBUG_x64.a libLowLevelDynamicsDEBUG.a
mv libLowLevelDynamicsPROFILE_x64.a libLowLevelDynamicsPROFILE.a
mv libLowLevelDynamics_x64.a libLowLevelDynamics.a
mv libLowLevelParticlesCHECKED_x64.a libLowLevelParticlesCHECKED.a
mv libLowLevelParticlesDEBUG_x64.a libLowLevelParticlesDEBUG.a
mv libLowLevelParticlesPROFILE_x64.a libLowLevelParticlesPROFILE.a
mv libLowLevelParticles_x64.a libLowLevelParticles.a
mv libLowLevelPROFILE_x64.a libLowLevelPROFILE.a
mv libLowLevel_x64.a libLowLevel.a
mv libPhysX3ExtensionsCHECKED_x64.a libPhysX3ExtensionsCHECKED.a
mv libPhysX3ExtensionsDEBUG_x64.a libPhysX3ExtensionsDEBUG.a
mv libPhysX3ExtensionsPROFILE_x64.a libPhysX3ExtensionsPROFILE.a
mv libPhysX3Extensions_x64.a libPhysX3Extensions.a
mv libPhysX3VehicleCHECKED_x64.a libPhysX3VehicleCHECKED.a
mv libPhysX3VehicleDEBUG_x64.a libPhysX3VehicleDEBUG.a
mv libPhysX3VehiclePROFILE_x64.a libPhysX3VehiclePROFILE.a
mv libPhysX3Vehicle_x64.a libPhysX3Vehicle.a
mv libSceneQueryCHECKED_x64.a libSceneQueryCHECKED.a
mv libSceneQueryDEBUG_x64.a libSceneQueryDEBUG.a
mv libSceneQueryPROFILE_x64.a libSceneQueryPROFILE.a
mv libSceneQuery_x64.a libSceneQuery.a
mv libSimulationControllerCHECKED_x64.a libSimulationControllerCHECKED.a
mv libSimulationControllerDEBUG_x64.a libSimulationControllerDEBUG.a
mv libSimulationControllerPROFILE_x64.a libSimulationControllerPROFILE.a
mv libSimulationController_x64.a libSimulationController.a
mv libPsFastXmlCHECKED_x64.a libPsFastXmlCHECKED.a
mv libPsFastXmlDEBUG_x64.a libPsFastXmlDEBUG.a
mv libPsFastXmlPROFILE_x64.a libPsFastXmlPROFILE.a
mv libPsFastXml_x64.a libPsFastXml.a
mv libPxTaskCHECKED_x64.a libPxTaskCHECKED.a
mv libPxTaskDEBUG_x64.a libPxTaskDEBUG.a
mv libPxTaskPROFILE_x64.a libPxTaskPROFILE.a
mv libPxTask_x64.a libPxTask.a
cd $UE4_ROOT_DIR

Engine Build

# Environment
export TARGET_ARCH=powerpc64le-unknown-linux-gnu
export UE4_ROOT_DIR=$PWD

# Build engine
make

References