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

Add Linux support #13

Open
jcredmond opened this issue Jul 2, 2015 · 6 comments
Open

Add Linux support #13

jcredmond opened this issue Jul 2, 2015 · 6 comments

Comments

@jcredmond
Copy link
Contributor

The FaceFX Runtime ships with Linux libraries, so it should be pretty easy to add support for building the UE4 plugin on Linux.

@jcredmond
Copy link
Contributor Author

There is still no Epic Launcher or marketplace support for Linux, so we still cannot build and distribute a pre-built plugin for Linux.

It looks like Epic has settled on clang 5.0.0+ for Linux, so we can move the FaceFX Runtime Linux tool chain to clang 5+ and hopefully create a .lib that can be linked in to UE4 when compiling the UE4 plugin from source on Linux.

@jcredmond
Copy link
Contributor Author

Epic's documentation is pretty bad. The "cross compilation" documentation says clang 5.0.0, but the actual Linux build instructions in the README say clang 3.8. It's all behind the UBT black box, so who knows what their exact compiler and compilation settings are.

@jcredmond
Copy link
Contributor Author

It looks like we can use clang 5.0, 4.0, 3.9, 3.8, 3.7, 3.6 and 3.5 (gcc is explicitly forbidden) [1]. This poses a problem, though, because the version of clang is determined at compile time based on what is installed on your Linux system.

In order to do this, we'd have to pick a version and enforce it. We'd have to pick 5.0 because 5.0 is the only version of clang that cross compiling to Linux from Windows supports [2]. This is also a moving target, because as you can see the version of clang changes with (almost) each version of UE4 [2].

Also, this issue is specific to x86_64 Linux. Everything is different for ARM Linux.

[1] https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Source/Programs/UnrealBuildTool/Platform/Linux/LinuxToolChain.cs

// refuse to use compilers that we know won't work
// disable that only if you are a dev and you know what you are doing
if (!UsingClang())
{
    throw new BuildException("This version of the engine can only be compiled by clang - refusing to register the Linux toolchain.");
}
else if (CompilerVersionMajor == 3 && CompilerVersionMinor == 4)
{
    throw new BuildException("clang 3.4.x is known to miscompile the engine - refusing to register the Linux toolchain.");
}
// prevent unknown clangs since the build is likely to fail on too old or too new compilers
else if ((CompilerVersionMajor * 10 + CompilerVersionMinor) > 50 || (CompilerVersionMajor * 10 + CompilerVersionMinor) < 35)
{
    throw new BuildException(
        string.Format("This version of the Unreal Engine can only be compiled with clang 5.0, 4.0, 3.9, 3.8, 3.7, 3.6 and 3.5. clang {0} may not build it - please use a different version.",
            CompilerVersionString)
        );
}

[2] https://wiki.unrealengine.com/Compiling_For_Linux

@fxs-dbrady
Copy link

I know this bug is kinda old, but we just got bit by it. But yeah, UE4 uses clang, and the version does change frequently. We've found that the best thing to do is just to cross-compile from Windows (unfortunately). That being said, does a UE4 compatible version exist? Can we request one?

@jcredmond
Copy link
Contributor Author

We are releasing the 1.5.1 runtime in the next few weeks which switches the pre-compiled linux .lib of the runtime from gcc to clang, which should help for native linux builds of the ue4 plugin.

If you have a full license rather than the indie license you'll have source to the runtime and can simply modify our makefile to build the runtime with the exact compiler settings you need for your specific build.

@fxs-dbrady
Copy link

Thanks for the incredibly quick response. We're still working on getting an Enterprise license internally, the wheels are turning a little slower than I'd like. But that's great news for the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants