-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: "Undefined symbols for architecture arm64: _SSLClose" when building projects to iPad #101005
Comments
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones |
@ivanpovazan could you please take a look? |
It seems like we are not linking against
|
@ivanpovazan added the _linkerFrameworks as a workaround solved the issue, below is the fragment I've added to the project file:
|
Glad it worked. For this reason, I will close the issue. Please feel free to reopen it if you encounter any other related problems. |
@bearyung I had the same problem, and your code snippet solved it for me :-) |
Description
Repo project that demonstrates the issue: https://github.com/bearyung/test_ios
Open the project and build it to the physical iOS device (e.g. iPad with iOS 17.2)
Below error shows during deploying the project:
0>Xamarin.Shared.Sdk.targets(1559,3): Error : clang++ exited with code 1: Undefined symbols for architecture arm64: "_SSLClose", referenced from: _AppleCryptoNative_SslShutdown in libSystem.Security.Cryptography.Native.Apple.a(pal_ssl.c.o) "_SSLCopyALPNProtocols", referenced from: _AppleCryptoNative_SslGetAlpnSelected in libSystem.Security.Cryptography.Native.Apple.a(pal_ssl.c.o) "_SSLCopyDistinguishedNames", referenced from: _AppleCryptoNative_SslCopyCADistinguishedNames in libSystem.Security.Cryptography.Native.Apple.a(pal_ssl.c.o) "_SSLCopyPeerTrust", referenced from: _AppleCryptoNative_SslCopyCertChain in libSystem.Security.Cryptography.Native.Apple.a(pal_ssl.c.o) _AppleCryptoNative_SslIsHostnameMatch in libSystem.Security.Cryptography.Native.Apple.a(pal_ssl.c.o) "_SSLCreateContext", referenced from: _AppleCryptoNative_SslCreateContext in libSystem.Security.Cryptography.Native.Apple.a(pal_ssl.c.o) "_SSLGetNegotiatedCipher", referenced from: _AppleCryptoNative_SslGetCipherSuite in libSystem.Security.Cryptography.Native.Apple.
It seems .NET runtime still uses these deprecated API
https://github.com/dotnet/runtime/blame/v8.0.4/src/native/libs/System.Security.Cryptography.Native.Apple/pal_ssl.c#L594
https://developer.apple.com/documentation/security/1397869-sslclose
Reproduction Steps
Expected behavior
The project should be able to build and run on iOS device, just like it can build and run on iOS simulators.
Actual behavior
The project should be able to compiled and run on iOS device.Target _LinkNativeExecutable:
Tool xcrun execution started with arguments: clang++ -mios-version-min=13.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk -arch arm64 /Users/michaelyung/RiderProjects/test_ios/obj/Debug/net8.0-ios/ios-arm64/nativelibraries/aot-output/arm64/aot-instances.dll.o /Users/michaelyung/RiderProjects/test_ios/obj/Debug/net8.0-ios/ios-arm64/nativelibraries/aot-output/arm64/test_ios.dll.o
[ trimmed ]
0>Xamarin.Shared.Sdk.targets(1559,3): Error : clang++ exited with code 1:
Undefined symbols for architecture arm64:
"_SSLClose", referenced from:
_AppleCryptoNative_SslShutdown in libSystem.Security.Cryptography.Native.Apple.a(pal_ssl.c.o)
"_SSLCopyALPNProtocols", referenced from:
_AppleCryptoNative_SslGetAlpnSelected in libSystem.Security.Cryptography.Native.Apple.a(pal_ssl.c.o)
"_SSLCopyDistinguishedNames", referenced from:
_AppleCryptoNative_SslCopyCADistinguishedNames in libSystem.Security.Cryptography.Native.Apple.a(pal_ssl.c.o)
"_SSLCopyPeerTrust", referenced from:
_AppleCryptoNative_SslCopyCertChain in libSystem.Security.Cryptography.Native.Apple.a(pal_ssl.c.o)
_AppleCryptoNative_SslIsHostnameMatch in libSystem.Security.Cryptography.Native.Apple.a(pal_ssl.c.o)
"_SSLCreateContext", referenced from:
_AppleCryptoNative_SslCreateContext in libSystem.Security.Cryptography.Native.Apple.a(pal_ssl.c.o)
"_SSLGetNegotiatedCipher", referenced from:
_AppleCryptoNative_SslGetCipherSuite in libSystem.Security.Cryptography.Native.Apple.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: