v2021.3.5f1 fails in Android il2cpp output after upgrade from v2020.3.30f1

Hi All,

I have just migrated my Unity project from Unity v2020.3.30f1 to v2021.3.5f1.

I have successfully built and run the project targeting Windows.

When I change the target platform to Android the build fails while generating il2cpp.

The failure seems to be caused by issues with EasyWebCamLib.cpp

I cannot determine whether EasyWebCamLib.cpp is an Android standard lib, a Unity standard lib or something linked in by Packages/Plugins I use in my project.
Any suggestions or help would be very much appreciated. TIA.

Regards AndyB

Here is the full error log dump:

Building Library\Bee\artifacts\Android\d8kzr\libil2cpp.so failed with output:
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_UpdateTexture32_m9AB5BFCAB4088079634BEFD9DBD592836B0AE2DB’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1703: undefined reference to ‘UpdateTexture32’
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1703: undefined reference to ‘UpdateTexture32’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_aruRequestCamera_mCA7723C008DA2ED2E80F292E23739B6AD5F39DF5’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1639: undefined reference to ‘aruRequestCamera’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_Init_mB8434746481D0325D011347DB7B4FFB2CE12FFD0’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1648: undefined reference to ‘Init’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_Play_m806E9A2605EFA4E5764D0C8618EAEB41DCCC0F87’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1658: undefined reference to ‘Play’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_Stop_mA93AB3C7798DAD7DF185F31AA8D7A18D6391AA18’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1667: undefined reference to ‘Stop’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_setFocusMode_m57E97737AC4F6B92CD3A2378B3D87BCA1D33F15B’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1676: undefined reference to ‘setFocusMode’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_setTorchMode_m5F86DECAC8373F22F758414210EACC0BF2FF3C7C’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1685: undefined reference to ‘setTorchMode’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_SwitchCamera_m9B1B8AF70262223A8DAF0E71FECCE63E9980309D’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1694: undefined reference to ‘SwitchCamera’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_UpdateTextureByte_mF01A9B38EF729F3DE510E0448CE41F4B0CD34E05’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1713: undefined reference to ‘UpdateTextureByte’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_RegisterCallbacks_m67FF38053A3ED30DC7906FD9D1A719CCE5E1C8EC’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1735: undefined reference to ‘RegisterCallbacks’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_setPreviewResolution_m4D373D590800D15D7B8D3128DDADE52E45BFE57C’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1745: undefined reference to ‘setPreviewResolution’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_SaveImageToAlbum_m249D0143AFE0A5A3BA918B05C8D4FE69B4C7A40F’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1758: undefined reference to ‘SaveImageToAlbum’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_tapFocus_m88EAE2EB3A03ED2509CA6B4E8E61DCB843F27584’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1771: undefined reference to ‘tapFocus’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_aruRequestCamera_mCA7723C008DA2ED2E80F292E23739B6AD5F39DF5’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1639: undefined reference to ‘aruRequestCamera’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_Init_mB8434746481D0325D011347DB7B4FFB2CE12FFD0’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1648: undefined reference to ‘Init’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_setPreviewResolution_m4D373D590800D15D7B8D3128DDADE52E45BFE57C’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1745: undefined reference to ‘setPreviewResolution’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘EasyWebCamiOS_Play_mBFB5D822F2B0A12C6FA94244DB965305FF4D5A11’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1658: undefined reference to ‘Play’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_Stop_mA93AB3C7798DAD7DF185F31AA8D7A18D6391AA18’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1667: undefined reference to ‘Stop’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_setFocusMode_m57E97737AC4F6B92CD3A2378B3D87BCA1D33F15B’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1676: undefined reference to ‘setFocusMode’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_setTorchMode_m5F86DECAC8373F22F758414210EACC0BF2FF3C7C’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1685: undefined reference to ‘setTorchMode’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_UpdateTextureByte_mF01A9B38EF729F3DE510E0448CE41F4B0CD34E05’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1713: undefined reference to ‘UpdateTextureByte’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘EasyWebCamiOS_tapFocus_m418EB39039146EA7CA88A18A15D488524D7A5E9D’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1771: undefined reference to ‘tapFocus’
Library/Bee/artifacts/Android/d8kzr/y3cj_yWebCamLib.o: In function ‘NativePluginStatic_SwitchCamera_m9B1B8AF70262223A8DAF0E71FECCE63E9980309D’:
./model-viewer-app/Library/Bee/artifacts/Android/il2cppOutput/cpp/EasyWebCamLib.cpp:1694: undefined reference to ‘SwitchCamera’
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
0x00007ff6b0b010cd (Unity) StackWalker::GetCurrentCallstack
0x00007ff6b0b07da9 (Unity) StackWalker::ShowCallstack
0x00007ff6b1a74e73 (Unity) GetStacktrace
0x00007ff6b210a1cd (Unity) DebugStringToFile
0x00007ff6afc6d372 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x00000182d94a2e93 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x00000182d94a2dcb (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object)
0x00000182d94a2b50 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x00000185de82fe35 (Mono JIT Code) UnityEngine.Debug:LogError (object)
0x00000185de82fcb3 (Mono JIT Code) UnityEditor.Modules.BeeBuildPostprocessor:DefaultResultProcessor (Bee.BeeDriver.NodeResult,bool,bool)
0x00000185de82f44b (Mono JIT Code) UnityEditor.Modules.BeeBuildPostprocessor:ReportBuildResults (Bee.BeeDriver.BeeDriverResult)
0x00000185de805193 (Mono JIT Code) UnityEditor.Modules.BeeBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs)
0x00000185de804b2b (Mono JIT Code) UnityEditor.Modules.DefaultBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs,UnityEditor.BuildProperties&)
0x00000185de80205b (Mono JIT Code) UnityEditor.Android.AndroidBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs,UnityEditor.BuildProperties&)
0x00000185de801827 (Mono JIT Code) UnityEditor.PostprocessBuildPlayer:Postprocess >(UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,string,string,string,int,int,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport)
0x00000185de801b75 (Mono JIT Code) (wrapper runtime-invoke) :runtime_invoke_void_int_int_int_object_object_object_int_int_int_object_object (object,intptr,intptr,intptr)
0x00007ff94a18e4b4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007ff94a0ce764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
0x00007ff94a0ce8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
0x00007ff6b0a258c4 (Unity) scripting_method_invoke
0x00007ff6b0a204e4 (Unity) ScriptingInvocation::Invoke
0x00007ff6b2479301 (Unity) CallMono
0x00007ff6b2481467 (Unity) PostprocessPlayer
0x00007ff6b247c0ef (Unity) DoBuildPlayer_PostBuild
0x00007ff6b247a18e (Unity) DoBuildPlayer
0x00007ff6b246e30d (Unity) BuildPlayer
0x00007ff6b030c53d (Unity) BuildPipeline::BuildPlayerInternalNoCheck
0x00007ff6b027141f (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
0x00000185de696ff7 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck >(string,string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,UnityEditor.BuildOptions,string,bool)
0x00000185de696843 (Mono JIT Code) UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
0x00000185de6932e3 (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
0x00000185de67f743 (Mono JIT Code) UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform,UnityEditor.Modules.IBuildPostprocessor)
0x00000185de66d593 (Mono JIT Code) UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
0x00000185de65b893 (Mono JIT Code) UnityEditor.BuildPlayerWindow:OnGUI ()
0x00000185d10cf49a (Mono JIT Code) UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect)
0x00000185d10cf2b3 (Mono JIT Code) UnityEditor.DockArea:DrawView (UnityEngine.Rect)
0x00000185d10c0afb (Mono JIT Code) UnityEditor.DockArea:OldOnGUI ()
0x00000185d10a8a7f (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
0x00000185d10a7d4b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
0x00000185d10a328b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,System.Action,bool)
0x00000185d10a30f3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,bool)
0x00000185d10a2c1b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase,bool,bool)
0x00000185d10a2ad3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI (UnityEngine.UIElements.EventBase,bool,bool)
0x00000185d033b43b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleEvent (UnityEngine.UIElements.EventBase)
0x00000185d0323f78 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase)
0x00000185d10a1c9b (Mono JIT Code) UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x00000185d03221be (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,bool)
0x00000185d0321cbb (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x00000185d032872b (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEventQueue ()
0x00000185d0326b83 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:OpenGate ()
0x00000185d0326abb (Mono JIT Code) UnityEngine.UIElements.EventDispatcherGate:Dispose ()
0x00000185d0321f43 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x00000185d0321623 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:Dispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode)
0x00000185d032149b (Mono JIT Code) UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode)
0x00000185d0489f5b (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
0x00000185d0489a03 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
0x00000185d04897bf (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
0x00000185d04896db (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
0x00000185d048953d (Mono JIT Code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
0x00000185d04895f6 (Mono JIT Code) (wrapper runtime-invoke) :runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
0x00007ff94a18e4b4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007ff94a0ce764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
0x00007ff94a0ce8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
0x00007ff6b0a258c4 (Unity) scripting_method_invoke
0x00007ff6b0a204e4 (Unity) ScriptingInvocation::Invoke
0x00007ff6b0a19e05 (Unity) ScriptingInvocation::Invoke
0x00007ff6b0b22c7a (Unity) Scripting::UnityEngine::GUIUtilityProxy::ProcessEvent
0x00007ff6b155dc46 (Unity) GUIView::ProcessRetainedMode
0x00007ff6b1aa554b (Unity) GUIView::OnInputEvent
0x00007ff6b155da5a (Unity) GUIView::ProcessInputEvent
0x00007ff6b1aa649b (Unity) GUIView::ProcessEventMessages
0x00007ff6b1aa006c (Unity) GUIView::GUIViewWndProc
0x00007ffa05aae858 (USER32) CallWindowProcW
0x00007ffa05aae299 (USER32) DispatchMessageW
0x00007ff6b1a7ae93 (Unity) MainMessageLoop
0x00007ff6b1a7f8bb (Unity) WinMain
0x00007ff6b2db28be (Unity) __scrt_common_main_seh
0x00007ffa068b7034 (KERNEL32) BaseThreadInitThunk
0x00007ffa074a2651 (ntdll) RtlUserThreadStart

Ok - Done some more spelunking into this and EasyWebCamLib seems to be a lib in 52CWALK QR Code package. We we use this AssetStore package. I see that the Asset Store page for this package indicates there is a new version available.

New Version 5.4 available
-1,Fixed bug when building with the IL2CPP scripting backend.

Will upgrade to the new version and see if this fixes the problem.

Ok - This problem was an issue with 52CWALK QR Code Asset. I upgraded the package to the latest version 5.4.4 and I was able to Build for Android under Unity v2021.3.5f1.
However, the Android build QRCode scan corrupted the video on my Oppo A74 test device. This was fixed by Unchecking “Is Use Easy WebCam” in the Device Camera Controller script. Refer to Manual. All a bit ropey and worrying. Will do lots of beta testing on multiple devices before releasing this version!