Skip to content
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

dylib install id question #20

Closed
dylanowen opened this issue Apr 24, 2023 · 2 comments
Closed

dylib install id question #20

dylanowen opened this issue Apr 24, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@dylanowen
Copy link

I ran into this error on iOS but not the simulator:

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: DYLD 1 Library missing
Library not loaded: /Users/*/librecipes2_lib.dylib
Referenced from: <CF59FA6C-EF6F-3660-B1DA-DA21ADF8B67A> /Volumes/VOLUME/*/recipes^2.app/recipes^2
Reason: tried: '/Users/*/librecipes2_lib.dylib' (no such file), '/private/preboot/Cryptexes/OS/Users/*/librecipes2_lib.dylib' (no such file), '/Users/*/librecipes2_lib.dylib' (no such file), '/usr/local/lib/librecipes2_lib.dylib' (no such file), '/usr/lib/librecipes2_lib.dylib' (no such file, not in dyld cache)
(terminated at launch; ignore backtrace)

After extensive searching I realized the issue is that my rust library had its install id as <my_path>/target/aarch64-apple-ios/debug/deps/librecipes2_lib.dylib

With the help of these articles:

I realized changing it to @rpath/librecipes2_lib.dylib and rebuilding my XCode project fixed the issue since now the install id could be resolved using the runpath parameter.

My question: is this normal or is something wrong with my rust setup? If this is normal should the id remapping be part of this tool?

I remapped my id by running this on my library:

install_name_tool -id @rpath/librecipes2_lib.dylib librecipes2_lib.dylib
@antoniusnaumann
Copy link
Owner

This is indeed not expected behavior. I will look into it, thanks for pointing this out!

@antoniusnaumann
Copy link
Owner

Hi, I finally added this to cargo swift package command and verified that it built the example app correctly on an actual device (iPhone 12 running iOS 16.4). Would it be possible for you to check out the repository, install the current main branch and test it out? @dylanowen

@antoniusnaumann antoniusnaumann added the bug Something isn't working label Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants