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

Absurdly long buildtime using IL2CPP on windows

Discussion in 'Editor & General Support' started by DevCas1, Mar 11, 2021.

  1. DevCas1

    DevCas1

    Joined:
    Sep 24, 2015
    Posts:
    21
    This has been going for two hours now...
    This shouldn't be normal. Any idea how to fix this? upload_2021-3-11_20-7-38.png
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,762
    Long build times is often lightmapping. Sometimes this is evident in the progress window, sometimes not.

    To isolate if this is the case, back up or source control your project, remove all scenes from the editor build settings, put one scene in with one cube and try to build.

    If that also takes forever, something really is wrong. Try the usual deinstall/reinstall steps, try another version of Unity, etc.

    Another thing to try is going into Library/ and removing the IL2CPP cache directory, then reopening Unity and retry the build.
     
    Joe-Censored likes this.
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    It shows you're on the step "Building native binary with IL2CPP". As a test, in Player settings switch over to creating a Mono build instead of IL2CPP, then create a build.

    You'll need to either delete the old build, or save the build in a new location, because it won't want to let you save a Mono build on top of an IL2CPP build.
     
    Kurt-Dekker likes this.
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,773
    @DevCas1

    Two hours in IL2CPP is way too long. Does the build eventually complete? If so, can you look in the folder created next to the player build? It should have a profile.json file next to the generated C++. That file can be loading in to the Chrome browser using chrome://tracing to view details about the build process.

    If that file exists, can you send it to me via private message? We would love to understand why this build takes so long.

    If the build does not complete, but just hangs, can you use Process Explorer to view the processes on this machine and let us know if there is only process that is hung for a long time? I'd love to know what process that is and what its command line is.
     
  5. DevCas1

    DevCas1

    Joined:
    Sep 24, 2015
    Posts:
    21
    Hi, I have no idea what happened in the meantime, but I just managed to complete an IL2CPP build to Windows 86x64. I managed to circumvent my previous issue with being unable to build at all by switching over to Windows 86x32. Tried removing and re-importing Burst compiler. Something must have happened somewhere, cause my x64 build finished within 10 minutes as a clean build (without anything to accelerate incremental build).