Search Unity

IL2Cpp with Unity 5.4 Linux Editor

Discussion in 'Linux' started by Joe-Abd-Halim, Aug 22, 2016.

  1. Joe-Abd-Halim

    Joe-Abd-Halim

    Joined:
    Aug 22, 2016
    Posts:
    5
    Hi all,

    Sorry if this has been asked before as I've already searched the forum here but couldn't get any result on it. I'm trying to get some simple samples to compile to an .apk using IL2Cpp just to test it out, but every time it seems that the Editor couldn't find NDK r10e, even though the NDK is properly installed. The NDK that I got is a r10e-rc4 (64-bit).

    I'm not sure if this information helps but my system is Fedora 24 with LLVM and clang version 3.8, and gcc 6.1.1.

    How should I go about it to get this solved?

    Thank you very much.

    cheers,
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Can you provide the specific error messages that occur when this happens? They might help use track down the cause of the issue.
     
  3. Joe-Abd-Halim

    Joe-Abd-Halim

    Joined:
    Aug 22, 2016
    Posts:
    5
    Hi,

    Thanks for the reply. There was a pop up window stating that the NDK version is invalid and "Unable to detect NDK version, please pick a different folder". Unity specifically asked for NDK version 10e to be installed, and the latest from NDK 10e of Linux's version is 10e-rc4 as stated in the NDK's RELEASE.TXT file.

    I also tried to get answers from other sites such as stackoverflow for the above problem, and from what I read, Unity will ask for a very specific version of NDK or otherwise it won't recognize it. So I was wondering did I actually install the right NDK version (r10e-rc4) for Unity 5.4.0.p1?

    Thanks.

    EDIT:

    Here's the output from the console;

    (.TargetArchCompilerSettings[] targetArchitectures, System.String unityEngineVariation, Boolean developmentBuild)
    UnityEditor.Android.AndroidIl2CppPlatformProvider.CreateNativeCompiler ()
    UnityEditorInternal.IL2CPPBuilder.Run () (at /home/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:215)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean developmentBuild) (at /home/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:132)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.PrepareIl2cppFiles (UnityEditor.Android.PostProcessor.PostProcessorContext context, UnityEditor.Android.AndroidIl2CppPlatformProvider provider)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    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)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    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, UnityEditor.BuildReporting.BuildReport report) (at /home/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:176)
    UnityEditor.HostView:OnGUI()
     
  4. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    It looks like the android ndk selection when building for il2cpp may need some additional love to work with the Linux editor - we'll remedy that in an upcoming build.
    Until then, you may be able to work around this locally by symlinking or copying your linux-x86 toolchain folder (e.g. $ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86) to darwin-x86_64.
     
    mosaic_school likes this.