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

Fixing ue4 package #17162

Closed
auntieNeo opened this issue Jul 21, 2016 · 41 comments · Fixed by #269176
Closed

Fixing ue4 package #17162

auntieNeo opened this issue Jul 21, 2016 · 41 comments · Fixed by #269176

Comments

@auntieNeo
Copy link
Contributor

I'm trying to fix the Unreal Engine 4 package on the latest nixpkgs master (commit 3cc54bb). It looks like it was using a deprecated version of clang.

I changed clang to 3.6 (recommended for the latest ue4 release), changed the ue4 release version to 4.12.5, and updated the pkgs/games/ue4/cdn-deps.nix file with the shell script included with the derivation. The UE4Editor binary compiles, but it wants to link with libstdc++.so.6, but cannot do so properly (I assume because clang does not use libstdc++) and refuses to run. I tried linking with libstdc++ manually but I quickly run into malloc/free errors, which leads me to believe this conflicts with whatever C library clang is using. There are a number of pre-compiled third party binaries that come with ue4 that link with libstdc++, so I don't know if linking with libstdc++ can be avoided.

Does anyone think they can fix this package? I would appreciate it.

@puffnfresh

@auntieNeo
Copy link
Contributor Author

Just a quick update: I have this working. A pull request is forthcoming. I'm just trying to figure out how to get UE4Editor to find a C++ toolchain. Whether or not I figure that out, I'll submit a pull request in a few days.

@abbradar
Copy link
Member

Usually this is done by using makeWrapper:

let
  binPath = lib.makeBinPath [ stdenv.cc ];
in stdenv.mkDerivation {
  ....
  nativeBuildInputs = [ makeWrapper ];
  ...
  postInstall = ''
    wrapProgram $out/bin/foo \
      --prefix PATH : ${binPath}
  '';
}

@jtojnar
Copy link
Member

jtojnar commented Oct 20, 2017

@auntieNeo did you ever finish this?

@alesya-h
Copy link
Member

@auntieNeo can you maybe share your work so others can finish it?

@alesya-h
Copy link
Member

alesya-h commented Oct 24, 2018

After spending some time trying to fix it myself I think the best approach is to use nix-shell rather than doing proper packaging. The furthest I got is the following shell.nix:

with import <nixpkgs> {};
stdenv.mkDerivation rec {
  name = "env";

  # UE4_LINUX_USE_LIBCXX = "0";
  UE_USE_SYSTEM_MONO = "1";
  # SDL_VIDEO_X11_VISUALID = "";

  common = [
    libdrm
    libGL libGL_driver mesa_noglu

    xorg.libX11
    xorg.libXau
    xorg.libxcb
    xorg.libXcursor
    xorg.libXext
    xorg.libXfixes
    xorg.libXi
    xorg.libXinerama
    xorg.libXrandr
    xorg.libXrender
    xorg.libXScrnSaver
    xorg.libXxf86vm
    xorg.xextproto
    xorg.xineramaproto
  ];

  LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath([
    stdenv.cc.cc.lib
  ] ++ common);

  buildInputs = ([
    libtool
    xdg-user-dirs
    bashInteractive
    pkgconfig
    clang mono which

    SDL2.dev
  ] ++ common);
}

On my laptop I can build the engine in that shell, it displays loading screen, and then exits with a message that it can't initialize opengl 4 window. It could be that it's purely because my laptop's intel gpu is not good enough for UE4. SDL_VIDEO_X11_VISUALID=0x020 ./Engine/Binaries/Linux/UE4Editor -opengl3 didn't solve the problem as it were trying to initialize opengl 3.3 or something, and max supported version for my gpu was 3.2 if I figured it out correctly.

@stale
Copy link

stale bot commented Jun 3, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
@DarthPJB
Copy link
Contributor

DarthPJB commented Jan 9, 2021

This is very important to me; no idea if I have the time or skill to make it work; but it should be important to us all.

Nix and UE4 are the perfect match; both in workflow, and development.

