Package Details: unreal-engine 5.4.4-0

Git Clone URL: https://aur.archlinux.org/unreal-engine.git (read-only, click to copy)
Package Base: unreal-engine
Description: A 3D game engine by Epic Games which can be used non-commercially for free.
Upstream URL: https://www.unrealengine.com/
Keywords: 3D engine game ue5 Unreal
Licenses: GPL3, custom:UnrealEngine
Submitter: acerix
Maintainer: Shatur (Neko-san)
Last Packager: Neko-san
Votes: 75
Popularity: 0.23
First Submitted: 2016-05-01 18:37 (UTC)
Last Updated: 2024-09-04 18:39 (UTC)

Dependencies (29)

Required by (1)

Sources (6)

Pinned Comments

Neko-san commented on 2022-11-01 02:32 (UTC) (edited on 2023-06-25 01:19 (UTC) by Neko-san)

@juancarlospaco this is easily done on your own system, not in a PKGBUILD, given that building packages runs as root:

sudo groupadd unrealengine-users
sudo usermod -aG unrealengine-users (your-username)
sudo chown -R root:unrealengine-users /opt/unreal-engine
sudo chmod -R 775 /opt/unreal-engine

Permission issues like this are already mentioned on the UE Arch wiki page: https://wiki.archlinux.org/title/Unreal_Engine_4#Installing_from_the_AUR

This is a user system problem; I already did what I could without needing users to do the above by giving the 777 permissions. If it still gives you trouble, you'll have to use the example to solve it or change the install location to somewhere you have user permissions by default (as I cannot do this for you).

zerophase commented on 2021-05-27 08:15 (UTC) (edited on 2021-05-30 08:41 (UTC) by zerophase)

Will update to 5.0 when it is released.

Latest Comments

« First ‹ Previous 1 .. 25 26 27 28 29 30 31 32 33 34 35 .. 81 Next › Last »

Neko-san commented on 2021-09-04 21:14 (UTC) (edited on 2021-09-04 21:24 (UTC) by Neko-san)

@zerophase I edited the PKGBUILD to support UE5, and it compiles, but fails near the very end with a strange error that I don't understand? Then, following that error, throws another error claiming that an essentially blank file (a dummy file) is missing in a certain directory:

ERROR: File '/mnt/bigStorage/Development/paru-cache/unreal-engine/src/unreal-engine/Engine/Binaries/Linux/libEOSSDK-Linux-Shipping.so' was produced by Compile UnrealGame Linux/UnrealGame Linux and Compile UnrealEditor Linux/UnrealEditor Linux

ERROR: Source file '/mnt/bigStorage/Development/paru-cache/unreal-engine/src/unreal-engine/Engine/Source/ThirdParty/Linux/HaveLinuxDependencies' does not exist
       while executing task <Copy Files="#Copy for Installed Linux" From="/mnt/bigStorage/Development/paru-cache/unreal-engine/src/unreal-engine" To="/mnt/bigStorage/Development/paru-cache/unreal-engine/src/unreal-engine/LocalBuilds/Engine/Linux" Overwrite="True" Tag="#Installed Build Linux Files" ErrorIfNotFound="False" />
       at Engine/Build/InstalledEngineBuild.xml(1117)
       (see /home/neko-san/Library/Logs/Unreal Engine/LocalBuildLogs/Log.txt for full exception trace)

The PKGBUILD was like this:

# 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=5
pkgrel=1
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 &>/dev/null
  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=ue5-main git@github.com:EpicGames/UnrealEngine $pkgname
    cd $pkgname
  else
    cd $pkgname
    rm -f .git/index.lock
    git fetch --depth=1 origin tag @{upstream}
    git reset --hard @{upstream}
  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

  mkdir -p $pkgname/Engine/Source/ThirdParty/Linux/
  touch $pkgname/Engine/Source/ThirdParty/Linux/HaveLinuxDependencies

  ./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.UE5Editor.desktop
    sed -i "6c\Exec=/$_install_dir/Engine/Binaries/Linux/UnrealEditor %F" com.unrealengine.UE5Editor.desktop
  fi
  mv com.unrealengine.UE4Editor.desktop com.unrealengine.UE5Editor.desktop
  install -Dm775 com.unrealengine.UE5Editor.desktop "$pkgdir/usr/share/applications/com.unrealengine.UE5Editor.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"
}

And my makepkg.conf was like this:

#!/hint/bash
#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
#  Format: 'protocol::agent'
DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
          'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
          'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'rsync::/usr/bin/rsync --no-motd -z %u %o'
          'scp::/usr/bin/scp -C %u %o')

# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget
# /usr/bin/axel

#-- The package required by makepkg to download VCS sources
#  Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
            'fossil::fossil'
            'git::git'
            'hg::mercurial'
            'svn::subversion')

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"

#-- Compiler and Linker Flags
export CC=clang
export CXX=clang++

#CPPFLAGS=""
CFLAGS="-march=native -mtune=native -O3 -pipe -fno-plt -minline-all-stringops -fexceptions \
        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
        -fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now"
RUSTFLAGS="-C opt-level=3 -C target-cpu=native"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j$(nproc)"
#-- Debugging flags
## The "-fvar-tracking-assignments" flag is for GCC
#DEBUG_CFLAGS="-g -fvar-tracking-assignments"
DEBUG_CLAGS="-g"
#DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g"
#DEBUG_RUSTFLAGS="-C debuginfo=2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
#  A negated environment option will do the opposite of the comments below.
#
#-- distcc:   Use the Distributed C/C++/ObjC compiler
#-- color:    Colorize output messages
#-- ccache:   Use ccache to cache compilation
#-- check:    Run the check() function if present in the PKGBUILD
#-- sign:     Generate PGP signature file
#
BUILDENV=(!distcc color !ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg

#########################################################################
# GLOBAL PACKAGE OPTIONS
#   These are default values for the options=() settings
#########################################################################
#
# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto)
#  A negated option will do the opposite of the comments below.
#
#-- strip:      Strip symbols from binaries/libraries
#-- docs:       Save doc directories specified by DOC_DIRS
#-- libtool:    Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs:  Leave empty directories in packages
#-- zipman:     Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge:      Remove files specified by PURGE_TARGETS
#-- debug:      Add debugging flags as specified in DEBUG_* variables
#-- lto:        Add compile flags for building with link time optimization
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)

#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
INTEGRITY_CHECK=(sha256)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"

#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"
#-- Specify a key to use for package signing
#GPGKEY=""

#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z --threads=0 -)
COMPRESSZST=(zstd -c -z -q --threads=0 -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
COMPRESSLZ4=(lz4 -q)
COMPRESSLZ=(lzip -c -f)

#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
PKGEXT='.pkg.tar.zst'
SRCEXT='.src.tar.gz'

#########################################################################
# OTHER
#########################################################################
#
#-- Command used to run pacman as root, instead of trying sudo and su
#PACMAN_AUTH=(doas)

I have a log of what happened (as mentioned in the error output) but the log is HUGE, so I don't think including it in this post is a good idea Lol

ruestique commented on 2021-09-01 16:58 (UTC)

I have changed pkgver to 4.27.0 in my PKGBUILD -- everything is ok!

HurricanePootis commented on 2021-08-30 02:29 (UTC)

-set:HostPlatformOnly=true is set in the PKGBUILD. Does this mean Unreal Engine can only target Linux platforms, because I want to also target android too. Would I have to manually enable Android?

zerophase commented on 2021-08-24 21:25 (UTC)

@shuriken Can't work on this for a few more weeks. Waiting on new networking equipment needed for addressing networking issues. With my current network setup github won't let me pull. Feel free to update the PKGBUILD.

shuriken commented on 2021-08-24 21:16 (UTC)

I have changed pkgver to 4.27.0 in my PKGBUILD as this one is not updated. Do the patches need any changes ?

Azzunyan commented on 2021-07-31 11:37 (UTC)

Broken android. Config initialization is unavailable. The green line does not appear. Check it out.

Shatur commented on 2021-07-25 12:19 (UTC) (edited on 2021-07-25 12:21 (UTC) by Shatur)

@zerophase, as you wish. As I said before - feel free to revert any my commit. Each commit contains a standalone change, it should be easy. It's weird that the compilation doesn't work in temp folder for you. I used bundled mono that downloaded by default by UE.

zerophase commented on 2021-07-25 10:24 (UTC)

@shatur There's probably a work around for this. I'll have to look into how Unreal Engine 5 compiles everything. Think I should be able to use the system mono to address the permission issues.

I would recommend reverting the automation tool till it supports the system mono too. I'm pretty sure this is an issue with the mono used.

Shatur commented on 2021-07-25 09:17 (UTC) (edited on 2021-07-25 09:17 (UTC) by Shatur)

@zerophase, got it, I used another directory on my drive because I simply do not have enough space in temp.

zerophase commented on 2021-07-25 08:07 (UTC) (edited on 2021-07-25 08:33 (UTC) by zerophase)

It's a permission issue from building in temp. Automation tool causes the issue as well. We should try to avoid saving files to home while building.