-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Comments
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. |
Usually this is done by using
|
@auntieNeo did you ever finish this? |
@auntieNeo can you maybe share your work so others can finish it? |
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:
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. |
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:
|
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. |
Unreal Engine build how-to https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Build/BatchFiles/Linux/README.md 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. |
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 |
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 |
to save a hour of waiting, here're the compile logs for patch by @3noch from the post above. |
@3noch I see there're basically two problems now:
I guess, it should be easy to fix, e.g. we just just need to suppress the effect of
Here we see symbols from system |
I've managed to launch
--- 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);
}
|
Thank you @akamaus and @yvt! I also disabled |
@yvt Do you have a branch somewhere I can use to build a working UE4Editor?? That's really fantastic progress. |
This comment has been minimized.
This comment has been minimized.
great work, @yvt! |
This comment has been minimized.
This comment has been minimized.
@yvt I was under impression, you also have to regenerate dependencies with |
Fixed the splash screen: yvt@4fb92ef (Help still wanted for the rpaths of @akamaus Yes, I have updated |
@yvt Awesome! Regard the rpath: Have you tried |
I see now that it's referring to things in the source directory. Perhaps you can just copy those to |
It actually copies literally everything from the build directory: nixpkgs/pkgs/games/ue4/default.nix Line 90 in 4fb92ef
I could just do |
patchelf crashes during
|
@yvt I tried building yvt@4fb92ef by manually launching phases inside Got a bunch of link errors: https://gist.github.com/akamaus/214f3eb07e5b75144094c7d60bcd5f50#file-ue-4-26-2-link-errors-L3118 |
Strangely, after rerunning
|
I saw the same error when the X11 libraries were missing. The shell script (There are also runtime dependencies on libGL and libvulkan, required by the splash screen and the engine renderer, respectively.) |
This was addressed by yvt@a89cfff
It seems to be specific to systems with no discrete GPUs and llvmpipe listed as GPU0. Reported as Case # 00318899 |
Got a bunch of link errors during building yvt@8275cb1 with nixpkgs:
Surprisingly, manual build with nix-shell finishes without any errors. UPDATE. |
It built first time for me, although the Editor crashes on trying to create a C++ project with:
Creating a Blueprint project does work, but gives the same error on trying to create a C++ class:
|
@dyaso Looks like we need to tell UE where to create intermediate build files. It's trying to use its /nix/store path. |
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. |
I marked this as stale due to inactivity. → More info |
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. |
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. |
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. |
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. |
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. |
Actually looks like the most up-to-date work is already in various forks linked in this thread. Feel free to drop 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. |
Yes, I recently built the entire release packageset, and I don't know why |
Closes #17162 has been broken for years
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
The text was updated successfully, but these errors were encountered: