Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Buidling IL2CPP Failing on Macbook

Discussion in 'Android' started by Rachzella, Sep 4, 2019.

  1. Rachzella

    Rachzella

    Joined:
    Oct 9, 2015
    Posts:
    78
    Unity Android building for 64 bit is failing every time now when I try to export the project. I have looked for a solution for over a month now but every post I make doesn't get an answer. please, someone, help me fix it.

    The problem happens when the build is at the Building Native IL2CPP Binary. it gets stuck there for some time. And then just cuts of the build and writes in the console 5 errors. What I see it fails to open IL2CPP.dll in the editor directory. I don't know why this happens since everything is installed with Unity Hub (version 2019.3.0b2) on Macbook. With NDK 19, and SDK 29. Also crashes on SDK 28.
    Another error shows this line: UnityEngine.GUIUtility: processEvent(Int32, IntPtr)
    And another one hits in the location from MonoBuild. Even though I don't use MonoDevelop. but use Visual Studio Code.
    Please if someone can help me, I love making games,
    and I want to share them but this is turning into a stressful hobby.
    If anyone needs more to work with such as editor logs, please tell me. and I'll give it.
     
    Last edited: Sep 4, 2019
  2. Rachzella

    Rachzella

    Joined:
    Oct 9, 2015
    Posts:
    78

    Attached Files:

  3. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,771
    It looks like IL2CPP is having trouble locating the Android NDK, and specifically, the clang++ C++ compiler executable in the NDK. Can you make sure that you have the proper version of the NDK installed and the path to the NDK in the Unity Editor preferences dialog is pointing to the path where the NDK is installed?
     
  4. Rachzella

    Rachzella

    Joined:
    Oct 9, 2015
    Posts:
    78
    I downloaded the version r19c from google (MacOS one) and i have selected the sdk path but there are other SDKs located in the parent directory, does this cause conflicts? it's Unity 2019.3.0b1
     

    Attached Files:

  5. Rachzella

    Rachzella

    Joined:
    Oct 9, 2015
    Posts:
    78
    Here is the current location of said SDK the R19 one.
     

    Attached Files:

  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,771
    I don't think other SDKs in the parent directory will cause a problem.

    Unity seems to indicate that the wrong NDK version is being used though - notice that warning message. I'm not sure how to check in the NDK itself for its version number, but that is probably worth doing. Maybe there is some slight difference that matters.
     
  7. Rachzella

    Rachzella

    Joined:
    Oct 9, 2015
    Posts:
    78
    The source.properties says the following
    Pkg.Desc = Android NDK
    Pkg.Revision = 19.0.5232133
     

    Attached Files:

  8. Rachzella

    Rachzella

    Joined:
    Oct 9, 2015
    Posts:
    78
    So it is the official "supported" version. and the same one that is been installed with unity. https://developer.android.com/ndk/downloads/older_releases.html the r19c version is downloaded from here. So there shouldn't be tampered with either.
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,771
    I'm not sure why this does not work. I'll talk with our mobile team to find out.
     
  10. Rachzella

    Rachzella

    Joined:
    Oct 9, 2015
    Posts:
    78
    Can you give me a update when you know more? really want to get started with building again. Thank you
     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,771
    Yes, I'll see what we can determine.
     
    Rachzella likes this.
  12. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    824
    Hello,
    your messages contain some inconsistent information. At first you've said that you are using Unity 2019.3.0b2 and NDK / SDK installed from the hub, but then you've said you are using Unity 2019.3.0b1 and NDK r19c downloaded from the developer.android.com. We don't support android NDK r19c, but the version you've specified (and the directory name) is definitely from the r19, so that should be fine, unless you've done some manual renaming / version changes / copying of files from one version to another. You have probably tried different Unity versions and different ways of acquiring NDK in order to make this work. Please try the latest beta version and only use the NDK downloaded from the HUB.
    The error that you get hints at what Josh has said in his first reply
    . You could do a quick sanity check and see if clang++ is present in your ndk at "/Volumes/WD 5TB Macbook Hard Drive/Unity Editors/SDK/android-ndk-r19/toolchains/llvm/prebuilt/darwin-x86_64\bin\clang++".
     
  13. Rachzella

    Rachzella

    Joined:
    Oct 9, 2015
    Posts:
    78
    It doesn’t have a Darwin directory. Also i checked your advice to see the version. But indeed it doesn’t accept the r19 one from google cause it’s c and higher version. I don’t know why it wouldn’t be the same version. Since the linked ndk doesn’t give me a version error. And I normally wouldn’t download important parts like NDKs, from a different website then the official releaser. What I did do is take a look in the modules.json and found a direct download link to a ndk containing Darwin in the name. From dl.google something. As well when I look at the R19 and r19c the r19 c doesn’t show file extensions and doesn’t open to visual code. And the r19 one does show .cmd and opens in visual code. I did read often times .exe in the console. Do you recon I installed the windows version of it somehow?
     
  14. Rachzella

    Rachzella

    Joined:
    Oct 9, 2015
    Posts:
    78
    And to your first part I’m indeed using unity 2019.3.0b1 and installed the ndk, sdk and openjdk with unity hub. But I unchecked the ndk one and replaced it with my own download from Google’s site. And I don’t use the 2019.3.0b2 that was a typo and the 2 is supposed to be a 1
     
  15. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    824
    Yes, it seems that you have installed the windows version. Once you'll install the osx version it should be fine. (you can get it either from the hub or from the developer.android, just go to r19c download, copy the direct link to the zip file and delete the c letter after r19. This way you should get the correct verion.
     
    Rachzella likes this.
  16. Rachzella

    Rachzella

    Joined:
    Oct 9, 2015
    Posts:
    78
    That one didn’t work. But i did download the one listed in modules.json and that is working fine. Thanks for helping me solve this problem!