Unable to install Unreal engine using AUR

Hello Manjaro Forums,

I am facing errors installing the unreal engine using the pamac aur provided.

I have set up a SSH key and paired it up with my github account as well as linking my github account to my epic games account on firefox. However, after doing all this the error remains unchanged. I might have also edited the build text file inadvertently, and I don’t know how to ‘revert’ it back.

Below is the error that I get.

Preparing...
Cloning unreal-engine build files...
Checking unreal-engine dependencies...
Resolving dependencies...
Checking inter-conflicts...

Building unreal-engine...
==> Making package: unreal-engine 4.26.2-6 (Friday 16 July 2021 11:47:51 AM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found com.unrealengine.UE4Editor.desktop
  -> Found ccache_executor.patch
  -> Found stop_mono_clone.patch
  -> Found clang_path_fix.patch
==> Validating source files with sha256sums...
    com.unrealengine.UE4Editor.desktop ... Passed
    ccache_executor.patch ... Passed
    stop_mono_clone.patch ... Passed
    clang_path_fix.patch ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
==> Starting prepare()...
==> ERROR: You must register at unrealengine.com and link your github account to access this private repo. See the wiki for more info: https://wiki.archlinux.org/index.php/Unreal_Engine_4
Failed to build unreal-engine

Below is a copy paste of the build file

# Maintainer: Dylan Ferris <dylan@psilly.com>
# Maintainer: Michael Lojkovic <mikelojkovic@gmail.com>
# Maintainer: Shatur95 <genaloner@gmail.com>

# The source is about 200 MiB, with an extra ~11 GiB of dependencies downloaded in Setup.sh, and may take several hours to compile.
# If you want to turn on additional patches there are switches below.
pkgname=unreal-engine
pkgver=4.26.2
pkgrel=6
pkgdesc='A 3D game engine by Epic Games which can be used non-commercially for free.'
arch=(x86_64)
url=https://www.unrealengine.com/
makedepends=(git openssh)
depends=(icu sdl2 python lld xdg-user-dirs dos2unix)
optdepends=('qt5-base: qmake build system for projects'
            'cmake: build system for projects'
            'qtcreator: IDE for projects'
            'codelite: IDE for projects'
            'kdevelop: IDE for projects'
            'clion: IDE for projects')
license=(custom:UnrealEngine)
source=(com.unrealengine.UE4Editor.desktop
        ccache_executor.patch
        stop_mono_clone.patch
        clang_path_fix.patch)
sha256sums=('15e9f9d8dc8bd8513f6a5eca990e2aab21fd38724ad57d213b06a6610a951d58'
            '33982486f7fafac35a33dfa37c85cfba8543aa78b5fe13c395d9cccf691ef4b3'
            'aa9eb83c9f58c539d3cd43e919a4ebd6714c0aa2d32eb9b320049cf04dd01587'
            '960c5a100e0c3732f3c73fb645d3989d39acf4576d74615bbef38ebeee008b90')
options=(!strip staticlibs) # Package is 3 Gib smaller with "strip" but it takes a long time and generates many warnings

_ccache_support=false # Patches for ccache. More optimizations might be needed.
_system_mono=false # Uses System mono for unreal. Must set UE_USE_SYSTEM_MONO in your environment for it to work after install.
_install_dir="opt/$pkgname" # Default engine installation directory. Can be useful if you do not have a lot of space in /opt directory.

if [[ $_ccache_support == true ]]
then
  depends+=(ccache)
fi

if [[ $_system_mono == true ]]
then
  depends+=(mono mono-msbuild)
fi

prepare() {
  # Check access to the repository
  if ! git ls-remote git@github.com:EpicGames/UnrealEngine &>-
  then
    error 'You must register at unrealengine.com and link your github account to access this private repo. See the wiki for more info: https://wiki.archlinux.org/index.php/Unreal_Engine_4'
    exit 1
  fi  

  # Download Unreal Engine source or update if the folder exists
  if [[ ! -d $pkgname ]]
  then
    git clone --depth=1 --branch=$pkgver-release git@github.com:EpicGames/UnrealEngine $pkgname
    cd $pkgname
  else
    cd $pkgname
    rm -f .git/index.lock
    git fetch --depth=1 origin tag $pkgver-release
    git reset --hard $pkgver-release
  fi

  # Apply custom patches
  patch -p1 -i "$srcdir/clang_path_fix.patch" # Replace Windows specific search with the correct path (used for -mode=GenerateClangDatabase in UBT)
  if [[ $_system_mono == true ]]
  then
    export UE_USE_SYSTEM_MONO=1
    patch -p1 -i "$srcdir/stop_mono_clone.patch"
  fi
  if [[ $_ccache_support == true ]]
  then
    patch -p1 -i "$srcdir/ccache_executor.patch"
  fi

  # Qt Creator source code access
  if [[ ! -d Engine/Plugins/Developer/QtCreatorSourceCodeAccess ]]
  then
    git -C Engine/Plugins/Developer clone --depth=1 git@github.com:fire/QtCreatorSourceCodeAccess
  fi

  ./Setup.sh
}

build() {
  cd $pkgname
  Engine/Build/BatchFiles/RunUAT.sh BuildGraph -target="Make Installed Build Linux" -script=Engine/Build/InstalledEngineBuild.xml -set:WithDDC=false -set:HostPlatformOnly=true
}

package() {
  # Desktop entry
  if [[ "$_install_dir" != "opt/$pkgname" ]] # Set new path if dir changed
  then
    sed -i "5c\Path=/$_install_dir/Engine/Binaries/Linux/" com.unrealengine.UE4Editor.desktop
    sed -i "6c\Exec=/$_install_dir/Engine/Binaries/Linux/UE4Editor %F" com.unrealengine.UE4Editor.desktop
  fi
  install -Dm775 com.unrealengine.UE4Editor.desktop "$pkgdir/usr/share/applications/com.unrealengine.UE4Editor.desktop"
  
  cd $pkgname
  
  # Icon for Desktop entry
  install -Dm770 Engine/Source/Programs/UnrealVS/Resources/Preview.png "$pkgdir/usr/share/pixmaps/ue4editor.png"

  # License
  install -Dm770 LICENSE.md "$pkgdir/usr/share/licenses/UnrealEngine/LICENSE.md"
  
  # Engine
  install -dm770 "$pkgdir/$_install_dir/Engine"
  mv LocalBuilds/Engine/Linux/* "$pkgdir/$_install_dir"
}

Just to add to this, I tried installing unreal by downloading the source code zip from github, but it doesn’t feel like a proper install since it stays in my downloads/documents folder. I want to be able to install this in the default pamac way where everything goes into its respective folders on the file system.

I’m on Manjaro XFCE.

Thank you very much.

The error clearly states that:

==> ERROR: You must register at unrealengine.com and link your github account to access this private repo. See the wiki for more info: https://wiki.archlinux.org/index.php/Unreal_Engine_4

Did you get accepted to access the private github repo yet?
I believe it’s a manual process on Epics side, so it can take a little while. You will get a notification on Github, when you where granted access to it.

Hello Strit,

Thank you for the prompt response.

I have access to Epic’s github space. I got an email where an invitation link was included to be a member of Epic Games on github.

Please let me know if you see anything wrong. I’m new to this so I’m sure I’m missing a step.

Thank you.






Okay. That’s good.

Now, when you run makepkg -s (Pamac can not do this) you should be prompted for your github credentials.

Hello Strit,

Thank you. Since I’m new to Manjaro, how do I run makepkg -s? After ./GenerateProjectFiles and ./Setup? Won’t that just compile the C++ into my local folder, but not necessarily make it an installation like how firefox, blender etc are installed? Is there a way to install this so that it doesn’t just compile, but actually ‘installs’ into the correct folders?

Thank you very much for your help. Apologies in advance if my question is non-sensical. I just like to keep my installations neat and tidy.

After you download and extract the tarball from aur.archlinux.org, you open the terminal and go to the folder where the PKGBUILD is. In there, you just run makepkg -s. This will create a package that you can save and install at any time.

If you want to install it right away, you can run makepkg -sci instead, which would create the package, clean up build files and install it, in one command.

Unreal Engine 4 takes a while to compile though and the source is big, so make sure you have enough free space before you start (I would guess at least 200 GB free).

1 Like

Thank you very much Strit! :slight_smile: I’ll try this out tonight and see if it goes through!

I’ll message you back if I run into any issues!