ios-demo-app
ios-demo-app copied to clipboard
Building for iOS Simulator, but linking in object file built for iOS
When building an iOS app using LibTorch-Lite installed via cocoapods on M1, it will fail to build for Simulator with the error: Building for iOS Simulator, but linking in object file built for iOS
I'm getting the same error on https://github.com/pytorch/ios-demo-app/tree/master/HelloWorld.
ld: in /Users/steve.ham/Downloads/ios-demo-app-master/HelloWorld/HelloWorld/Pods/LibTorch-Lite/install/lib/libtorch.a(empty.cpp.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/steve.ham/Downloads/ios-demo-app-master/HelloWorld/HelloWorld/Pods/LibTorch-Lite/install/lib/libtorch.a' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Chip: Apple M1 Pro Pod: 'LibTorch-Lite', '~> 1.10.0' Device:
- Work on device iPhone 12 Pro.
- Doesn't work on iOS Simulator iPhone 13 mini.
Is any LibTorch developers trying to fix this?
Strangely if I install 'LibTorch-Lite' with 'OpenCV' the project runs on simulator too.
platform :ios, '12.0'
target 'HelloWorld' do
pod 'LibTorch-Lite'
pod 'OpenCV'
end