Open cliedeman opened 4 years ago
Which Xcode version are you using to build? The minimum deployment target has not changed recently, but the minimum Xcode version has, as we rely on things added in the SDKs that shipped with Xcode 11.
Version 11.5 (11E608c)
Hmm. Can you clear your derived data and try the build again? If that doesn’t work, can you let me know what you’re using as your minimum deployment target, and also what version of grpc-swift you’re using?
@Lukasa thats for the help. Deleting Derived data did not help.
Back to the original error
I created a sample expo project and confirmed everything works as expected (This is with deployment target ios9) - https://github.com/cliedeman/swiftgrpcexample
Which leads me to believe the issue is not with this library. I am going to compare the projects and see if I can identify a difference
Thanks for doing that investigative work @cliedeman, please keep us informed.
Any luck with this @cliedeman?
@glbrntt I havent looked into it again. but seeing as it works with a fresh project I am going to close this out and re-open if I ever encounter it again
I have the same issue here. It's a new project, deployment target is iOS12, swift-grpc from latest branch "main". Trying to figure it out before creating a new project.
@izone-airstream I never did figure it out but I had to drop grpc for reasons un-related to this.
It's an OEM project and the code runs perfectly in previous project.
I just clone the previous project, rename the project and target, import the dependency, and the swift-grpc package was forced to switch from "master" to "main", the the related packages version are newer. When I rebuilt the app, the error popped up:
Undefined symbols for architecture x86_64: "type metadata accessor for Network.NWConnection.EstablishmentReport", referenced from: type metadata accessor for Network.NWConnection.EstablishmentReport? in NIOTransportServices.o "Network.NWConnection.requestEstablishmentReport(queue: __C.OS_dispatch_queue, completion: (Network.NWConnection.EstablishmentReport?) -> ()) -> ()", referenced from: NIOTransportServices.NIOTSConnectionChannel.getOption0(option: A) throws -> A.Value in NIOTransportServices.o "Network.NWConnection.startDataTransferReport() -> Network.NWConnection.PendingDataTransferReport", referenced from: NIOTransportServices.NIOTSConnectionChannel.getOption0(option: A) throws -> A.Value in NIOTransportServices.o "type metadata accessor for Network.NWConnection.PendingDataTransferReport", referenced from: NIOTransportServices.NIOTSConnectionChannel.getOption0(option: A) throws -> A.Value in NIOTransportServices.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 both debug and release mode, exactly the same.
FYI. I tried many things, still with the same error. Finally I recreated a new project and reconfig everything again, then it works. Maybe something related to project configuration.
One interesting point is, the swift-nio-transport-services was v1.8.0 when the errors happened. I tried to set it to 1.7.0 manually(which works fine in other projects), reset package caches, but that error still presented.
When I recreated the new project which later builds without error, the swift-nio-transport-services is automatically set to v1.7.0 again, which I didn't manually set it at all. Don't know if that plays the trick.
I bumped into this error as well. Interestingly, rolling back gRPC-Swift to 1.0.0-alpha.19 produced the same error. Adding use_frameworks!
to the Podfile seems to have worked around this issue for me for now.
I fixed the issue by removing the library search paths for the project, but retaining the config paths (which pointed to the pods) and retaining the target paths, if any.
Project settings
Before:
LIBRARY_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)" "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)" "$(inherited)"
After:
LIBRARY_SEARCH_PATHS =
I fixed the issue by removing the library search paths for the project, but retaining the config paths (which pointed to the pods) and retaining the target paths, if any.
Project settings
Before:
LIBRARY_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)" "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)" "$(inherited)"
After:
LIBRARY_SEARCH_PATHS =
@eholley Any idea why this would make it work? It does seem to work for us as well when we remove contents from LIBRARY_SEARCH_PATHS, but not sure why it would make it work.
I've the same issue. Did someone find a solution?
What are you trying to achieve?
Switching to SwiftNIO implementation from gRPC C library
When trying to build I get the following error:
What have you tried so far?
change the ios deployment target to 13. Same error The example SpeechToText project compiles and runs
Is this minimum ios target is 13? I couldn't find that documented anywhere