Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Feedback Having issue making IL2CPP build for android with 64 bit

Discussion in 'Android' started by BAGstudios, Jun 27, 2019.

  1. BAGstudios

    BAGstudios

    Joined:
    Jan 29, 2018
    Posts:
    1
    Failed running C:\Program Files\Unity 2018.2.7\Unity\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityjit" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity 2018.2.7\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity 2018.2.7\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/NDK/android-ndk-r13b" --map-file-parser="C:\Program Files\Unity 2018.2.7\Unity\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --assembly="D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp-firstpass.dll" --assembly="D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp.dll" --assembly="D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Temp\StagingArea\assets\bin\Data\Managed\Assembly-UnityScript-firstpass.dll" --assembly="D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Temp\StagingArea\assets\bin\Data\Managed\Assembly-UnityScript.dll" --assembly="D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.UI.dll" --assembly="D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Temp\StagingArea\assets\bin\Data\Managed\GUIAnimatorFREE.dll" --assembly="D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Analytics.dll" --assembly="D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.dll" --generatedcppdir="D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Temp\StagingArea\Il2Cpp\il2cppOutput"
    stdout:
    Building libil2cpp.so with AndroidToolChain
    Output directory: D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    Cache directory: D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
    ObjectFiles: 631 of which compiled: 78
    Time Compile: 20679 milliseconds Il2CppAttributes.cpp
    Time Compile: 18678 milliseconds Bulk_Assembly-CSharp_11.cpp
    Time Compile: 14456 milliseconds Il2CppInvokerTable.cpp
    Time Compile: 12966 milliseconds Bulk_Assembly-CSharp_3.cpp
    Time Compile: 10993 milliseconds Bulk_Assembly-CSharp_8.cpp
    Time Compile: 10840 milliseconds Bulk_Assembly-CSharp_5.cpp
    Time Compile: 10763 milliseconds Bulk_Assembly-CSharp_10.cpp
    Time Compile: 10663 milliseconds Bulk_Assembly-CSharp_6.cpp
    Time Compile: 10646 milliseconds Il2CppTypeDefinitions.cpp
    Time Compile: 10643 milliseconds Il2CppMetadataUsage.cpp
    Total compilation time: 60006 milliseconds.
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\NDK\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\Hunain Nazim\AppData\Local\Temp\tmp2096.tmp" -o "D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_1DB319C0009B1631256D20AB8D2ED191\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\NDK\android-ndk-r13b\platforms\android-16\arch-arm" -gcc-toolchain "C:\NDK\android-ndk-r13b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\NDK\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -Xlinker -Map="D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_1DB319C0009B1631256D20AB8D2ED191\libil2cpp.map" -rdynamic -fuse-ld=bfd.exe
    D:/Projects/BAG Studios/Airplane Hijack/Airplane Hijack/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/7842CA330579F0E4E750DD303F3309E7.o: In function `GKAchievementReporter__ReportAchievement_m3441543238':
    D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp-firstpass_2.cpp:40933: undefined reference to `_ReportAchievement'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    stderr:
    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\NDK\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\Hunain Nazim\AppData\Local\Temp\tmp2096.tmp" -o "D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_1DB319C0009B1631256D20AB8D2ED191\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\NDK\android-ndk-r13b\platforms\android-16\arch-arm" -gcc-toolchain "C:\NDK\android-ndk-r13b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\NDK\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -Xlinker -Map="D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_1DB319C0009B1631256D20AB8D2ED191\libil2cpp.map" -rdynamic -fuse-ld=bfd.exe
    D:/Projects/BAG Studios/Airplane Hijack/Airplane Hijack/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/7842CA330579F0E4E750DD303F3309E7.o: In function `GKAchievementReporter__ReportAchievement_m3441543238':
    D:\Projects\BAG Studios\Airplane Hijack\Airplane Hijack\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp-firstpass_2.cpp:40933: undefined reference to `_ReportAchievement'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:380)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection`1, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:361)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:178)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  2. haris-tcc21

    haris-tcc21

    Joined:
    Nov 11, 2017
    Posts:
    2
    Please put the ndk folder into c drive.Space of c drive should be more then 20GB. Same problem was solved from my side.
     
  3. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    2,744
    You're calling _ReportAchievement function, which is not available. Either don't call that function, or provide implementation
     
unityunity