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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Emscrimpten/IL2CPP build errors - finding the problem

Discussion in 'WebGL' started by christuart, Sep 9, 2015.

  1. christuart

    christuart

    Joined:
    Aug 20, 2015
    Posts:
    5
    Hi everyone,

    I've just tried to convert a desktop project to WebGL for the first time, and encountered a couple of unreadable errors at build. I then updated to the latest public build of Unity Editor to see if that would fix the issue and I now have the old errors and a couple more I think...

    Now solved, so TL;DR: I got difficult to read errors when building in WebGL, Marco Trivellato spotted something in Error 1 below which suggested there was a problem in some script or other, turned out to be leftover scripts from a non-WebGL-compatible package for Kinect, as described in message #6​

    Error 1:
    Failed running "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" -Oz -std=c++11 -Wno-unused-value -Wno-invalid-offsetof -I-I"C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\bdwgc/include" -I"C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\libil2cpp/include" -I"C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput" -nostdinc -c @"C:\Users\cis24\AppData\Local\Temp\tmp5d88eb65.tmp"

    WARNING root: did not see a source tree above or next to the LLVM root directory (guessing based on directory of C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_FastComp_Win\llc), could not verify version numbers match
    INFO root: (Emscripten: Running sanity checks)
    WARNING root: java does not seem to exist, required for closure compiler, which is optional (define JAVA in ~/.emscripten if you want it)
    WARNING root: -I or -L of an absolute path "-IC:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\libil2cpp/include" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript). Pass '-Wno-warn-absolute-paths' to emcc to hide this warning.
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:1168:20: error: no matching function for call to 'il2cpp_codegen_marshal_wstring_result'
    _p1_unmarshaled = il2cpp_codegen_marshal_wstring_result(p1);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\libil2cpp/include\codegen/il2cpp-codegen.h:549:29: note: candidate function not viable: no known conversion from 'char *' to 'const uint16_t *' (aka 'const unsigned short *') for 1st argument
    inline Il2CppCodeGenString* il2cpp_codegen_marshal_wstring_result(const uint16_t* value)
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:1177:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m526_indirect = (const methodPointerType*)&native_delegate_wrapper_m526;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:1415:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m527_indirect = (const methodPointerType*)&native_delegate_wrapper_m527;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:1927:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m538_indirect = (const methodPointerType*)&native_delegate_wrapper_m538;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:2157:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m540_indirect = (const methodPointerType*)&native_delegate_wrapper_m540;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:2387:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m542_indirect = (const methodPointerType*)&native_delegate_wrapper_m542;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:14257:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m841_indirect = (const methodPointerType*)&native_delegate_wrapper_m841;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:14488:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m843_indirect = (const methodPointerType*)&native_delegate_wrapper_m843;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:17423:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m916_indirect = (const methodPointerType*)&native_delegate_wrapper_m916;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:21487:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1005_indirect = (const methodPointerType*)&native_delegate_wrapper_m1005;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:21718:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1007_indirect = (const methodPointerType*)&native_delegate_wrapper_m1007;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:26025:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1118_indirect = (const methodPointerType*)&native_delegate_wrapper_m1118;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:26256:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1120_indirect = (const methodPointerType*)&native_delegate_wrapper_m1120;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:30613:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1233_indirect = (const methodPointerType*)&native_delegate_wrapper_m1233;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:30844:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1235_indirect = (const methodPointerType*)&native_delegate_wrapper_m1235;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:36248:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1395_indirect = (const methodPointerType*)&native_delegate_wrapper_m1395;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:36479:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1397_indirect = (const methodPointerType*)&native_delegate_wrapper_m1397;
    ^
    16 warnings and 1 error generated.
    ERROR root: compiler frontend failed to generate LLVM bitcode, halting

    Error 2 (truncated so I can't even see the error...):
    Failed running "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" -Oz -std=c++11 -Wno-unused-value -Wno-invalid-offsetof -I-I"C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\bdwgc/include" -I"C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\libil2cpp/include" -I"C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput" -nostdinc -c @"C:\Users\cis24\AppData\Local\Temp\tmp7ca089ca.tmp"

    WARNING root: did not see a source tree above or next to the LLVM root directory (guessing based on directory of C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_FastComp_Win\llc), could not verify version numbers match
    INFO root: (Emscripten: Running sanity checks)
    WARNING root: java does not seem to exist, required for closure compiler, which is optional (define JAVA in ~/.emscripten if you want it)
    WARNING root: -I or -L of an absolute path "-IC:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\libil2cpp/include" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript). Pass '-Wno-warn-absolute-paths' to emcc to hide this warning.
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:1040:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1466_indirect = (const methodPointerType*)&native_delegate_wrapper_m1466;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:3172:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1520_indirect = (const methodPointerType*)&native_delegate_wrapper_m1520;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:3403:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1522_indirect = (const methodPointerType*)&native_delegate_wrapper_m1522;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:6442:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1594_indirect = (const methodPointerType*)&native_delegate_wrapper_m1594;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:6673:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1596_indirect = (const methodPointerType*)&native_delegate_wrapper_m1596;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:8805:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1645_indirect = (const methodPointerType*)&native_delegate_wrapper_m1645;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:9036:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1647_indirect = (const methodPointerType*)&native_delegate_wrapper_m1647;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:11213:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1699_indirect = (const methodPointerType*)&native_delegate_wrapper_m1699;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:11444:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1701_indirect = (const methodPointerType*)&native_delegate_wrapper_m1701;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:13701:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1753_indirect = (const methodPointerType*)&native_delegate_wrapper_m1753;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:13932:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1755_indirect = (const methodPointerType*)&native_delegate_wrapper_m1755;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:16173:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1807_indirect = (const methodPointerType*)&native_delegate_wrapper_m1807;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:16404:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1809_indirect = (const methodPointerType*)&native_delegate_wrapper_m1809;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:19122:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1884_indirect = (const methodPointerType*)&native_delegate_wrapper_m1884;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:19353:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1886_indirect = (const methodPointerType*)&native_delegate_wrapper_m1886;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:21588:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1938_indirect = (const methodPointerType*)&native_delegate_wrapper_m1938;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:21819:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1940_indirect = (const methodPointerType*)&native_delegate_wrapper_m1940;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:24407:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m2008_indirect = (const methodPointerType*)&native_delegate_wrapper_m2008;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:24638:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m2010_indirect = (const methodPointerType*)&native_delegate_wrapper_m2010;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:26999:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m2066_indirect = (const methodPointerType*)&native_delegate_wrapper_m2066;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_2.cpp:27230:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m2068_indirect = (const methodPointerType*)&native_delegate_wrapper_m2068;
    ^
    21 warnings generated.
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_0.cpp:1011:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_0.cpp:3370:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_0.cpp:3906:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_0.cpp:6095:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_0.cpp:8178:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_0.cpp:8729:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_0.cpp:9740:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    7 warnings generated.
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:489:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:924:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:1035:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:2236:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:5537:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:5630:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:6287:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:6714:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:6825:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:9711:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:9804:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:10461:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:10888:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:10999:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:12823:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:12916:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_12.cpp:13573:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    17 warnings generated.
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_16.cpp:179:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_16.cpp:291:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    2 warnings generated.
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_5.cpp:562:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_5.cpp:1131:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_5.cpp:2173:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_5.cpp:4129:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_5.cpp:4680:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_5.cpp:6837:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Generics_5.cpp:6930:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    C:/Users/cis24/Documen<message truncated>

    Error 3:
    Failed running "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" -Oz -s NO_EXIT_RUNTIME=1 -o "C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Native\UserAssembly.bc" @"C:\Users\cis24\AppData\Local\Temp\tmp5b3f70de.tmp"

    ERROR root: C:\Users\cis24\Documents\GitHub\Meet-EDSAC\MeetEDSAC\Temp\EmscriptenWork\Assembly-CSharp-firstpass.o: No such file or directory ("C:\Users\cis24\Documents\GitHub\Meet-EDSAC\MeetEDSAC\Temp\EmscriptenWork\Assembly-CSharp-firstpass.o" was expected to be an input file, based on the commandline arguments provided)
    UnityEngine.Debug:LogError(Object)
    NativeCompiler:RunProgram(ProcessStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:60)
    NativeCompiler:Execute(String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:26)
    UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler:CompileDynamicLibrary(String, IEnumerable`1, IEnumerable`1, IEnumerable`1, IEnumerable`1)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:308)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218)
    UnityEditor.HostView:OnGUI()

    Error 4:
    Exception: IL2CPP compile failed.
    NativeCompiler.RunProgram (System.Diagnostics.ProcessStartInfo startInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:62)
    NativeCompiler.Execute (System.String arguments, System.String compilerPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:26)
    UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.LinkObjects (IEnumerable`1 sources, System.String outfile)
    UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.MultiThreadedCompile (System.String outfile, IEnumerable`1 sources, IEnumerable`1 includePaths, Boolean exceptionSupport)
    UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.CompileDynamicLibrary (System.String outFile, IEnumerable`1 sources, IEnumerable`1 includePaths, IEnumerable`1 libraries, IEnumerable`1 libraryPaths)
    UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:308)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218)
    UnityEditor.WebGL.WebGlBuildPostprocessor.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) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
    UnityEditor.HostView:OnGUI()

    Error 5 (presumably just a reiteration of 4):
    Error building Player: Exception: IL2CPP compile failed.

    I can compile an empty project in WebGL no problem. I have enabled 'Strip Engine Code' if that has any bearing on it, but there was no change. I have tried running Unity as admin, same errors. I am on Windows 8.1 64-bit, with Unity 5.2.0f3.

    How do I go about trying to find what the problem is? Is there a list somewhere of common features that break WebGL? Are there clues in these errors that I'm missing?

    (I have removed the only feature which I had that the manual does say isn't supported in WebGL, MovieTextures, but surely such features should throw errors at the C# parsing stage, before conversion to JS happens? Certainly when I missed references to MovieTexture Unity warned me pre-build.)

    Thanks for any hints anyone can give,
    Chris
     
    Last edited: Sep 10, 2015
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    this seems to indicate the problem is in one the scripts. Any chance you could narrow that down ? is it a bit project ?

    Are you able to reproduce the problem with an old version of Unity (let's say 5.1.3p2)
     
  3. christuart

    christuart

    Joined:
    Aug 20, 2015
    Posts:
    5
    Thanks for the reply. It's not a small project, but I'll try making a fork with all of the scripts removed and just check if that builds, then work out to what extent I can add them back in stages... Fun!

    I only updated to 5.2 when 5.1.3 (not sure which but I have checking for updates on so it should have been the latest patch) brought out these errors. The errors were very similar, I think one of the first two errors was not present. I will try reinstalling 5.1.3 next to 5.2 and see what happens.

    I'll also try going back through old commits of the project and seeing if I can get any of those to build in WebGL.
     
  4. christuart

    christuart

    Joined:
    Aug 20, 2015
    Posts:
    5
    This is the selection of errors when building in 5.1.3.
    EDIT: This was with 5.1.3f1, sorry, will trying again with 5.1.3p2 in a mo.

    Error 1:
    Failed running "C:\Program Files\Unity 5.1.3\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Program Files\Unity 5.1.3\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" -Oz -std=c++11 -Wno-unused-value -Wno-invalid-offsetof -I-I"C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\bdwgc/include" -I"C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\libil2cpp/include" -I"C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput" -nostdinc -c @"C:\Users\cis24\AppData\Local\Temp\tmp72f25678.tmp"

    WARNING root: did not see a source tree above or next to the LLVM root directory (guessing based on directory of C:\Program Files\Unity 5.1.3\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_FastComp_Win\llc), could not verify version numbers match
    INFO root: (Emscripten: Running sanity checks)
    WARNING root: java does not seem to exist, required for closure compiler, which is optional (define JAVA in ~/.emscripten if you want it)
    WARNING root: -I or -L of an absolute path "-IC:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\libil2cpp/include" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript). Pass '-Wno-warn-absolute-paths' to emcc to hide this warning.
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:1818:20: error: no matching function for call to 'il2cpp_codegen_marshal_wstring_result'
    _p1_unmarshaled = il2cpp_codegen_marshal_wstring_result(p1);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\libil2cpp/include\codegen/il2cpp-codegen.h:549:29: note: candidate function not viable: no known conversion from 'char *' to 'const uint16_t *' (aka 'const unsigned short *') for 1st argument
    inline Il2CppCodeGenString* il2cpp_codegen_marshal_wstring_result(const uint16_t* value)
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:1827:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m526_indirect = (const methodPointerType*)&native_delegate_wrapper_m526;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:2057:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m527_indirect = (const methodPointerType*)&native_delegate_wrapper_m527;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:2557:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m538_indirect = (const methodPointerType*)&native_delegate_wrapper_m538;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:2781:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m540_indirect = (const methodPointerType*)&native_delegate_wrapper_m540;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:3005:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m542_indirect = (const methodPointerType*)&native_delegate_wrapper_m542;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:14436:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m841_indirect = (const methodPointerType*)&native_delegate_wrapper_m841;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:14660:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m843_indirect = (const methodPointerType*)&native_delegate_wrapper_m843;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:17501:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m916_indirect = (const methodPointerType*)&native_delegate_wrapper_m916;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:21435:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1005_indirect = (const methodPointerType*)&native_delegate_wrapper_m1005;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:21659:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1007_indirect = (const methodPointerType*)&native_delegate_wrapper_m1007;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:25776:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1118_indirect = (const methodPointerType*)&native_delegate_wrapper_m1118;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:26000:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1120_indirect = (const methodPointerType*)&native_delegate_wrapper_m1120;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:30184:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1233_indirect = (const methodPointerType*)&native_delegate_wrapper_m1233;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:30408:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1235_indirect = (const methodPointerType*)&native_delegate_wrapper_m1235;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:35596:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1395_indirect = (const methodPointerType*)&native_delegate_wrapper_m1395;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:35820:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1397_indirect = (const methodPointerType*)&native_delegate_wrapper_m1397;
    ^
    16 warnings and 1 error generated.
    ERROR root: compiler frontend failed to generate LLVM bitcode, halting

    Error 2:
    Failed running "C:\Program Files\Unity 5.1.3\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Program Files\Unity 5.1.3\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" -Oz -s NO_EXIT_RUNTIME=1 -o "C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Native\UserAssembly.bc" @"C:\Users\cis24\AppData\Local\Temp\tmp755cf2e7.tmp"

    ERROR root: C:\Users\cis24\Documents\GitHub\Meet-EDSAC\MeetEDSAC\Temp\EmscriptenWork\Bulk_Assembly-CSharp-firstpass_1.o: No such file or directory ("C:\Users\cis24\Documents\GitHub\Meet-EDSAC\MeetEDSAC\Temp\EmscriptenWork\Bulk_Assembly-CSharp-firstpass_1.o" was expected to be an input file, based on the commandline arguments provided)
    UnityEngine.Debug:LogError(Object)
    NativeCompiler:RunProgram(ProcessStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:60)
    NativeCompiler:Execute(String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:26)
    UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler:CompileDynamicLibrary(String, IEnumerable`1, IEnumerable`1, IEnumerable`1, IEnumerable`1)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:308)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218)
    UnityEditor.HostView:OnGUI()

    Error 3:
    Exception: IL2CPP compile failed.
    NativeCompiler.RunProgram (System.Diagnostics.ProcessStartInfo startInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:62)
    NativeCompiler.Execute (System.String arguments, System.String compilerPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:26)
    UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.LinkObjects (IEnumerable`1 sources, System.String outfile)
    UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.MultiThreadedCompile (System.String outfile, IEnumerable`1 sources, IEnumerable`1 includePaths, Boolean exceptionSupport)
    UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.CompileDynamicLibrary (System.String outFile, IEnumerable`1 sources, IEnumerable`1 includePaths, IEnumerable`1 libraries, IEnumerable`1 libraryPaths)
    UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:308)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218)
    UnityEditor.WebGL.WebGlBuildPostprocessor.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) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
    UnityEditor.HostView:OnGUI()

    Error 4:
    Error building Player: Exception: IL2CPP compile failed.

    I tried opening Unity as administrator, as it suggested there were files it couldn't access, and then found that these errors are now accompanied by over 400 warnings of the type:
    which seem to be for every single component of 'new UI' in the project. This is probably because we now have...
    I've seen these errors before in 5.1.x and I believe they are fixed by running a 'Reimport All' but I just don't have time right now. I assume this is a separate problem and not to do with WebGL. It's odd that they only appeared when I tried to run as administrator, but perhaps it was actually just because it was the first time of opening the project since Unity 5.1.3 had tried to undo the changes made by 5.2.

    I've also got the impossible to get rid of "GI output for inputsystem: <hex code 1> (<hex code 2>) is missing." Never mind. I hope that the strategy of removing all scripts and then replacing them will prove more helpful.
     
    Last edited: Sep 10, 2015
  5. christuart

    christuart

    Joined:
    Aug 20, 2015
    Posts:
    5
    OK so in 5.1.3p2 the missing UI DLL problems seemed to be fixed, and so I could look through the warnings which remained and found that I had deleted a couple of non WebGL compatible scripts, but forgotten to remove them as components from some GameObjects.

    They were the same "Script attached to 'xyz' in scene '' is missing or no valid script is attached", and again didn't know the name of the scene, but the missing scripts were genuinely missing scripts not a problem with the UI DLLs.

    I'm not sure why those problems didn't display themselves in 5.2.0f3, but having fixed them in 5.1.3p2, I am back to the same four compile errors as listed for 5.1.3f1:
    1
    Failed running "C:\Program Files\Unity 5.1.3\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Program Files\Unity 5.1.3\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" -Oz -std=c++11 -Wno-unused-value -Wno-invalid-offsetof -I-I"C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\bdwgc/include" -I"C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\libil2cpp/include" -I"C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput" -nostdinc -c @"C:\Users\cis24\AppData\Local\Temp\tmp562e8fc7.tmp"

    WARNING root: -I or -L of an absolute path "-IC:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\libil2cpp/include" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript). Pass '-Wno-warn-absolute-paths' to emcc to hide this warning.
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:1818:20: error: no matching function for call to 'il2cpp_codegen_marshal_wstring_result'
    _p1_unmarshaled = il2cpp_codegen_marshal_wstring_result(p1);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Libraries\libil2cpp/include\codegen/il2cpp-codegen.h:549:29: note: candidate function not viable: no known conversion from 'char *' to 'const uint16_t *' (aka 'const unsigned short *') for 1st argument
    inline Il2CppCodeGenString* il2cpp_codegen_marshal_wstring_result(const uint16_t* value)
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:1827:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m526_indirect = (const methodPointerType*)&native_delegate_wrapper_m526;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:2057:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m527_indirect = (const methodPointerType*)&native_delegate_wrapper_m527;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:2557:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m538_indirect = (const methodPointerType*)&native_delegate_wrapper_m538;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:2781:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m540_indirect = (const methodPointerType*)&native_delegate_wrapper_m540;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:3005:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m542_indirect = (const methodPointerType*)&native_delegate_wrapper_m542;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:14436:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m841_indirect = (const methodPointerType*)&native_delegate_wrapper_m841;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:14660:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m843_indirect = (const methodPointerType*)&native_delegate_wrapper_m843;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:17501:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m916_indirect = (const methodPointerType*)&native_delegate_wrapper_m916;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:21435:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1005_indirect = (const methodPointerType*)&native_delegate_wrapper_m1005;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:21659:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1007_indirect = (const methodPointerType*)&native_delegate_wrapper_m1007;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:25776:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1118_indirect = (const methodPointerType*)&native_delegate_wrapper_m1118;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:26000:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1120_indirect = (const methodPointerType*)&native_delegate_wrapper_m1120;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:30184:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1233_indirect = (const methodPointerType*)&native_delegate_wrapper_m1233;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:30408:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1235_indirect = (const methodPointerType*)&native_delegate_wrapper_m1235;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:35596:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1395_indirect = (const methodPointerType*)&native_delegate_wrapper_m1395;
    ^
    C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\il2cppOutput\Bulk_Assembly-CSharp-firstpass_1.cpp:35820:33: warning: 'extern' variable has an initializer [-Wextern-initializer]
    extern const methodPointerType* native_delegate_wrapper_m1397_indirect = (const methodPointerType*)&native_delegate_wrapper_m1397;
    ^
    16 warnings and 1 error generated.
    ERROR root: compiler frontend failed to generate LLVM bitcode, halting​
    2.
    Failed running "C:\Program Files\Unity 5.1.3\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Program Files\Unity 5.1.3\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" -Oz -s NO_EXIT_RUNTIME=1 -o "C:/Users/cis24/Documents/GitHub/Meet-EDSAC/MeetEDSAC/Assets/../Temp/StagingArea/Data\Native\UserAssembly.bc" @"C:\Users\cis24\AppData\Local\Temp\tmpa70c8c2.tmp"

    ERROR root: C:\Users\cis24\Documents\GitHub\Meet-EDSAC\MeetEDSAC\Temp\EmscriptenWork\Bulk_Assembly-CSharp-firstpass_1.o: No such file or directory ("C:\Users\cis24\Documents\GitHub\Meet-EDSAC\MeetEDSAC\Temp\EmscriptenWork\Bulk_Assembly-CSharp-firstpass_1.o" was expected to be an input file, based on the commandline arguments provided)
    UnityEngine.Debug:LogError(Object)
    NativeCompiler:RunProgram(ProcessStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:60)
    NativeCompiler:Execute(String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:26)
    UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler:CompileDynamicLibrary(String, IEnumerable`1, IEnumerable`1, IEnumerable`1, IEnumerable`1)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:308)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218)
    UnityEditor.HostView:OnGUI()​
    3.
    Exception: IL2CPP compile failed.
    NativeCompiler.RunProgram (System.Diagnostics.ProcessStartInfo startInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:62)
    NativeCompiler.Execute (System.String arguments, System.String compilerPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:26)
    UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.LinkObjects (IEnumerable`1 sources, System.String outfile)
    UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.MultiThreadedCompile (System.String outfile, IEnumerable`1 sources, IEnumerable`1 includePaths, Boolean exceptionSupport)
    UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.CompileDynamicLibrary (System.String outFile, IEnumerable`1 sources, IEnumerable`1 includePaths, IEnumerable`1 libraries, IEnumerable`1 libraryPaths)
    UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:308)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218)
    UnityEditor.WebGL.WebGlBuildPostprocessor.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) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
    UnityEditor.HostView:OnGUI()​
    4.
    Error building Player: Exception: IL2CPP compile failed.​
    (The unrelated(?) 'GI output for inputsystem...' error is still there.)
     
  6. christuart

    christuart

    Joined:
    Aug 20, 2015
    Posts:
    5
    Answer found!

    OK so the elements that I had to remove to get this to build in WebGL are fairly specific to my project, but I'll describe it in case it helps anyone else who happens to be in the same position.

    This project uses Kinect for the desktop build. To achieve that, it uses the Kinect v2 with MS-SDK package by Rumen Filkov, and that obviously wasn't going to be compatible with WebGL, so I had to extract it. It adds some scripts written by Rumen in a folder called Kinect Scripts, but it also adds (as I didn't realise) resources to the Resources folder and to the Standard Assets folder. I needed to remove:
    • Everything Kinect related in Resources
    • The Kinect folder in Standard Assets/Microsoft/
    • The Kinect folder in Standard Assets/Windows/
    • A long list of scripts in the root of Standard Assets - I just kept removing until there were no more Kinect related compile errors.
    It took a long time to find once I knew I was looking for scripts to remove (probably longer than it should have, I don't know why I didn't think to check that there weren't just more Kinect related gubbins to remove), but without you pointing me in that direction Marco I wouldn't have had a clue what to check. Nicer errors obviously comes below 'getting it to work' in development priorities, but hopefully in time they will come!

    And just in case it helps anyone else, once you've removed scripts and you need to make sure they are removed from your GameObjects and Prefabs, the Detect Leaks V3 script is your friend.

    Thanks for your help.
     
    Last edited: Sep 10, 2015