-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"undefined symbols" error when building for release. #1369
Comments
This seems to be a build or linkage issue. Can you provide the full compile output, or some indication of what modules got built and linked? |
Yes sure. I apologize. I got anxious and forgot to add version of the package I'm using. 😅 which is 1.0.0 |
I see from your podspec that you fixed the gRPC version to |
I'm having the same problem as as @pacu. I did not specify a version
Error log:
Reproduction steps:
Error log link: Hypothesis:
|
Here's the SwiftNIOPOSIX podspec: https://github.com/CocoaPods/Specs/blob/master/Specs/3/6/7/SwiftNIOPosix/2.38.0/SwiftNIOPosix.podspec.json. This appears to correctly express a dependency on SwiftNIOConcurrencyHelpers, which defines that symbol. |
Yea, then my hypothesis is wrong but the error's still there. So maybe it's caused by some other reason. Does "pod lib lint" work successfully with the project link that I provided for you guys? Thanks for prompt response and looking into this. |
@steve-ham thanks for putting this together. I cloned your repo and tried to do this is the error I got. error_log.txt |
Hey! Any update on this? I'm having the same issue. Different |
I don't know how I did it but it stopped happening in my case. Super weird |
For me I'm still getting the same below error
|
@Lukasa @FranzBusch It has been over a month since this issue opened (March 11th). Is someone looking into this? Does it look like this is a complicated problem and will take a long time? Is there anything I can help to accelerate debugging? Thanks. |
Sorry, I'd missed that the The first failed compile step attempts to link NIOPosix, and the command line invocation is:
This appears to correctly request Ultimately I am unfamiliar with the compilation mechanism of Cocoapods so it's not really easy for me to diagnose this, but it appears that the principal issue is that Cocoapods is not linking I think we'd need someone expert in Cocoapods to be more confident, but my guess is that we probably have to rewrite the podspecs to express the full transitive linkage graph for each pod: that is, we need to tell Cocoapods to link not only every one of the actual module dependencies but also every one of the transitive set to guard against this kind of problem. |
Thanks @Lukasa, that's a great overview of the issue. Cocoapods seem to be very nondeterministic in failing to link those libs properly. I have this framework workflow setup on CI and I always got to run it twice. First time it always fails and the second time the podspsecs get linted and uploaded properly. I'm assuming Cocoapods are caching something but still I don't understand how this affects linking and how linking can be nondeterministic, but again I'm lacking the compiler knowledge so I dunno... I guess I gotta think about SPM support :) |
One of the weird things is I was able to successfully install grpc-swift as dependency and use it on March 9, 2022 9:36 PM. But something changed since then and I am not able to install it anymore. |
gRPC-ProtoRPC grpc objc gets installed as dependency successfully so I guess I'll use this until grpc-swift/cocoapods gets fixed. |
Linking cannot be nondeterministic, but build order can affect the outcome. In particular it's possible to try to link a library that is not present because it hasn't been built yet. |
The issue came back out of nowhere again.
Unfortunately I don't know what triggered it. I thought it was related to having the iPhone plugged in, but it makes no difference if it is or not. |
The same code succeeded building when I ran it through CI. Bitrise does not give me information about the mac used being M1 or Intel so this could be related to the processor architecture. |
I don't think the processor architecture is likely to be relevant here. What version of the cocoapods are you using? |
@pacu I tried both intel and m1 with the same outcome so it seems processor architecture is not relevant here |
1.11.3 |
Sorry, I meant of the grpc and NIO cocoapods. |
|
What build setup do you have? In particular, how are you building and for what devices? |
I'm running
|
Can you provide the full output that includes all the compilation lines? |
Guess which command started to work successfully out of nowhere 🥶 |
What are you trying to achieve?
I'm the maintainer of ZcashLightClientKit. I'm trying to release a new version of the SDK through Cocoapods and I'm having problems with SwiftNIO (it's a dependency of grpc-swift).
What have you tried so far?
Building for release fails. :( whereas debug builds seem to work fine (probably because the active architecture of my mac is intel 64-bit)
The error after
pod trunk push --skip-tests --allow-warnings verbose
The text was updated successfully, but these errors were encountered: