-
Notifications
You must be signed in to change notification settings - Fork 57
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
Using static lib in iOS fails with Undefined symbols #674
Comments
A here I found where in the documentation I saw this: https://aws.github.io/aws-lc-rs/requirements/apple#fips-build I don't see any dylib (on iOS it has no extension afaik) in the target folder. Where can I find these files? |
Hello! Our FIPS build has limitations that make it much more challenging for consumers to use. Specifically, we can only provide a dynamic (FIPS) library for the IOS/Android targets asked about. Our static (FIPS) library build is limited to Linux, x86_64 and aarch64. The reason for this relates to a FIPS requirement for a runtime integrity check, which requires our library compilation to not produce any "relocations" in the resulting binary. In order to achieve this result with a static library, our build process must parse/modify the assembly output from the compiler. This complexity also makes the FIPS build much more fragile. Are you able to use our library w/o the "fips" feature. Unless you've been guidance otherwise by FIPS-compliance experts, I would just avoid using the "fips" feature. I apologize for the difficulty caused by this limitation. Hopefully we will be able to expand the static FIPS library to other platforms, but it might be awhile. |
Well, I'm interested in making it available as a library just because of the FIPS feature. I understand your answer though. Now, back to my current problem, i just want to get it to work. Is my assumption on the latest comment that if I manage to package the dylibs that i pointed out then it should work or do I need to do anything else? |
Yeah, for iOS the name of the libraries will match the pattern Unfortunately, I'm not familiar with how the "loader" locates shared libraries on iOS/Android. I did find a comment here providing some history related to the ability to link to shared libraries on these platforms. I wouldn't want to give you bad advice for how to link to shared libraries. You might try posted the question/details on Rust's user forums or on discord? The forums have some very qualified people that could provide answers and explanations of various issues around this topic. If you do find an answer, I'd love to learn more about this as well! Feel free to post here any info (or a link to any info) on this issue. I'll take note of it so we can help others who might also run into this. Thanks! |
I know how to load dylibs on iOS, I wrote a guide about it :) I just need to know where can I find the files |
Thanks for the link! 😊 For future reference, the name of the library is derived from the return value of the |
Problem:
Hi! I continue on my journey to try to use this crate on iOS/Android. I've managed to compile my crate as a staticlib that I want to use in iOS. This approach has worked for me in the past with other Rust crates.
My
cargo.toml
is defined as such:I then take the compiled .a binary and drop it in a xcframework which I then add to an iOS project. However, when I try to build an example app I get the following errors:
I remember briefly seeing that using the fips feature relies on some other aws-lc static library? Any advice is much appreciated!
The text was updated successfully, but these errors were encountered: