Failed export android project il2cpp

Hello,

I’m getting error when trying to build with IL2CPP for Android after switching from mono (need 64-bit architecture support). Can you help me please? Unity 2018.2.7f1


Unity log:

    Failed running /Applications/Unity-2018-2-7/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll --convert-to-cpp --emit-null-checks --enable-array-bounds-check --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a/libil2cpp.so" --cachedirectory="/Users/user/dev/project/project/Assets/../Library/il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="/Applications/Unity-2018-2-7/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" --additional-include-directories="/Applications/Unity-2018-2-7/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" --tool-chain-path="/Users/user/dev/android-ndk-r13b" --map-file-parser="/Applications/Unity-2018-2-7/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --assembly="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Managed/Assembly-CSharp-firstpass.dll" --assembly="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Managed/Assembly-CSharp.dll" --assembly="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Managed/UnityEngine.UI.dll" --assembly="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Managed/Facebook.Unity.Settings.dll" --assembly="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Managed/DOTween.dll" --assembly="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Managed/UnityEngine.Analytics.dll" --assembly="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Managed/UnityEngine.dll" --assembly="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Managed/Facebook.Unity.Android.dll" --assembly="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Managed/Facebook.Unity.IOS.dll" --assembly="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Managed/Stores.dll" --assembly="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Managed/System.dll" --assembly="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Managed/UnityEngine.Purchasing.dll" --assembly="/Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Managed/mscorlib.dll" --generatedcppdir="/Users/user/dev/project/project/Temp/StagingArea/Il2Cpp/il2cppOutput" 
    
    stdout:
    Building libil2cpp.so with AndroidToolChain
    	Output directory: /Users/user/dev/project/project/Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a
    	Cache directory: /Users/user/dev/project/project/Library/il2cpp_android_armeabi-v7a/il2cpp_cache
    ObjectFiles: 630 of which compiled: 0
    Total compilation time: 299 milliseconds.
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: /Users/user/dev/android-ndk-r13b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ @"/var/folders/dk/hmnf1kvs5496k984hvvg286w0000gn/T/tmpGKt5AJ.tmp" -o "/Users/user/dev/project/project/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/linkresult_6225392E6348EF06103BBD2F1BF75B47/libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "/Users/user/dev/android-ndk-r13b/platforms/android-16/arch-arm" -gcc-toolchain "/Users/user/dev/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "/Users/user/dev/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a" -lgnustl_static -llog -Xlinker -Map="/Users/user/dev/project/project/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/linkresult_6225392E6348EF06103BBD2F1BF75B47/libil2cpp.map" -rdynamic -fuse-ld=bfd
    
    clang++: error: unable to execute command: Segmentation fault: 11
    clang++: error: linker command failed due to signal (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: /Users/user/dev/android-ndk-r13b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ @"/var/folders/dk/hmnf1kvs5496k984hvvg286w0000gn/T/tmpGKt5AJ.tmp" -o "/Users/user/dev/project/project/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/linkresult_6225392E6348EF06103BBD2F1BF75B47/libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "/Users/user/dev/android-ndk-r13b/platforms/android-16/arch-arm" -gcc-toolchain "/Users/user/dev/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "/Users/user/dev/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a" -lgnustl_static -llog -Xlinker -Map="/Users/user/dev/project/project/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/linkresult_6225392E6348EF06103BBD2F1BF75B47/libil2cpp.map" -rdynamic -fuse-ld=bfd
    
    clang++: error: unable to execute command: Segmentation fault: 11
    clang++: error: linker command failed due to signal (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)
       at Program.Main(String[] args)
    
    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner:RunNetCoreProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:79)
    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:378)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection`1, String, String, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:361)
    UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:178)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Resolved by upgrading Unity to version 2018.3.6f1

hopefully this will sove your issue :slight_smile: