Unity fails to build game for android

Recently I have build a new PC for my home. I setup my PC just as like my PC at my office. But when I try to build a game that I’m working on currently. I can build for android perfectly on my office PC, but My pc at home can’t. Gives me some kind of error. Sometimes even shows Blue Screen and restarts. Both PC’s has same Unity version installed.
I’m not sure if it is software problem or hardware problem.

My PC configuration is:

Motherboard: Assus PRIME Z790 P CSM (WiFi)

Processor: 14900K

RAM: G. Skill Trident Z5 DDR5 6000MHz 16GB X2

GPU: MSI GEFORCE RTX 4070 Ti GAMING X TRIO


Below is the error message:

Building Library\Bee\artifacts\Android\iz17e\q9xdm0lmm4eb.o failed with output:
PLEASE submit a bug report to https://github.com/android-ndk/ndk/issues and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: C:/UnityEditors/2022.3.5f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -marm -D__ARM_ARCH_7__ -D__ARM_ARCH_7A__ -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ -faddrsig -mllvm -hoist-common-insts=1 -DANDROID -DHAVE_INTTYPES_H -no-canonical-prefixes -funwind-tables -fstack-protector -fomit-frame-pointer -std=c++11 -Wswitch -Wno-trigraphs -Wno-tautological-compare -Wno-invalid-offsetof -Wno-implicitly-unsigned-literal -Wno-integer-overflow -Wno-shift-negative-value -Wno-unknown-attributes -Wno-implicit-function-declaration -Wno-null-conversion -Wno-missing-declarations -Wno-unused-value -Wno-pragma-once-outside-header -fvisibility=hidden -fexceptions -fno-rtti -g -Os -fPIC -fno-strict-overflow -ffunction-sections -fdata-sections -fmessage-length=0 -pipe -D_GLIBCXX_USE_CXX11_ABI=0 -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DIL2CPP_MONO_DEBUGGER_DISABLED -DRUNTIME_IL2CPP -DHAVE_BDWGC_GC -DNDEBUG -I. "-ID:/Unity Projects/Unity_Boat_Blitz_v2/Boat Blitz Clone/Library/Bee/artifacts/Android/il2cppOutput/cpp" -IC:/UnityEditors/2022.3.5f1/Editor/Data/il2cpp/libil2cpp/pch -IC:/UnityEditors/2022.3.5f1/Editor/Data/il2cpp/libil2cpp -IC:/UnityEditors/2022.3.5f1/Editor/Data/il2cpp/external/baselib/Include -IC:/UnityEditors/2022.3.5f1/Editor/Data/il2cpp/libil2cpp/os/ClassLibraryPAL/brotli/include -IC:/UnityEditors/2022.3.5f1/Editor/Data/il2cpp/external/baselib/Platforms/Android/Include -o Library/Bee/artifacts/Android/iz17e/q9xdm0lmm4eb.o -fcolor-diagnostics -fdiagnostics-absolute-paths -target armv7a-linux-androideabi22 -fstrict-aliasing -fdiagnostics-format=msvc -c -x c++ "D:/Unity Projects/Unity_Boat_Blitz_v2/Boat Blitz Clone/Library/Bee/artifacts/Android/il2cppOutput/cpp/Unity.RenderPipelines.Universal.Runtime__1.cpp"
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module 'D:/Unity Projects/Unity_Boat_Blitz_v2/Boat Blitz Clone/Library/Bee/artifacts/Android/il2cppOutput/cpp/Unity.RenderPipelines.Universal.Runtime__1.cpp'.
4.	Running pass 'ARM Instruction Selection' on function '@ClipperOffset_DoMiter_m7050BFCD4EA5A0BF0DE873A01698D1D61F9F42F8'
 #0 0x00007ff7fca431c8 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1c931c8)
 #1 0x00007ff7fc69ade4 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x18eade4)
 #2 0x00007ff7fc69ab55 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x18eab55)
 #3 0x00007ff7fc69a2ac (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x18ea2ac)
 #4 0x00007ff7fc697ee5 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x18e7ee5)
 #5 0x00007ff7fb7a7514 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x9f7514)
 #6 0x00007ff7fb57af23 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x7caf23)
 #7 0x00007ff7fafea748 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x23a748)
 #8 0x00007ff7faff0f53 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x240f53)
 #9 0x00007ff7fafeaf72 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x23af72)
#10 0x00007ff7fc02d1e1 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x127d1e1)
#11 0x00007ff7fc388683 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x15d8683)
#12 0x00007ff7fd6c4b13 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x2914b13)
#13 0x00007ff7fc2f0374 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1540374)
#14 0x00007ff7fb479da0 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6c9da0)
#15 0x00007ff7fb4f4473 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x744473)
#16 0x00007ff7fadb6482 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6482)
#17 0x00007ff7fadb4661 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x4661)
#18 0x00007ff7fc104156 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1354156)
#19 0x00007ff7fb327d11 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x577d11)
#20 0x00007ff7fc103bf4 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1353bf4)
#21 0x00007ff7fb442424 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x692424)
#22 0x00007ff7fb442809 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x692809)
#23 0x00007ff7fb455786 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6a5786)
#24 0x00007ff7fadb3dcd (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x3dcd)
#25 0x00007ff7fadb1395 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1395)
#26 0x00007ff7fadb14c8 (C:\UnityEditors\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x14c8)
#27 0x00007fff6093257d (C:\Windows\System32\KERNEL32.DLL+0x1257d)
#28 0x00007fff6158aa58 (C:\Windows\SYSTEM32\ntdll.dll+0x5aa58)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
Android (7714059, based on r416183c1) clang version 12.0.8 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)
Target: armv7a-unknown-linux-android22
Thread model: posix
InstalledDir: C:/UnityEditors/2022.3.5f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin
clang++: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: C:\Users\Fahim\AppData\Local\Temp\Unity-518d1e.cpp
clang++: note: diagnostic msg: C:\Users\Fahim\AppData\Local\Temp\Unity-518d1e.sh
clang++: note: diagnostic msg: 

********************

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Can someone tell me how can I fix this.

After a lot of internet searching and discussing with others I found a solution for my problem.

Usually when you use dual RAM sticks you install them on 2-4 or 1-3 slots of your motherboard. In my case it was 2-4 slots. I confirmed it by reading the user manual and on the web. But for some reason it was causing problem for Unity when I tried to build my project for android.

So now I installed my RAM sticks on 3-4 slots. Basically, instead of dual channel now I’m using single channel and unity seems to like it. I can build my projects with no problem.