Skip to content

Error: "Undefined symbols for architecture arm64" when building projects to iPad #15346

Open
@bearyung

Description

@bearyung

Describe the bug

Repo project that demonstrates the issue: https://github.com/bearyung/DemoNew

Open the solution and run it on the physical iOS device (e.g. iPad with iOS 17.2)

Below error shows during deploying the solution:

1>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.

To Reproduce

(I am using Rider 2024.1 on OSX)

  1. Install the latest Avalonia Templates
    dotnet new install Avalonia.Templates

  2. Creating a new Application
    dotnet new avalonia.xplat -av 11.1.0-beta1 -o DemoNew

  3. Open the solution DemoNew with Rider created above

  4. Nuget the NetCoreServer v.8.0.7

  5. Create a simple TCP server (ChatServer.cs and ChatSession.cs in the sample repo)

  6. Run the Project in iOS Simulator (success)

  7. Run the project in iOS device (failed)

Expected behavior

The project should be able to compiled and run on iOS device.
The project have no issues in compiling and running on iOS device when using Avalonia 11.0.10.

Avalonia version

11.1.0-beta

OS

iOS

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions