-
Notifications
You must be signed in to change notification settings - Fork 87
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 for architecture arm64" when linking a converted framework #7
Comments
I guess maybe this is somewhat unsurprising when diffing the contents of the x86_64 vs arm64 slices (opencv), which I included in full below for the sake of discussion. The missing files here for the most part are expected as they're mostly AVX instruction set obj files, etc; of course they're not in the arm64 slice. I guess my question is really -- in cases like this, what's the expected behavior? and are the missing symbols here related to the difference in obj or not? 🤔 I haven't worked that out yet. Here's the diff:
|
Missing symbols in opencv are defined here it seems: https://github.com/opencv/opencv/blob/17234f82d025e3bbfbf611089637e5aa2038e7b8/modules/core/src/tables.cpp |
I'm reopening this--thought I'd worked it out but I haven't. what im trying to do:
FWIW I'm moving in another direction here (no good reason to really be converting this one) but maybe it's worth figuring out if .a's are a valid use case. maybe it's safe to chalk this up to incompatibility with CC archives produced by opencv's build tools and close? |
I'm also experiencing this issue. This time I tried to convert Realm framework. The realm framework used prebuilt |
@hendych what symbols are missing in your case? because another issue I know a few users of this hack have seen is missing swift std lib, and theres a specific way we managed to work past that. I'll try to PR to the readme sometime on that. its a somewhat separate issue than this one |
Sorry to have gone MIA on this! I am not entirely surprised by some libraries having missing symbols – it's entirely possible they were compiled out entirely through usage of If that's the case, there is not a whole lot that could be done here. One thing I would try is to break up the x86 and ARM Simulator frameworks into two separate ones, where the Simulator ARM one is using the original Native ARM headers. Might make |
@zachgrayio - if you can share, would be super interested to hear how you solve the Swift standard library linking! Is this related to the usage of TAPIs/swiftmodules in any way? Would love to learn more about this. |
@bogo for sure. do you want to come on our podcast to talk about all this stuff?? was thinking it'd be a cool episode anyways lol. https://podcasts.apple.com/ca/podcast/the-bazel-show/id1544005904 😆 |
@bogo in realm, this symbol should've exist in both simulator or device. The missing symbol was supposed to be What is happening?What I found is that, when I unarchive using What I understand from I was trying to convert WorkaroundLuckily, Realm version After the source code is compiled, SPM will produce |
Hey @hendych, I tried this is Realm and clearly
|
Ooh, duplicate names in |
Another workaround is searching for the missing symbols on GitHub, then building them for arm64 simulator and merging them together using |
Noticed there's a good amount of missing symbols after converting a few arm64 device binaries over and attempting to use them on the M1s - some examples coming from opencv:
The text was updated successfully, but these errors were encountered: