Search Unity

Gameroom no longer builds under il2cpp, can't use mono in 2018.3

Discussion in 'Windows' started by SevenPointRed, Jan 3, 2019.

  1. SevenPointRed

    SevenPointRed

    Joined:
    Feb 3, 2016
    Posts:
    218
    I sent a bug report a few weeks ago: 1110328, I've had no reply and nothing will fix this. We can no longer put out updates for Facebook.

    Code (CSharp):
    1. Msvc Install Version: 15.0
    2.     Msvc Install SDK Directory: C:\Program Files (x86)\Windows Kits\10
    3.     Msvc Linker Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\link.exe
    4.     Msvc Compiler Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe
    5.  
    Error log:

    Code (CSharp):
    1. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol init referenced in function CanvasJSWrapper_Init_m2F980E73FF8DBC760AA5A076B8C4C39198F70670
    2. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol login referenced in function CanvasJSWrapper_Login_m1BAA689B20B6999B63E515F704C916A48B662BD8
    3. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol logout referenced in function CanvasJSWrapper_Logout_m81865AF9A150C8098F60D39B11094C01C09F02A0
    4. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol activateApp referenced in function CanvasJSWrapper_ActivateApp_m4DF67DEF964B4D477968CF38C97EC7C2D83E5C25
    5. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol logAppEvent referenced in function CanvasJSWrapper_LogAppEvent_m346C603EE3B2D7C9BC79722E004775D95DBF75F5
    6. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol logPurchase referenced in function CanvasJSWrapper_LogPurchase_m92B77580E0CD6E1A8C76AE016D6C88F68212F98A
    7. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol ui referenced in function CanvasJSWrapper_Ui_mB952AAA608C0EFCDD15F2765BCEBF105BA123D37
    8. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol initScreenPosition referenced in function CanvasJSWrapper_InitScreenPosition_mE9742A066891B8035FDEF7AC7F34BCFC9C640E73
    9. F:\Git\Expanse2018\Client\Library\il2cpp_cache\linkresult_A23628CB7EAEA3DC4860FBA0ACD9DA34\GameAssembly.dll : fatal error LNK1120: 8 unresolved externals
    10.  
    11.    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    12.    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    13.    at il2cpp.Program.DoRun(String[] args)
    14.    at il2cpp.Program.Run(String[] args)
    15.    at il2cpp.Program.Main(String[] args)
    16. stderr:
    17.  
    18. Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\link.exe /out:"F:\Git\Expanse2018\Client\Library\il2cpp_cache\linkresult_A23628CB7EAEA3DC4860FBA0ACD9DA34\GameAssembly.dll" /DEBUG /INCREMENTAL:NO /LARGEADDRESSAWARE /NXCOMPAT /DYNAMICBASE /NOLOGO /TLBID:1 /OPT:REF /OPT:ICF /HIGHENTROPYVA /DLL /NODEFAULTLIB:uuid.lib "kernel32.lib" "user32.lib" "advapi32.lib" "ole32.lib" "oleaut32.lib" "Shell32.lib" "Crypt32.lib" "psapi.lib" "version.lib" "MsWSock.lib" "ws2_32.lib" "Iphlpapi.lib" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\lib\x64" /SUBSYSTEM:WINDOWS @"C:\Users\xxx\AppData\Local\Temp\tmp21CA.tmp"
    19.  
    20. Creating library F:\Git\Expanse2018\Client\Library\il2cpp_cache\linkresult_A23628CB7EAEA3DC4860FBA0ACD9DA34\GameAssembly.lib and object F:\Git\Expanse2018\Client\Library\il2cpp_cache\linkresult_A23628CB7EAEA3DC4860FBA0ACD9DA34\GameAssembly.exp
    21. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol init referenced in function CanvasJSWrapper_Init_m2F980E73FF8DBC760AA5A076B8C4C39198F70670
    22. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol login referenced in function CanvasJSWrapper_Login_m1BAA689B20B6999B63E515F704C916A48B662BD8
    23. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol logout referenced in function CanvasJSWrapper_Logout_m81865AF9A150C8098F60D39B11094C01C09F02A0
    24. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol activateApp referenced in function CanvasJSWrapper_ActivateApp_m4DF67DEF964B4D477968CF38C97EC7C2D83E5C25
    25. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol logAppEvent referenced in function CanvasJSWrapper_LogAppEvent_m346C603EE3B2D7C9BC79722E004775D95DBF75F5
    26. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol logPurchase referenced in function CanvasJSWrapper_LogPurchase_m92B77580E0CD6E1A8C76AE016D6C88F68212F98A
    27. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol ui referenced in function CanvasJSWrapper_Ui_mB952AAA608C0EFCDD15F2765BCEBF105BA123D37
    28. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol initScreenPosition referenced in function CanvasJSWrapper_InitScreenPosition_mE9742A066891B8035FDEF7AC7F34BCFC9C640E73
    29. F:\Git\Expanse2018\Client\Library\il2cpp_cache\linkresult_A23628CB7EAEA3DC4860FBA0ACD9DA34\GameAssembly.dll : fatal error LNK1120: 8 unresolved externals
    30.  
    31.    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    32.    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    33.    at il2cpp.Program.DoRun(String[] args)
    34.    at il2cpp.Program.Run(String[] args)
    35.    at il2cpp.Program.Main(String[] args)
    36.  
    37. UnityEngine.Debug:LogError(Object)
    38. UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    39. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    40. UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:368)
    41. UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:349)
    42. UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    43. UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:42)
    44. DesktopStandalonePostProcessor:SetupStagingArea(BuildPostProcessArgs, HashSet`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:245)
    45. DesktopStandalonePostProcessor:PostProcess(BuildPostProcessArgs) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:46)
    46. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
     
  2. SevenPointRed

    SevenPointRed

    Joined:
    Feb 3, 2016
    Posts:
    218
    On another note, if you dont use the package manager and use the github download I can almost build but get the error:

    Code (CSharp):
    1. C:\Program Files\Unity\Hub\Editor\2018.3.0f2\Editor\Data\PlaybackEngines\Facebook\Variations\win64_nondevelopment_il2cpp\WindowsPlayer.exe does not exist
    It seems the Facebook\Variations folder doesn't contain any folders for il2cpp, only mono.
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Looks like you have bunch of "[DllImport("__Internal")]" methods without any definitions, and it causes linker errors:

    Code (csharp):
    1. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol init referenced in function CanvasJSWrapper_Init_m2F980E73FF8DBC760AA5A076B8C4C39198F70670
    2. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol login referenced in function CanvasJSWrapper_Login_m1BAA689B20B6999B63E515F704C916A48B662BD8
    3. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol logout referenced in function CanvasJSWrapper_Logout_m81865AF9A150C8098F60D39B11094C01C09F02A0
    4. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol activateApp referenced in function CanvasJSWrapper_ActivateApp_m4DF67DEF964B4D477968CF38C97EC7C2D83E5C25
    5. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol logAppEvent referenced in function CanvasJSWrapper_LogAppEvent_m346C603EE3B2D7C9BC79722E004775D95DBF75F5
    6. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol logPurchase referenced in function CanvasJSWrapper_LogPurchase_m92B77580E0CD6E1A8C76AE016D6C88F68212F98A
    7. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol ui referenced in function CanvasJSWrapper_Ui_mB952AAA608C0EFCDD15F2765BCEBF105BA123D37
    8. 7C3C6F281F61DBA63CF42BE4B3B25FAF.obj : error LNK2019: unresolved external symbol initScreenPosition
    It seems this code is part of facebook SDK. They have a known issue: https://github.com/facebook/facebook-sdk-for-unity/issues/135

    You have two options:

    1. Switch to Mono scripting backend
    2. #ifdef them out
     
  4. SevenPointRed

    SevenPointRed

    Joined:
    Feb 3, 2016
    Posts:
    218
    Thanks for the reply, will the other issue be fixed soon? If you are removing mono support you still can't build il2cpp for facebook due to it missing the standalone exe variations.

    EDIT:

    I can't use ifdef as the dlls are provided via package manager. I can only do that if i use the sdk download, but that will then include itself in the project for other platforms. We only use the Facebook SDK for Gameroom and don't want it on mobile, so we can't use the download version without removing it every time we swap platforms.
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    We're not removing Mono support for Windows Standalone player. Where did you hear about that? It's here to stay.
     
  6. SevenPointRed

    SevenPointRed

    Joined:
    Feb 3, 2016
    Posts:
    218
    I remember reading that mono support is being removed and seeing it in the editor, I must have assumed that was for all platforms.

    So does that mean facebook gameroom won't get il2cpp support?
     
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    It is going to be removed for some platforms, but not Windows Standalone.

    Facebook gameroom isn't a real platform - it just builds the windows standalone build target. Since Windows Standalone supports IL2CPP, so does Facebook gameroom. Unfortunately I'm not too familiar with how the SDKs work and who owns the thing I linked to you. The bug is definitely in there, and people who maintain gameroom support on our side will know more than me. In any case, a workaround for you could be rebuilding those DLLs manually outside of Unity after deleting those DllImports, and configure the DLLs to only be used when targeting gameroom.
     
  8. SevenPointRed

    SevenPointRed

    Joined:
    Feb 3, 2016
    Posts:
    218
    I see, but the Gameroom target doesnt work with il2cpp as its missing files:

    Code (CSharp):
    1. C:\Program Files\Unity\Hub\Editor\2018.3.0f2\Editor\Data\PlaybackEngines\Facebook\Variations\win64_nondevelopment_il2cpp\WindowsPlayer.exe does not exist
    It seems the Facebook\Variations folder doesn't contain any folders for il2cpp, only mono.
     
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    That sounds like an oversight. Can we have a bug report on that too?
     
  10. SevenPointRed

    SevenPointRed

    Joined:
    Feb 3, 2016
    Posts:
    218
    Just sent, I've not got a confirmation email though so if it hasn't gone through I will do another.

    Edit: (Case 1114593) Facebook Gameroom target missing Standalone exe varients for il2cpp
     
  11. peekaboointeractive

    peekaboointeractive

    Joined:
    Jan 22, 2016
    Posts:
    9
    Avoid Gameroom. Waste of time. They allow you to go to all the trouble of porting a game, approve it, then dont allow it to be searchable even after you spent money on ads and porting the game. Then give you no reason/feedback on the decision, close the thread and thats it. Avoid like the plague!!
     
  12. peekaboointeractive

    peekaboointeractive

    Joined:
    Jan 22, 2016
    Posts:
    9
    Avoid Gameroom. Waste of time. They allow you to go to all the trouble of porting a game, approve it, then dont allow it to be searchable even after you spent money on ads and porting the game. Then give you no reason/feedback on the decision, close the thread and thats it. Avoid like the plague!!
     
  13. SevenPointRed

    SevenPointRed

    Joined:
    Feb 3, 2016
    Posts:
    218
    Gameroom has been good to us, its just that Unity takes forever to do any updates for it. I'm not sure they are even supporting it anymore as they silently removed the forum for it.
     
  14. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    How would you ifdef those issues out?
    Is there no plan for Facebook SDK to support IL2CPP on Windows?
     
  15. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Something like this:

    Code (csharp):
    1. class CanvasJSWrapper
    2. {
    3. #if !ENABLE_IL2CPP
    4.     [DllImport("__Internal")]
    5.     public static extern void Init();
    6. #endif
    7. }
    You would have to ask Facebook that. We do not produce this SDK.
     
    Meltdown likes this.