Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Cannot load 'System.Security.Cryptography.Native.Apple' after recent CoreRT upgrade #8241

Closed
christianscheuer opened this issue Jul 21, 2020 · 6 comments

Comments

@christianscheuer
Copy link
Contributor

Hi all,

Has something been changed to the build system recently that means there's a chance the native parts of System.Security.Cryptography.Native.Apple don't get properly statically linked with the binary anymore?

Since our recent update to latest CoreRT, I get this when using any crypto functions:
System.DllNotFoundException: Unable to load DLL 'System.Security.Cryptography.Native.Apple': The specified module could not be found.

@jkotas
Copy link
Member

jkotas commented Jul 21, 2020

#33236 added lib prefix to the native libraries, but it was missed in number of places.

It can be worked around by changing this: https://github.com/dotnet/corert/blob/master/src/ILCompiler/src/ConfigurablePInvokePolicy.cs#L73 to check for both libSystem. and System.

@christianscheuer
Copy link
Contributor Author

Thank you, Jan. What would be the proper fix / should I log a bug in dotnet/runtime? (We prefer running our production builds on CoreRT master without branching if at all possible).

@jkotas
Copy link
Member

jkotas commented Jul 21, 2020

I have submitted dotnet/runtime#39717 to fix it in dotnet/runtime. It will take a while until we can pick up that fix (we need to do the runtimelab migration first). If you would like to have the workaround checked, feel free to submit PR once you verify that it works.

@jkotas
Copy link
Member

jkotas commented Jul 23, 2020

Keep this open to track removing the workaround.

@christianscheuer
Copy link
Contributor Author

Thank you so much for the quick help, Jan. We have our app running on Rosetta 2 / Big Sur ARM now, almost flawlessly :)

@jkotas
Copy link
Member

jkotas commented Sep 14, 2020

Fixed by dotnet/runtimelab#98

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants