-
Notifications
You must be signed in to change notification settings - Fork 514
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
Binding project errors: MT5209 : Native linking error relating to standard swift libraries. #17179
Comments
This seems extremely similar to this issue from React Native, but I have no way to try their solution since we don't have direct control of the Xcode project. |
Another update: |
@rolfbjarne Do you have any insight into this, or can I provide more info? |
@dk-jlew could you get a binary build log (https://github.com/xamarin/xamarin-macios/wiki/Diagnosis#binary-build-logs)? |
Hi @dk-jlew. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Sure, here you go (this is the minimal repro app, not the real one. It is referencing (Edit: Updated with a less confusing build that doesn't have some test code I was messing around with) |
@dk-jlew can you try adding |
@rolfbjarne That didn't work by itself (though it seemed to reduce the # of errors). BUT, this did: It seems like you need both, for reasons I don't understand. |
The property
|
Seems like `_SdkDevPath` may not exist until after `DetectSdkLocations` task runs, I’ll try hooking into that. Thanks for your assistance!
|
I had to do it like this due to the way
|
Context: large Xamarin Forms 5 in which I'm trying to bind a native (xc)framework along with a bunch of dependencies (also xcframeworks which are included in the bundle but not bound). These are all delivered via a nuget-packaged Xamarin.iOS binding project. This has been working fine, but the native code is now pulling in a Swift Package which (either itself or one of its dependencies) is leading to multiple errors when building the app, like:
...followed by many "symbol not found" linker errors which are presumably a consequence of the
MT5209
errors above. I have followed the Microsoft guidance here and added the following to myNativeReference's
<LinkerFlags>
: (there are multiple native references, and I add this to each of them since I am not sure which ones might be the problem, but this redundancy seems(?) harmless):IMPORTANT: A bare-bones Xamarin.iOS project builds/runs successfully when referencing/using the same nuget binding package. My real XF app has other binding projects as well, I'm not sure if there could be a conflict here, or what the difference might be.
Steps to Reproduce
Debug
|iPhoneSimulator
configuration.Expected Behavior
App builds sucessfully
Actual Behavior
iOS app project fails to build with the errors mentioned above
Environment
Version information
Build Logs
Can't post these on github, available through secure channel on request.
Example Project (If Possible)
The full project is difficult to provide... I can provide the problematic nuget package and bare-bones Xamarin.iOS project which does build easily enough.
The text was updated successfully, but these errors were encountered: