4.26 build from source fails for headless chaos

Latest Release branch 4.26 Engine compilation fails with the following:

Engine/Source/Runtime/PhysicsCore/Private/PhysicalMaterial.cpp(107): error C2653: ‘FChaosEngineInterface’: is not a class or namespace name

Anyone came across it yet?

There are more errors but its basically due to **bCompileChaos **and **bUseChaos **being false

It doesn’t work even if I set it to true in **Editor.Target.cs **following the official guide
https://docs.unrealengine.com/en-US/…iew/index.html

A hacky solution that works is to set **bCompileChaos **and **bUseChaos **to true in Engine\Source\Programs\UnrealBuildTool\Configuration\TargetRules.cs

I’m not sure if that’s the intended way

+1

I am still building but thought I would poke the thread

Edit: I just noticed that generate project solution files did not overwrite the sln file in my case, im rebuilding now to verify if that fixed it.

+1

Thanks for mentioning the workaround it does indeed compile if using Chaos.

+1
Cannot compile the 4.26 from source code, same chaos compile question.

Compiles fine for me, tested 06 and 07 dec.
I used this script.
tested on KDE Neon 5.20 (based on Ubuntu 20.04)

But I crashes constantly even I tried to change position of Content Browser and other panels.
So, I switched back to 4.25.4

I am also having this issue, my friend is using ubuntu and it compiles fine but crashes sometime during or after initialization of the engine. Giving it another go with OP’s boolean switches in TargetRules.cs

I ran into this problem today as well, and searched through git to see if there was a recent fix. I found a commit on the chaos branch:

The commit adds the following to the end of the HeadlessChaosTarget constructor in HeadlessChaos.Target.cs


 // Force enable Chaos as the physics engine for this project as this
// is a Chaos unit test framework - it doesn't build with PhysX enabled
bUseChaos = true;
bCompileChaos = true;
bCompilePhysX = false;
bCompileAPEX = false;
bCompileNvCloth = false;

After adding those lines I was able to compile my project without having to add Chaos to the engine target.

2 Likes

Hey Man, thanks for this. I am new to really digging into both the editor, and developing with unreal 4, and pulled the code recently and encountered this problem. This fix allowed it to compile.

(once I understand some more things and am working more on a “real” project i will get the git set up properly, I just right now am accomplishing technical “goals” to learn while I figure out what I want to do)

Here is the link to the commit that fixed this issue in the branch “4.26-chaos”
https://github.com/EpicGames/UnrealEngine/commit/1cad849f10d5811237b8d048d585af1bf96489cc

Resolved my issue.

You just saved me from having to do that work, thanks man.

Did anyone manage manage to compile it without Chaos enabled?

That’s works fine for me. Thank you.

Just grabbed the latest 4.26.1 (release) from Github and the compile failed without the above mentioned modifications. Why is this “fix” not in the release branch by default?

1 Like

I grabbed release version on 02/26 and I don’t see any issues during the build.

I just grabbed release today and I had this issue with my build. So I grabbed “4.26.1-release” and had the same issue. I am using windows 10 and visual studio 2019 16.9.3

This also worked for me. Thank you so much!! I was using Oculus UE4 4.26 which was missing the fix, and adding these lines allowed me to compile.