Having UE4 and it's editor running reliably under Nix(OS) will allow for the perfect one click deployable dev-workstation.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 9, 2021
@akamaus
Copy link
Contributor

akamaus commented Jan 22, 2021

Unreal Engine build how-to https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Build/BatchFiles/Linux/README.md
states clang 3.5-3.9 is required. But only clang >= 5 is available starting from nixos-20.03.

The same thing for mono, version 3 is required, version >= 4 is available.

Either UE build instructions are outdated, either it's hardly build-able on recent distros.
By the way, wiki https://www.ue4community.wiki/legacy/building-on-linux-qr8t0si2 suggests to use ubuntu-16.04 :(

@akamaus
Copy link
Contributor

akamaus commented Jan 26, 2021

Looks like most build instructions are outdated, while the engine itself is ok. I was able to build ue-4.26 in ubuntu18.04 docker container with mounted ut4 source directory. After some binary patching (for LD INTERP) and adding some libraries (udev and vulkan) to expression posted above by @alesguzik, ue4editor now happily works in a nix-shell environment in my nixos.

Building it in nixos is another story, though. The beast seem to be almost fully self-contained, It use nothing from host system apart from libudev, It downloads all the dependencies using some .NET binary then you run ./Setup.sh. One of dependencies is being clang, and of course it requires patchelfing too :)

@3noch
Copy link
Contributor

3noch commented Apr 7, 2021

I'm working on this and would appreciate any help: Here is my latest so far: https://github.com/NixOS/nixpkgs/compare/master...3noch:eac/update-ue4?expand=1

@akamaus
Copy link
Contributor

akamaus commented Apr 24, 2021

to save a hour of waiting, here're the compile logs for patch by @3noch from the post above.
https://gist.github.com/akamaus/6ce33a0b86cadafd569c7f6454017ec0

@akamaus
Copy link
Contributor

akamaus commented Apr 24, 2021

@3noch I see there're basically two problems now:

  • several instances of this:
In file included from /nix/store/hnpwygsgcwxq15za8kgc3qvnh9rpwzp0-glibc-2.32-39-dev/include/signal.h:25:
/nix/store/hnpwygsgcwxq15za8kgc3qvnh9rpwzp0-glibc-2.32-39-dev/include/features.h:397:4: error: _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror,-W#warnings]
#  warning _FORTIFY_SOURCE requires compiling with optimization (-O)

I guess, it should be easy to fix, e.g. we just just need to suppress the effect of -Werror somehow

  • a bunch of errors related to duplicate std c++ library symbols during linking, like following:
ld.lld: error: duplicate symbol: std::logic_error::logic_error(char const*)
>>> defined at cow-stdexcept.o:(std::logic_error::logic_error(char const*)) in archive /nix/store/sjfbbay5xhifzpipm4k007svlrpjbx2p-gcc-10.2.0/lib64/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../lib64/libstdc++.a
>>> defined at stdexcept.cpp
>>>            stdexcept.cpp.o:(.text._ZNSt11logic_errorC2EPKc+0x0) in archive ThirdParty/Linux/LibCxx/lib/Linux/x86_64-unknown-linux-gnu/libc++.a

Here we see symbols from system libstd++ clashing with ones from Engine/Source/ThirdParty/Linux/LibCxx. I wonder why they supply their-own version, given it's a pretty standard stuff.

@yvt
Copy link
Member

yvt commented Apr 25, 2021

I've managed to launch UE4Editor after tinkering with @3noch's work for a few days. I still see some errors related to the absence of /bin/bash.

  • I used hardeningDisable = [ "fortify" ]; to resolve the problem related to _FORTIFY_SOURCE. Though I think suppressing -Werror is a better solution.

  • UE4's build tool actually passes -nodefaultlibs to the compiler. However, some third-party library modules, in particular libfbxsdk.so, are built against libstdc++ (see Engine/Source/ThirdParty/FBX/FBX.Build.cs) and as such declare stdc++ as their system library dependency. UE4Editor links to such modules and consequently inherits their system library dependencies (this isn't really necessary for .sos, I think?), which leads to the "duplicate symbols" error. I've filtered out such dependencies by the following patch, which might not be the best approach:

--- a/Engine/Source/Programs/UnrealBuildTool/Platform/Linux/LinuxToolChain.cs
+++ b/Engine/Source/Programs/UnrealBuildTool/Platform/Linux/LinuxToolChain.cs
@@ -1827,6 +1827,11 @@
 			{
 				if (String.IsNullOrEmpty(Path.GetDirectoryName(AdditionalLibrary)))
 				{
+					if (AdditionalLibrary == "stdc++")
+					{
+						continue;
+					}
+
 					// library was passed just like "jemalloc", turn it into -ljemalloc
 					ExternalLibraries += string.Format(" -l{0}", AdditionalLibrary);
 				}
  • (Another option would be to use the system-default libstdc++ by passing UE4_LINUX_USE_LIBCXX=0. This requires compiling third-party libraries by ourselves (the provided binaries are built against libc++), which turned out to be harder than I thought.)

  • Since libfbxsdk is linked against libstdc++.so.6, it needs to be brought into LD_LIBRARY_PATH.

  • UnrealEngine-4.26.1-release/Engine/Source/ThirdParty/Intel/ISPC/bin/Linux/ispc needs to be patchelf-ed in configurePhase.

@3noch
Copy link
Contributor

3noch commented Apr 26, 2021

Thank you @akamaus and @yvt! I also disabled fortify hardening at some point but didn't figure out a way to get rid of duplicate symbol errors. I think we need to either use libc++ or libstdc++ but not both. I've played around with UE4_LINUX_USE_LIBCXX=0 but it didn't seem to help. I've also tried just patchelfing the entire Linux toolchain from UE's downloaded platform and not doing anything else to patch the codebase, but that led to a different set of errors that seemed harder to solve.

@3noch
Copy link
Contributor

3noch commented Apr 26, 2021

@yvt Do you have a branch somewhere I can use to build a working UE4Editor?? That's really fantastic progress.

@yvt

This comment has been minimized.

@akamaus
Copy link
Contributor

akamaus commented Apr 27, 2021

great work, @yvt!
By the way, UE-4.26.2 was released a week ago or so. AFAIK It contains some nice bug fixes, like properly working custom rendering passes. Maybe we should target updated version?

@yvt

This comment has been minimized.

@akamaus
Copy link
Contributor

akamaus commented Apr 30, 2021

@yvt I was under impression, you also have to regenerate dependencies with generate-expr-from-cdn.sh. Or maybe 4.26.2 is a bugfix version and dependencies stay fixed?

@yvt
Copy link
Member

yvt commented Apr 30, 2021

Fixed the splash screen: yvt@4fb92ef (Help still wanted for the rpaths of UE4Edtior.)

@akamaus Yes, I have updated cdn-deps.nix by running generate-expr-from-cdn.sh. It seems to change a lot between releases.

@3noch
Copy link
Contributor

3noch commented Apr 30, 2021

@yvt Awesome!

Regard the rpath: Have you tried patchelfing to change just the RPATH? I think you can essentially set LD_LIBRARY_PATH permanently that way.

@3noch
Copy link
Contributor

3noch commented Apr 30, 2021

I see now that it's referring to things in the source directory. Perhaps you can just copy those to $out and then specify the RPATH to there since that will be a full nix path.

@yvt
Copy link
Member

yvt commented May 1, 2021

It actually copies literally everything from the build directory:

cp -r . "$sharedir"

I could just do patchelf manually but I'd rather prefer something automatic so that the future maintainers won't have to readjust the paths on every UE4 upgrade. I have noticed that it hasn't yet enabled autoPatchelfHook, which I think might be able to sort out the rpath problem.

@yvt
Copy link
Member

yvt commented May 2, 2021

yvt@49be2c8

patchelf crashes during autoPatchelfHook:

searching for dependencies of /nix/store/ihw6pfdaa0pflxyxrgywfim96kph3prw-ue4-4.26.2/share/UnrealEngine/Engine/Plugins/Experimental/VirtualProductionUtilities/Binaries/Linux/libUE4Editor-VPBookmarkEditor.debug
/nix/store/rsmzkhkdwwyy0891gzcgkynxbv1avicj-auto-patchelf-hook/nix-support/setup-hook: line 12: 110663 Segmentation fault      (core dumped) patchelf "$@"
Command failed: patchelf --remove-rpath /nix/store/ihw6pfdaa0pflxyxrgywfim96kph3prw-ue4-4.26.2/share/UnrealEngine/Engine/Plugins/Experimental/VirtualProductionUtilities/Binaries/Linux/libUE4Editor-VPBookmarkEditor.debug
builder for '/nix/store/i4bj7sbm7vyl1pnwznksf5w0ha7r5yy1-ue4-4.26.2.drv' failed with exit code 1
error: build of '/nix/store/i4bj7sbm7vyl1pnwznksf5w0ha7r5yy1-ue4-4.26.2.drv' failed

@akamaus
Copy link
Contributor

akamaus commented May 2, 2021

@yvt I tried building yvt@4fb92ef by manually launching phases inside nix-shell '<nixpkgs>' -A ue4

Got a bunch of link errors: https://gist.github.com/akamaus/214f3eb07e5b75144094c7d60bcd5f50#file-ue-4-26-2-link-errors-L3118
You certainly don't have these issues, do you? Looks like some nondeterminism is involved.

@akamaus
Copy link
Contributor

akamaus commented May 3, 2021

Strangely, after rerunning buildPhase I got Engine/Binaries/Linux/UE4Editor compiled in just five additional minutes. Unfortunately, it fails on SDL initialization, but I guess its a separate issue. I remember getting similar error when I was experimenting with running on Nixos UE4 built in ubuntu docker. Unfortunately, forgot how to tackle it.

[2021.05.02-18.23.41:197][  0]LogInit: Initializing SDL.
[2021.05.02-18.23.41:198][  0]LogInit: Warning: Could not initialize SDL: No available video device
[2021.05.02-18.23.41:198][  0]LogInit:  - Physical RAM available (not considering process quota): 63 GB (64169 MB, 65710068 KB, 67287109632 bytes)
[2021.05.02-18.23.41:198][  0]LogInit:  - VirtualMemoryAllocator pools will grow at scale 1.4
[2021.05.02-18.23.41:198][  0]LogInit:  - MemoryRangeDecommit() will be a no-op (re-run with -vmapoolevict to change)
[2021.05.02-18.23.41:221][  0]LogInit: Physics initialised using underlying interface: PhysX
[2021.05.02-18.23.41:242][  0]LogInit: Using OS detected language (en-US).
[2021.05.02-18.23.41:242][  0]LogInit: Using OS detected locale (en-US).
[2021.05.02-18.23.41:243][  0]LogTextLocalizationManager: No specific localization for 'en-US' exists, so the 'en' localization will be used.
[2021.05.02-18.23.41:405][  0]LogInit: Initializing SDL.
[2021.05.02-18.23.41:406][  0]LogInit: Warning: Could not initialize SDL: No available video device
[2021.05.02-18.23.41:406][  0]LogInit: Warning: FLinuxSplashState::InitSplashResources() : InitSDL() failed, there will be no splash.
[2021.05.02-18.23.41:406][  0]LogInit: Initializing SDL.
[2021.05.02-18.23.41:406][  0]LogInit: Warning: Could not initialize SDL: No available video device
[2021.05.02-18.23.41:406][  0]LogInit: Error: FLinuxApplication::CreateLinuxApplication() : InitSDL() failed, cannot create application instance.
[2021.05.02-18.23.41:406][  0]LogCore: FUnixPlatformMisc::RequestExit(bForce=true, ReturnCode=1)
[2021.05.02-18.23.41:406][  0]LogCore: FUnixPlatformMisc::RequestExit(1)

@yvt
Copy link
Member

yvt commented May 3, 2021

@akamaus

Unfortunately, it fails on SDL initialization, but I guess its a separate issue. I remember getting similar error when I was experimenting with running on Nixos UE4 built in ubuntu docker. Unfortunately, forgot how to tackle it.

I saw the same error when the X11 libraries were missing. The shell script bin/UE4Editor is responsible for setting LD_LIBRARY_PATH to ensure such runtime dependencies can be found.

(There are also runtime dependencies on libGL and libvulkan, required by the splash screen and the engine renderer, respectively.)

@yvt
Copy link
Member

yvt commented May 5, 2021

#17162 (comment)

  • The UE4Edtior executable has weird rpaths for some reason and can't find the bundled shared libraries.

UE4Editor actually didn't have weird rpaths, but 40 other shared libraries did. ${ORIGIN}s in those shared libraries were prefixed by backslashes for some reason.

$ readelf -a libUE4Editor-ActorPickerMode.so | grep RUNPATH
 0x000000000000001d (RUNPATH)            Library runpath: [${ORIGIN}:${ORIGIN}/..:${ORIGIN}/../../../Engine/Binaries/ThirdParty/Qualcomm/Linux:${ORIGIN}/../../../Engine/Binaries/ThirdParty/OpenVR/OpenVRv1_5_17/linux64:${ORIGIN}/../../../Engine/Binaries/ThirdParty/PhysX3/Linux/x86_64-unknown-linux-gnu]

$ readelf -a libUE4Editor-CinematicCamera.so | grep RUNPATH
 0x000000000000001d (RUNPATH)            Library runpath: [\${ORIGIN}:\${ORIGIN}/..:\${ORIGIN}/../../../Engine/Binaries/ThirdParty/Qualcomm/Linux:\${ORIGIN}/../../../Engine/Binaries/ThirdParty/OpenVR/OpenVRv1_5_17/linux64:\${ORIGIN}/../../../Engine/Binaries/ThirdParty/PhysX3/Linux/x86_64-unknown-linux-gnu]

This was addressed by yvt@a89cfff

(-preferAMD is needed to prefer GPU over software rendering, but this could be only specific to my machine.)

It seems to be specific to systems with no discrete GPUs and llvmpipe listed as GPU0. Reported as Case # 00318899

@akamaus
Copy link
Contributor

akamaus commented May 14, 2021

Got a bunch of link errors during building yvt@8275cb1 with nixpkgs:

[2404/2782] Link (lld) libUE4Editor-ControlRigEditor.so
[2405/2782] Link (lld) libUE4Editor-DatasmithImporter.so
[2406/2782] Link (lld) libUE4Editor-USDExporter.so
[2407/2782] Link (lld) libUE4Editor-USDImporter.so
[2408/2782] Relink libUE4Editor-MovieSceneTools.so
[2409/2782] Link (lld) libUE4Editor-USDStageEditor.so
[2410/2782] Relink libUE4Editor-Landscape.so
[2411/2782] Relink libUE4Editor-Kismet.so
[2412/2782] Link (lld) UE4Editor
[2413/2782] Link (lld) libUE4Editor-ApexDestructionEditor.so
ld.lld: error: /build/UnrealEngine-4.26.2-release/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so: undefined reference to ALandscape::HasAllComponent()
ld.lld: error: /build/UnrealEngine-4.26.2-release/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so: undefined reference to ALandscape::GetPrivateStaticClass()
ld.lld: error: /build/UnrealEngine-4.26.2-release/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so: undefined reference to UWidgetTree::GetPrivateStaticClass()
ld.lld: error: /build/UnrealEngine-4.26.2-release/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so: undefined reference to UAnimationGraph::GetPrivateStaticClass()
ld.lld: error: /build/UnrealEngine-4.26.2-release/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so: undefined reference to DirectoryWatcher::FFileCache::WriteCache()
ld.lld: error: /build/UnrealEngine-4.26.2-release/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so: undefined reference to DirectoryWatcher::FFileCache::IgnoreNewFile(FString const&)
ld.lld: error: /build/UnrealEngine-4.26.2-release/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so: undefined reference to DirectoryWatcher::FFileCache::IgnoreMovedFile(FString const&, FString const&)
ld.lld: error: /build/UnrealEngine-4.26.2-release/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so: undefined reference to DirectoryWatcher::FFileCache::IgnoreDeletedFile(FString const&)
ld.lld: error: /build/UnrealEngine-4.26.2-release/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so: undefined reference to DirectoryWatcher::FFileCache::CompleteTransaction(DirectoryWatcher::FUpdateCacheTransaction&&)
ld.lld: error: /build/UnrealEngine-4.26.2-release/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so: undefined reference to DirectoryWatcher::FFileCache::GetOutstandingChanges()
ld.lld: error: /build/UnrealEngine-4.26.2-release/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so: undefined reference to DirectoryWatcher::FFileCache::IgnoreFileModification(FString const&)
ld.lld: error: /build/UnrealEngine-4.26.2-release/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so: undefined reference to DirectoryWatcher::FFileCache::FilterOutstandingChanges(TFunctionRef<bool (DirectoryWatcher::FUpdateCacheTransaction const&, FDateTime const&)>)
...
[2778/2782] Link (lld) libUE4Editor-Advertising.so
[2779/2782] Link (lld) libUE4Editor-BlankPlugin.so
[2780/2782] Copy libtbb.so.2
[2781/2782] Link (lld) libUE4Editor-NiagaraEditorWidgets.so
make: *** [Makefile:1008: UE4Editor] Error 6
builder for '/nix/store/r7cnkb1bxr0qzqlqbzslacli8fw24zli-ue4-4.26.2.drv' failed with exit code 2
error: build of '/nix/store/r7cnkb1bxr0qzqlqbzslacli8fw24zli-ue4-4.26.2.drv' failed

Surprisingly, manual build with nix-shell finishes without any errors.

UPDATE.
Actually, buildPhase fails on the first run but happily continues, if I repeat the command. If I after that I fix $out environment variable (to set it to a user-writable place) and run install phase, resulting bash wrapper works and UE4Editor is launched successfully.

@dyaso
Copy link

dyaso commented May 15, 2021

It built first time for me, although the Editor crashes on trying to create a C++ project with:

C++ project, max settings

Running /nix/store/vhw0na01x0rpjik1009cdzws58rj3fqa-ue4-4.26.2/share/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe  -projectfiles -project="/home/oliver/documents/Unreal Projects/MyProject3/MyProject3.uproject" -game -engine -progress

Running Mono...

Fixing inconsistent case in filenames.
Running system mono, version: 5
/nix/store/vhw0na01x0rpjik1009cdzws58rj3fqa-ue4-4.26.2/share/UnrealEngine/Engine /nix/store/vhw0na01x0rpjik1009cdzws58rj3fqa-ue4-4.26.2/share/UnrealEngine/Engine/Binaries/Linux
Discovering modules, targets and source code for project...
While compiling /nix/store/vhw0na01x0rpjik1009cdzws58rj3fqa-ue4-4.26.2/share/UnrealEngine/Engine/Intermediate/Build/BuildRules/UE4Rules.dll:
error CS0016: Could not write to file `UE4Rules'. Access to the path "/nix/store/vhw0na01x0rpjik1009cdzws58rj3fqa-ue4-4.26.2/share/UnrealEngine/Engine/Intermediate/Build/BuildRules/UE4Rules.dll" is denied.
ERROR: Unable to compile source files.

Creating a Blueprint project does work, but gives the same error on trying to create a C++ class:

Running system mono, version: 5
/nix/store/vhw0na01x0rpjik1009cdzws58rj3fqa-ue4-4.26.2/share/UnrealEngine/Engine /nix/store/vhw0na01x0rpjik1009cdzws58rj3fqa-ue4-4.26.2/share/UnrealEngine/Engine/Binaries/Linux
Discovering modules, targets and source code for project...
While compiling /nix/store/vhw0na01x0rpjik1009cdzws58rj3fqa-ue4-4.26.2/share/UnrealEngine/Engine/Intermediate/Build/BuildRules/UE4Rules.dll:
error CS0016: Could not write to file `UE4Rules'. Access to the path "/nix/store/vhw0na01x0rpjik1009cdzws58rj3fqa-ue4-4.26.2/share/UnrealEngine/Engine/Intermediate/Build/BuildRules/UE4Rules.dll" is denied.
ERROR: Unable to compile source files.
LogSlate: Window 'Message' being destroyed
Message dialog closed, result: Yes, title: Message, text: Successfully added class 'MyPawn', however you must recompile the 'MyProject4' module before it will appear in the Content Browser. Failed to generate project files.
Would you like to open the Output Log to see more details?

@3noch
Copy link
Contributor

3noch commented May 16, 2021

@dyaso Looks like we need to tell UE where to create intermediate build files. It's trying to use its /nix/store path.

@DarthPJB
Copy link
Contributor

With UE-5 early access out, how much of the existing work is portable? I've not even dared look at it's build system yet, in hopes it's the same.

@stale
Copy link

stale bot commented Apr 29, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 29, 2022
@Mindavi
Copy link
Contributor

Mindavi commented May 11, 2022

Hey y'all, I'm planning to drop the ue4 package since it's been broken for so long: #172383. Is anyone still planning to revive it?

I think it makes sense to drop it anyway for now and reinit it if anyone ever gets around to fixing it.

@3noch
Copy link
Contributor

3noch commented May 11, 2022

We'll never be able to actually include it since it's not open source. Better to move it to a separate repo where it can be worked on. The amount of work already put into this is enormous and I'd hate to lose that discoverability.

@Mindavi
Copy link
Contributor

Mindavi commented May 11, 2022

Sorry, what do you mean with discoverability? Keeping this issue open? I'm fine with that, I just think that keeping the build recipe that's broken isn't useful.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label May 11, 2022
@3noch
Copy link
Contributor

3noch commented May 11, 2022

It's useful so that people who want UE in Nix can find it easily here and have some hope of getting it working since so much work has already been done.

@Mindavi
Copy link
Contributor

Mindavi commented May 11, 2022

Please do update the derivation with everything you've found already, that also helps future people looking at it realize that there's still someone working on it. I'll happily merge improvements (even if it doesn't fully work yet) to the derivation if you ping me.

If there's still no work done on the derivation, it doesn't make sense to me to keep it, you can maybe link to it (latest commit where it's still available in nixpkgs) here then and we'll drop it.

I added a link to this issue above the broken = true line for now for more visibility.

@3noch
Copy link
Contributor

3noch commented May 11, 2022

Actually looks like the most up-to-date work is already in various forks linked in this thread. Feel free to drop it.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 12, 2022
@puffnfresh
Copy link
Contributor

Hey y'all, I'm planning to drop the ue4 package since it's been broken for so long: #172383. Is anyone still planning to revive it?

I think it makes sense to drop it anyway for now and reinit it if anyone ever gets around to fixing it.

I think it's time to remove it. No need for the large CDN dependencies file to exist in everyone's download of nixpkgs when it can't even be used.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 21, 2023
@ghost
Copy link

ghost commented Nov 22, 2023

Yes, I recently built the entire release packageset, and http://cdn.unrealengine.com/ accounts for more than half of the failed jobs.

I don't know why hydra.nixos.org isn't failing these jobs too. It must have a private cache for these FODOs that isn't exposed via cache.nixos.org.

@ajs124 ajs124 mentioned this issue Nov 22, 2023
13 tasks
ehmry pushed a commit that referenced this issue Nov 26, 2023
Closes #17162
has been broken for years
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.