How to compile for Linux using Unreal Engine 4.27

juaxix
juaxix ✭✭
edited October 4 in Native

Hello, this was working in previous versions of Unreal and Photon SDKs, now, with Photon SDK 4 and 5 and Unreal 4.27 + linux crosscompiler 11 the compilation throws a lot of errors for undefineds:

Am I missing some flag to be added in the compiler arguments or am I using the wrong libs? , I have updated every lib but it didn't work.

Thanks!

Comments

  • Hi @juaxix.


    The Photon Linux client SDK uses g++ as compiler and libstdc++ and standard library, while Unreal Linux builds use clang as compiler and libc++ as standard library.


    So I would assume that it should not have worked on previous versions either.


    You can switch Unreal to libstdc++ by setting an environment variable UE4_LINUX_USE_LIBCXX to 0 and see if that helps.


    If that doesn't help, then I am afraid that that would mean that Photon currently does not support Unreal Linux builds

  • juaxix
    juaxix ✭✭
    edited October 5

    I tried with this:

    PublicDefinitions.Add("UE4_LINUX_USE_LIBCXX=0");
    

    resulting in the same errors:

    2>ld.lld : error : undefined symbol: std::ios_base::Init::Init()
    2>  >>> referenced by JString.cpp
    2>  >>>               JString.o:(_GLOBAL__sub_I_JString.cpp) in archive Z:/PC/PhotonCloudAPI_UE4/PhotonVoiceIntegration/Plugins/PhotonCloudAPI/Source/ThirdParty/Photon/lib/Linux/libCommonRelease64.a
    2>  >>> referenced by Logger.cpp
    2>  >>>               Logger.o:(_GLOBAL__sub_I_Logger.cpp) in archive Z:/PC/PhotonCloudAPI_UE4/PhotonVoiceIntegration/Plugins/PhotonCloudAPI/Source/ThirdParty/Photon/lib/Linux/libCommonRelease64.a
    2>  >>> referenced by LogFormatOptions.cpp
    2>  >>>               LogFormatOptions.o:(_GLOBAL__sub_I_LogFormatOptions.cpp) in archive Z:/PC/PhotonCloudAPI_UE4/PhotonVoiceIntegration/Plugins/PhotonCloudAPI/Source/ThirdParty/Photon/lib/Linux/libCommonRelease64.a
    2>  >>> referenced 96 more times