IL2CPP error on Android - Couldn't open c, error: dlopen failed: library "c" not found

Hi,

I am trying to migrate my Unity Project (v2019.1.8f1) from Mono to il2cpp scripting. Everything has been working great with Mono on Oculus Quest (But we now need to add some more platforms which require il2cpp).

I tried switching the scripting to il2cpp (and.NET 4.x full profile in build settings). Now when I build and run my app on Oculus Quest (Android), I am getting the following error from one of my internal scripts -

2020-11-17 13:21:58.791 8201-8840/? W/Unity: Plugins: Couldn’t open c, error: dlopen failed: library “c” not found
System.Net.NetworkInformation.CommonUnixIPGlobalProperties:getdomainname(Byte[ ], Int32)
System.Net.NetworkInformation.CommonUnixIPGlobalProperties:get_DomainName()
System.Net.CookieContainer:.ctor()
System.Net.Http.HttpClientHandler:get_CookieContainer()
System.Net.Http.HttpClientHandler:CreateWebRequest(HttpRequestMessage)
System.Net.Http.<>c:b__64_0(Object)
Zinnia.Haptics.d__7:System.Collections.IEnumerator.get_Current()
System.Net.Http.HttpClientHandler:SendAsync(HttpRequestMessage, CancellationToken)
System.Net.Http.HttpMessageInvoker:SendAsync(HttpRequestMessage, CancellationToken)
Zinnia.Haptics.d__7:System.Collections.IEnumerator.get_Current()
System.Net.Http.HttpClient:SendAsyncWorker(HttpRequestMessage, HttpCompletionOption, CancellationToken)
Assets.Scripts.Impl.WorkspaceOneApi.WorkspaceOneApiClient:FetchAccessToken(String, String, List`1)
Assets.Scripts.Impl.WorkspaceOneApi.

  • Is this a known issue with il2cpp or is there a workaround to fix this?
  • One of the plugins I use also references - System.Reactive, System.Reactive.Core, System.Reactive.Linq. Are there any issues using these with il2cpp?

Please let me know.
Thanks
S

I don’t believe that this is a known issue. Can you send us a bug report about this? It might be something we can correct.

Are these assemblies from .NET Core? If so, Unity does not support using them. Unity supports assemblies compiled against .NET Framework 4.7.1 (or earlier) or .NET Standard 2.0 only.

Hi Josh,
I can submit a bug report for the same. Maybe I can create a small unity project that reproduces this issue and the error with il2cpp settings. Does that work?

Yes, that would be excellent, thanks!