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

linker error on iOS #12491

Open
extrawurst opened this issue Mar 15, 2024 · 1 comment
Open

linker error on iOS #12491

extrawurst opened this issue Mar 15, 2024 · 1 comment
Labels
C-Bug An unexpected or incorrect behavior C-Compile-Failure A failure to compile Bevy apps O-iOS Specific to the iOS mobile operating system S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@extrawurst
Copy link
Contributor

Bevy version

bevy = "0.13.0"

System information

cargo 1.76.0 (c84b36747 2024-01-18)
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild --version
2024-03-15 12:36:31.715 xcodebuild[60660:2660219]

What you did

I added bevy_pkv as a dependency to the mobile example which as a default uses redb as a backend.

What went wrong

building via xcode leads to linker errors:

.... "-o" "[...]/target/aarch64-apple-ios/debug/deps/libredb-d5d45224ce42ca57.dylib" "-Wl,-dead_strip" "-dynamiclib" "-Wl,-dylib" "-nodefaultlibs"
  = note: ld: building for 'iOS', but linking in dylib (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libiconv.2.tbd) built for 'macOS macCatalyst zippered(macOS/Catalyst)'
          clang: error: linker command failed with exit code 1 (use -v to see invocation)


error: could not compile `redb` (lib) due to 1 previous error

Additional information

strangely enough if I build the mobile lib manually first, xcode builds fine:

cargo rustc --crate-type staticlib --lib --target aarch64-apple-ios

I tried reducing the differences of this manual build and what our shell-script does when called by xcode but I cannot get it to work. it feels like some magical config happens outside of my visibility altering how the lib gets build when run manually compared to what xcode does via our shell-script

@extrawurst extrawurst added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Mar 15, 2024
@extrawurst
Copy link
Contributor Author

other people encountered the problem before and thought its related to bevy_pkv: johanhelsing/bevy_pkv#43

@TrialDragon TrialDragon added O-iOS Specific to the iOS mobile operating system S-Needs-Investigation This issue requires detective work to figure out what's going wrong C-Compile-Failure A failure to compile Bevy apps and removed S-Needs-Triage This issue needs to be labelled labels Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior C-Compile-Failure A failure to compile Bevy apps O-iOS Specific to the iOS mobile operating system S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

No branches or pull requests

2 participants