Unity Android IL2CPP Fail compilation

+4 votes
asked May 31, 2018 by rekkuzan (360 points)
Hello,

I'm developing AR project under Unity targeting mobile platform (Android/iOS). I have no issue compiling to iOS with IL2CPP scripting backend and to Android with Mono.

However, I would like to switch to IL2CPP for Android but EasyAR (2.2) doesn't compile with IL2CPP

il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: E:\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"AppData\Local\Temp\tmp705D.tmp" -o "Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_4B4F8ABC2EC287290E677C3020A99D69\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "E:\android-ndk-r13b\platforms\android-16\arch-arm" -gcc-toolchain "E:\android-ndk-r13b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "E:\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -Xlinker -Map="E:\UnityProjects\hackeo2018\hackeo-app-v2\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_4B4F8ABC2EC287290E677C3020A99D69\libil2cpp.map" -rdynamic -fPIE -pie -fuse-ld=bfd.exe

clang++.exe: warning: argument unused during compilation: '-pie'

Library\il2cpp_android_armeabi-v7a\il2cpp_cache\4D5C6C7D9240A67F09DE2FF20187CD5F.o: In function `EngineNativeIOS_ezarRegisterLogFunc_m1747642220':

Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_EasyAR.Unity_0.cpp:28882: undefined reference to `ezarRegisterLogFunc'

Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_EasyAR.Unity_0.cpp:28882: undefined reference to `ezarRegisterLogFunc'

Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_EasyAR.Unity_0.cpp:28882: undefined reference to `ezarRegisterLogFunc'

Library\il2cpp_android_armeabi-v7a\il2cpp_cache\4D5C6C7D9240A67F09DE2FF20187CD5F.o: In function `EngineNativeIOS_ezarNativeInit_m1734653537':

Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_EasyAR.Unity_0.cpp:28916: undefined reference to `ezarNativeInit'

Library\il2cpp_android_armeabi-v7a\il2cpp_cache\4D5C6C7D9240A67F09DE2FF20187CD5F.o: In function `EngineNativeIOS_ezarSetAssetPath_m17138576':

Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_EasyAR.Unity_0.cpp:28864: undefined reference to `ezarSetAssetPath'

Library\il2cpp_android_armeabi-v7a\il2cpp_cache\4D5C6C7D9240A67F09DE2FF20187CD5F.o: In function `EngineNativeIOS_ezarNativeInit_m1734653537':

Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_EasyAR.Unity_0.cpp:28916: undefined reference to `ezarNativeInit'

Library\il2cpp_android_armeabi-v7a\il2cpp_cache\4D5C6C7D9240A67F09DE2FF20187CD5F.o: In function `EngineNativeIOS_ezarSetAssetPath_m17138576':

Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_EasyAR.Unity_0.cpp:28864: undefined reference to `ezarSetAssetPath'

Library\il2cpp_android_armeabi-v7a\il2cpp_cache\4D5C6C7D9240A67F09DE2FF20187CD5F.o: In function `EngineNativeIOS_ezarOnResume_m3394444964':

Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_EasyAR.Unity_0.cpp:28892: undefined reference to `ezarOnResume'

Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_EasyAR.Unity_0.cpp:28892: undefined reference to `ezarOnResume'

Library\il2cpp_android_armeabi-v7a\il2cpp_cache\4D5C6C7D9240A67F09DE2FF20187CD5F.o: In function `EngineNativeIOS_ezarOnPause_m1242519696':

Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_EasyAR.Unity_0.cpp:28902: undefined reference to `ezarOnPause'

Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_EasyAR.Unity_0.cpp:28902: undefined reference to `ezarOnPause'

Library\il2cpp_android_armeabi-v7a\il2cpp_cache\4D5C6C7D9240A67F09DE2FF20187CD5F.o: In function `EngineNativeIOS_ezarSetAssetPath_m17138576':

Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_EasyAR.Unity_0.cpp:28864: undefined reference to `ezarSetAssetPath'

... and some more.

It seems it tried to compile with iOS specific code ?

I even tried with the x64 version of EasyAR with the same result. Is EasyAR not compatible for IL2CPP for Android for now ? And will it be in future release. Or Am I doing something wrong ?

Thanks for reading.

2 Answers

+5 votes
answered Jun 1, 2018 by albert52 (31,850 points)

Android: IL2CPP support is not included in the official EasyAR Unity Plugin, we will add support in later versions. But if you are writing your own EasyAR Plugin for Unity, you can always enable IL2CPP support.

More details : https://www.easyar.com/doc/EasyAR%20SDK/Getting%20Started/2.0/Platform-Requirements.html 

commented Oct 30, 2018 by rekkuzan (360 points)
Hello,

I just download and tried the 2.3 version of EasyAR plugin for Unity. Related to my first post, I tried again to switch to IL2CPP for Android, but I encountered the very same issues.

I am aware that IL2CPP is not yet included in the official EasyAR plugin, but do I have to write my own implementation of EasyAR to make it works for Il2CPP ? Based on the native plugin (Android and iOS) ?

How are we supposed to use the arm64 binaries delivered in the unity_extra ?(Since ARM64 is only available with IL2CPP)

It's kind of an issue here to not be able to meet the future requirement of Android platform. (https://blogs.unity3d.com/2017/12/20/meeting-google-play-requirements-in-the-future/)

I hope a future update will enable the IL2CPP script backend.

Thank for reading.
commented Oct 30, 2018 by kenn (18,750 points)
Thank you for the reminder.
We have did a lot of  refactoring for the Unity plugin. IL2CPP support has already been tested and it will work in EasyAR SDK 3.0. We will make EasyAR Unity plugin open source at the same time. I cannot assure too much about the release date now, but it won't be too far away.
commented Oct 31, 2018 by rekkuzan (360 points)
Thank you for your reactive reply and all these informations. I will wait for this update. If your team ever needs to perform some beta testing with external projects before the release, I would be delighted to help.

Thank you for your work.
commented Apr 26, 2019 by richardroussel (520 points)
Hi EasyAR team !

last October, we  were "not too far away" from an il2cpp friendly version, allowing us to perform 64 bits release.   We are now April, and google play will force us to release armV8 in 3 months !!

do you expect us to wait last week of July to get it ?

a little transparency on your process will help us to plan ahead.

When is il2cpp support due ?
commented May 10, 2019 by magnetica (290 points)
same problem here.
we have to release soon a 64bit version, or look for a different SDK.
please give some feedback.

thanks
commented Jun 3, 2019 by louisgamedev (140 points)
Still nothing?
+4 votes
answered Oct 30, 2018 by rekkuzan (360 points)
edited Oct 30, 2018 by rekkuzan
I switch my message to comment.
commented May 21, 2019 by koceila (100 points)
any news about il2cpp support because we have until 1 august to release an app that support arm64
i recived this message when uploading the apk to playstore "From August 1, 2019 all releases must be compliant with the Google Play 64-bit requirement." , any news about the release would be great
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...