-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
When linking to Observation and building with skip android build, the following linking error occurs:
cannot locate symbol "_ZN5swift9threading5fatalEPKcz" referenced by "/data/local/tmp/swift-android/Android-9EA98374-80B5-494A-9679-A2B5EBE1D083/libswiftObservation.so".
We work around this in SkipAndroidBridge with the following code, but it requires that SkipAndroidBridge be imported (either directly or via SkipFuse):
skip-android-bridge/Sources/SkipAndroidBridge/Observation.swift
Lines 150 to 158 in f1f761f
| #if os(Android) | |
| // Without this we get the crash on launch: 08-09 18:45:51.978 10431 10431 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN5swift9threading5fatalEPKcz" referenced by "/data/app/~~aevIacTPjMLuc5Cymf5l-A==/skip.droid.app--cf8i3s7JV9Ln9saNnThMg==/base.apk!/lib/arm64-v8a/libswiftObservation.so"... | |
| // Seem like Swift/lib/Threading/Errors.cpp (https://github.com/swiftlang/swift/blob/3934f78ecdd53031ac40d68499f9ee046a5abe50/lib/Threading/Errors.cpp#L13) is missing | |
| // Should be fixed by: https://github.com/swiftlang/swift/pull/77890 | |
| @_cdecl("_ZN5swift9threading5fatalEPKcz") | |
| public func swiftThreadingFatal() { | |
| // we need to do *something* here or the function will get stripped out in release mode | |
| print("swiftThreadingFatal") | |
| } |
Metadata
Metadata
Assignees
Labels
No labels