This repository was archived by the owner on Mar 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 612
Can't run in macOS SwiftUI AppΒ #602
Copy link
Copy link
Open
Description
I'm encountering a runtime error if I try to use TensorFlow in an SwiftUI App:
dyld: Symbol not found: _$sSo12NSFileHandleC10FoundationE9readToEndAC4DataVSgyKF
Referenced from: /System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI
Expected in: /Library/Developer/Toolchains/swift-tensorflow-RELEASE-0.12.xctoolchain/usr/lib/swift/macosx/libswiftFoundation.dylib
in /System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI
Setup:
- macOS 11.1
- Xcode 12.4 and/or Xcode 12.2 Beta 3 (same issue)
- Swift for TensorFlow 0.12 Release
Steps to reproduce:
- Create a new project, chosing
macOSandApp. Leaving Interface and Life Cycle as default, i.e. SwiftUI. - Check the "Disable Library Validation"
- If using Xcode 12.4, apply fix for "LLDB provided no error string" (#532)
- Create a new file with the following:
import TensorFlow
func test() -> String {
let x = Tensor<Float>([[1, 2], [3, 4]])
return String(describing: x + x)
}
- Run (no need to call the function)
Also, if choosing Command Line Tool instead of App, everything works as expected.
RahulBhalley
Metadata
Metadata
Assignees
Labels
No labels