App not building with Xcode 12.5
thom1606 opened this issue · 13 comments
Yesterday I updated my Xcode to 12.5 and was unable to update my app.
When trying to build my app in Xcode is receive the following error:
Undefined symbols for architecture x86_64:
"Swift._ArrayBuffer._copyContents(initializing: Swift.UnsafeMutableBufferPointer<A>) -> (Swift.IndexingIterator<Swift._ArrayBuffer<A>>, Swift.Int)", referenced from:
generic specialization <serialized, Swift._ArrayBuffer<Swift.Int8>> of Swift._copyCollectionToContiguousArray<A where A: Swift.Collection>(A) -> Swift.ContiguousArray<A.Element> in libreact-native-job-queue.a(SQLiteDatabase.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The project seems to build fine when react-native-job-queue
is not added.
I'm seeing the same thing
Undefined symbols for architecture x86_64:
"Swift._ArrayBuffer._copyContents(initializing: Swift.UnsafeMutableBufferPointer) -> (Swift.IndexingIterator<Swift._ArrayBuffer>, Swift.Int)", referenced from:
generic specialization <serialized, Swift._ArrayBuffer<Swift.Int8>> of Swift._copyCollectionToContiguousArray(A) -> Swift.ContiguousArray<A.Element> in libreact-native-job-queue.a(SQLiteDatabase.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Tried ChartsOrg/Charts#4636, but seeing more errors after that.
I am currently updating XCode tto reproduce this :D
The build just fails because of these two sqlite method calls:
but i currently don't how i could fix this.
Maybe I need to downgrade the command line tools as well?
Hmm that didn't seem to work either. Any ideas for just getting something working again?
Oh I lied. I had removed "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)" in my Library Search Path during some troubleshooting. Once I put that back, and using 12.4 xCode and command line tools, looks like the build is completing successfully again.
facebook/react-native#31179 (comment) works, but it's important to add dummy.swift file to the project and if you already have on delete it and add a new one.
@SimonErm hey. Any plans to make a fix for this? Seems like the RN team created a patch
For everyone that had a problem with newer RN and Xcode versions: this helped me facebook/react-native#31179 (comment)
@VanTigranyan i am not sure if i can provide any fix for that. I think it has to be fixed in the project template and for the existing projects, the xcode setup has to be fixed.
@SimonErm I don't think you can provide any fix for this either. Thanks for the reply.