Skip to content

Build separate speex library for iOS Simulator#3

Merged
sjp4 merged 1 commit intomainfrom
fix/ios-simulator-build
Apr 17, 2026
Merged

Build separate speex library for iOS Simulator#3
sjp4 merged 1 commit intomainfrom
fix/ios-simulator-build

Conversation

@ericmigi
Copy link
Copy Markdown
Contributor

Summary

  • Build libspeex.a separately for iOS device and iOS Simulator
  • Xcode 24's linker treats platform mismatches as hard errors — the old single lib/ios/libspeex.a (platform=2/iphoneos) was linked into simulator builds, causing link failures
  • Gradle config now points iosArm64 at lib/ios/ and iosX64/iosSimulatorArm64 at lib/ios-simulator/

Problem

ld: building for 'iOS-simulator', but linking in object file built for 'iOS'

This breaks all iOS Simulator builds on Xcode 24+.

Changes

  • speex/build-ios.sh: Build for iphoneos, iphonesimulator, and macOS separately
  • library/build.gradle.kts: Separate cinterop library paths for device vs simulator
  • Prebuilt .a files for all three platforms

🤖 Generated with Claude Code

@ericmigi ericmigi requested a review from sjp4 April 16, 2026 16:33
The iOS simulator and device targets were both linking against the same
libspeex.a (built for iphoneos, platform=2). Xcode 24's linker treats
platform mismatches as errors, breaking simulator builds.

- Build script now builds for iphoneos, iphonesimulator, and macOS
  separately using explicit -sdk flags
- Gradle config points iosArm64 at lib/ios/ and iosX64/iosSimulatorArm64
  at lib/ios-simulator/
- Prebuilt .a files included for all three platforms

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sjp4 sjp4 force-pushed the fix/ios-simulator-build branch from e6701b4 to e927b56 Compare April 17, 2026 09:48
@sjp4 sjp4 merged commit e8c1491 into main Apr 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants