Guidelines for integrating PhysX4.1 into UE4.21 in Linux

Dear Epic,

I have a module that makes use of UPhysicsConstraintComponent and currently using substepping method. I just want to experiment on PhysX4.1 to see its result as being compared with current PhysX3.4 being built inside UE4.21.

(1) I followed the guide on https://github.com/NVIDIAGameWorks/PhysX [branch 4.1] and could build libraries for Linux, however there was a segmentation fault as loading UE4Editor.

I suppose it should be built in another way using UE Toolchain instead with specific flags being passed to CMAKE, basically similar to how PhysX3/APEX is built as far as I know:

Engine/Source/Programs/AutomationTool/Scripts/BuildPhysX.Automation.cs

(2) Besides, I also have to disable APEX to make our sourcecodes works.
I set bCompileAPEX = false; inside:

Engine/Source/UE4Editor.Target.cs

and

Engine/Source/Programs/UnrealBuildTool/Platform/Linux/UEBuildLinux.cs (ValidateTarget() function)

However, they seem to be not enough.

I hope you could enlighten me with some advices, which would be much appreciated!

Thank you!