rust_android_ios icon indicating copy to clipboard operation
rust_android_ios copied to clipboard

Big Sur, XCode 12.5.1, link fails

Open rjrjr opened this issue 4 years ago • 1 comments

ld: library not found for -lSystem

Workaround is to add this block to ios_app/build-rust-xcode.sh

# From https://github.com/TimNN/cargo-lipo/issues/41#issuecomment-774793892
if [[ -n "${DEVELOPER_SDK_DIR:-}" ]]; then
  # Assume we're in Xcode, which means we're probably cross-compiling.
  # In this case, we need to add an extra library search path for build scripts and proc-macros,
  # which run on the host instead of the target.
  # (macOS Big Sur does not have linkable libraries in /usr/lib/.)
  export LIBRARY_PATH="${DEVELOPER_SDK_DIR}/MacOSX.sdk/usr/lib:${LIBRARY_PATH:-}"
fi

rjrjr avatar Oct 27 '21 16:10 rjrjr

Hi there, thanks for submitting these issues! would you like to help maintaining this repo? I'll not have time to review this anytime soon.

ivnsch avatar Oct 27 '21 17:10 ivnsch