Forum Mobile IL2CPP building to Android and IOS Errors

Anything specifically relating to droid or iOS development with Unity can go here.

IL2CPP building to Android and IOS Errors

Postby tripknotix » September 27th, 2015, 9:56 am

Unity now allows you to build with IL2CPP which is faster on devices, however, when compiling to android, i get this error.

I am assuming this is the same issue others are talking about when building to IOS using IL2CPP.

"C:\Program Files (x86)\Unity521\Editor\Data\PlaybackEngines\androidplayer\Variations\il2cpp\Development/StaticLibs/armeabi-v7a" -lil2cpp -lbdwgc -L C:/android-ndk32-r10b-windows-x86/android-ndk-r10b/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a -lgnustl_static

Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_PlayerIOUnity3DClient_1.cpp:1139: error: undefined reference to '__PlayerIO_PlayLink_InstallCheck'

clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

System.Exception: IL2CPP compile failed.

at NativeCompiler.RunProgram (System.Diagnostics.ProcessStartInfo startInfo) [0x000dc] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\NativeCompiler.cs:62

at NativeCompiler.Execute (System.String arguments, System.String compilerPath) [0x0000f] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\NativeCompiler.cs:26

at UnityEditor.Android.AndroidIl2CppClangCompiler.Link (UnityEditor.Android.TargetArchCompilerSettings target, System.String outFile, IEnumerable`1 sourceFiles, IEnumerable`1 libraries, IEnumerable`1 libraryPaths) [0x00000] in <filename unknown>:0

at UnityEditor.Android.AndroidIl2CppClangCompiler+<CompileDynamicLibrary>c__AnonStorey2.<>m__7 (UnityEditor.Android.TargetArchCompilerSettings target) [0x00000] in <filename unknown>:0

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

Exception: IL2CPP Linkage failed
at UnityEditor.Android.AndroidIl2CppClangCompiler.CompileDynamicLibrary (System.String outFile, IEnumerable`1 sourceFiles, IEnumerable`1 includePaths, IEnumerable`1 libraries, IEnumerable`1 libraryPaths) [0x00000] in <filename unknown>:0

at UnityEditorInternal.IL2CPPBuilder.Run () [0x000e1] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:308

at UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) [0x0000c] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:211

at UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) [0x00000] in <filename unknown>:0

at UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) [0x00000] in <filename unknown>:0

at UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args) [0x00000] in <filename unknown>:0

at UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) [0x000c5] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\PostprocessBuildPlayer.cs:316
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, BuildTarget, BuildOptions, Boolean, UInt32&)
UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings(Boolean, BuildOptions, Boolean) (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:583)
UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings(Boolean, BuildOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:431)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:408)

(Filename: C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs Line: 308)

DisplayProgressNotification: Build Failed
Error building Player: Exception: IL2CPP Linkage failed
tripknotix
Paid Member
 
Posts: 28
Joined: March 12th, 2010, 11:00 am

Re: IL2CPP building to Android and IOS Errors

Postby Guillaume » September 27th, 2015, 12:45 pm

Have you tried to compile with Mono for Android ?
I think PlayerIO has never been tested / validated with Android IL2CPP. However it works fine under Mono for Android.

PlayerIO works correctly with iOS IL2CPP.
If you have an error with iOS IL2CPP, please post your error stack trace.

I have some doubt about the Android IL2CPP compilation stability, as it took some months to Unity Team to give a stable IL2CPP for iOS. And IL2CPP for Android is not mandatory to your game publication. It was for iOS because Apple made apps with 32 bit + 64 bit compatibility mandatory.
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: IL2CPP building to Android and IOS Errors

Postby tripknotix » September 27th, 2015, 2:29 pm

Yes ofcourse, my games on the store already, but im trying to get more native performance, my audience has a lot of low end devices, but they continue to support my game and give me plenty of ad views. my 2nd game to almost hit 500,000 downloads =D 476,000 so far https://play.google.com/store/apps/deta ... OnlineFree
tripknotix
Paid Member
 
Posts: 28
Joined: March 12th, 2010, 11:00 am

Re: IL2CPP building to Android and IOS Errors

Postby Guillaume » September 27th, 2015, 5:09 pm

Are compiling with .NET 2.0 or .NET 2.0 Subset ? I know that i have some linking error when using .NET 2.0 Subset but only with iOS and IL2CPP, no problems when using .NET 2.0.

You may try to test .NET 2.0 with IL2CPP and Android. Then if it works, see if you can find the problematic excluded namespace, and add it on the link.xml list, or just let .NET 2.0 if it correct the problem.

Or maybe Henrik of PlayerIO/YGN can do something...Or maybe you have to report this compilation error to Unity (Submit a bug case). I done this when PlayerIO was not working with IL2CPP, some months ago.
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: IL2CPP building to Android and IOS Errors

Postby tripknotix » September 27th, 2015, 11:59 pm

I just tried with .NET 2.0 instead of subset and the same error showed, and it took a lot longer to compile as well.

Unfortunate.

I will see if i can get around to sending a blank project with the il2cpp and playerio demo only.

If youve done this before, that would be great if you could send a quick proj over to unity, but i'll get around to it tomorrow.
tripknotix
Paid Member
 
Posts: 28
Joined: March 12th, 2010, 11:00 am

Re: IL2CPP building to Android and IOS Errors

Postby Guillaume » September 28th, 2015, 12:22 am

I can't help you for this problem, because i'm only using Unity 4.x at the moment, because i need 4.x Project compatibility in order to compile my game in Flash.
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: IL2CPP building to Android and IOS Errors

Postby tripknotix » September 28th, 2015, 6:01 am

I completely understand, i wanted to use unity to compile to flash as well, but looks like webgl 2 (opengl es3.0) is going to be the version where i will return to web games.

Does playerio work on unity-flash ?
tripknotix
Paid Member
 
Posts: 28
Joined: March 12th, 2010, 11:00 am

Re: IL2CPP building to Android and IOS Errors

Postby Guillaume » September 28th, 2015, 12:21 pm

PlayerIO does not work out of the box for Unity Flash but works with Flash, so to be able to be compatible with Unity Flash, i developed some bridge code, that call the native Flash code and so the native AS3 PlayerIO library, and then i JSON-ise and rebuild the data format expected by the C# version (even if in reality its already converted to AS3), then i call my callback function with the simulated result.

This way, i'm able to use the same API for every platform, as all my game logic will fire the native code if necessary.

I developed 2 library:

- A Fake PlayerIO implementation, that only mimic the method call structure and callbacks. The implementation is linked at runtime to a persistant MonoBehavior that is also referenced in my native code implementation. This interface will call some method in my monobehavior that will call the native code implementation, then will fire the delegates when its finished.

- Native code implementation. This SWF file embed the native code that is required and where i have coded the real implementation of PlayerIO/calls, and also embed the Unity.swf file that i build with Unity.

If you want some hint about this, i took my inspiration on this tutorial of Robert Crane of Rocket Bunny Games. The only difference is that i developed a Fake PlayerIO interface in order to have only one base code for every game, definitively, with PlayerIO.

Take a look at this file attached.

UnityFlashAndPlayerIO.zip

https://www.dropbox.com/s/1dlw9k4bg96kp ... O.zip?dl=0

I didn't took the WebGL path because of the lack of support from PlayerIO at the moment (maybe forever ?), and i didn't took the path of WebPlayer too because my game is not attended for "Hardcore gamer", and so i don't want to bother my players to "think" on how to install the Webplayer plugin. Mainly because Google Chrome block any NPAPI plugin...Like the Webplayer.
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: IL2CPP building to Android and IOS Errors

Postby tripknotix » December 11th, 2015, 3:45 pm

I still get this same error with the newest yahoo games and newest unity, with newest Android NDK


Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_PlayerIOUnity3DClient_1.cpp:1972: error: undefined reference to '__PlayerIO_PlayLink_InstallCheck'

Is there any chance you guys are working on it? or have a solution for it?

trying to get il2cpp working so i can get more performance on devices.
tripknotix
Paid Member
 
Posts: 28
Joined: March 12th, 2010, 11:00 am

Re: IL2CPP building to Android and IOS Errors

Postby Evgeniy_Eliseev » October 23rd, 2016, 5:05 pm

Android IL2CPP is out of beta in Unity 5.4.
But PlayerIO still not compilable :|
Evgeniy_Eliseev
 
Posts: 5
Joined: September 14th, 2015, 8:52 pm


Return to Mobile