I’m running Unity 2021.3.2f1 on Ubuntu in Docker for Mac M1. I’m trying to build the project with batch mode, but when the build process is trying to initialise Mono, there is an error. Seems that error is similar to one reported for Mono on M1 macs in Github. I’m just wondering how Unity works, shouldn’t it use the Mono on Linux and not the host machine’s Mono? Can I configure it somehow?
Initialize mono
Mono path[0] = '/opt/unity/Editor/Data/Managed'
Mono path[1] = '/opt/unity/Editor/Data/MonoBleedingEdge/lib/mono/unityjit-linux'
Mono config path = '/opt/unity/Editor/Data/MonoBleedingEdge/etc'
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,server=y,suspend=n,address=127.0.0.1:56308
Using cacheserver namespaces - metadata:defaultmetadata, artifacts:defaultartifacts
Using cacheserver namespaces - metadata:defaultmetadata, artifacts:defaultartifacts
ImportWorker Server TCP listen port: 0
AcceleratorClientConnectionCallback - disconnected - :0
Begin MonoManager ReloadAssembly
Registering precompiled unity dll's ...
Register platform support module: /opt/unity/Editor/Data/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll
Register platform support module: /opt/unity/Editor/Data/PlaybackEngines/LinuxStandaloneSupport/UnityEditor.LinuxStandalone.Extensions.dll
Registered in 0.094564 seconds.
Native extension for LinuxStandalone target not found
Native extension for Android target not found
Refreshing native plugins compatible for Editor in 59.39 ms, found 5 plugins.
Preloading 0 native plugins for Editor in 0.00 ms.
TYPE: 3
* Assertion: should not be reached at tramp-amd64.c:605
V: GetResourceString
* Assertion at ../../mono/arch/amd64/../x86/x86-codegen.h:410, condition `offset == (gint32)offset' not met
Caught fatal signal - signo:6 code:-6 errno:0 addr:0x134
Caught fatal signal - signo:6 code:-6 errno:0 addr:0x134
Obtained 36 stack frames.
#0 0x000040113f6980 in funlockfile
#1 0x00004011641e87 in gsignal
#2 0x000040116437f1 in abort
#3 0x000042f0015681 in monoeg_assert_abort
#4 0x000042efffebc2 in mono_dl_fallback_unregister
#5 0x000042f0015999 in monoeg_g_logv
#6 0x000042f0015ad2 in monoeg_assertion_message
#7 0x000042f0015b18 in mono_assertion_message_unreachable
#8 0x000042efec7006 in mono_breakpoint_clean_code
#9 0x000042efe7661b in mono_install_ftnptr_eh_callback
#10 0x000042efe76888 in mono_install_ftnptr_eh_callback
#11 0x000042efdf604e in mono_jit_set_domain
#12 0x000042efdf0786 in _init
#13 0x000042efdf26d1 in _init
#14 0x000042efdf38b6 in _init
#15 0x000042efdf7548 in mono_jit_set_domain
#16 0x000042efdfae1d in mono_get_runtime_build_info
#17 0x000042eff99dca in mono_runtime_invoke
#18 0x000042eff99d14 in mono_runtime_invoke
#19 0x00004002114ce3 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
#20 0x00004002110827 in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
#21 0x0000400223cbe4 in Scripting::UnityEditor::EditorAssembliesProxy::ProcessInitializeOnLoadAttributes(ScriptingArrayPtr, ScriptingExceptionPtr*)
#22 0x000040020bf1e3 in MonoManager::SetupLoadedEditorAssemblies(dynamic_array<int, 0ul> const&)
#23 0x000040020c1e82 in MonoManager::EndReloadAssembly(DomainReloadingData&, dynamic_bitset)
#24 0x000040020bf88b in MonoManager::ReloadAssembly()
#25 0x0000400308d6e7 in LoadUnityMonoAssemblies()
#26 0x0000400323ecd5 in Application::InitializeProject()
#27 0x000040032e7dbd in InitializeUnity(void*)
#28 0x000040103fde23 in g_source_get_time
#29 0x000040103fd3a5 in g_main_context_dispatch
#30 0x000040103fd770 in g_main_context_dispatch
#31 0x000040103fda82 in g_main_loop_run
#32 0x0000400f1c9a25 in gtk_main
#33 0x000040032e754c in main
#34 0x00004011624c87 in __libc_start_main
#35 0x000040014de029 in _start
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted