Skip to content

Fix openssl build on Xcode 16.4+ - #3427

Closed
Kylmakalle wants to merge 1 commit into
tdlib:masterfrom
Kylmakalle:patch-2
Closed

Fix openssl build on Xcode 16.4+#3427
Kylmakalle wants to merge 1 commit into
tdlib:masterfrom
Kylmakalle:patch-2

Conversation

@Kylmakalle

@Kylmakalle Kylmakalle commented Aug 27, 2025

Copy link
Copy Markdown
Contributor

This PR alters the patch for simulator targets of openssl and fixes the build on Xcode 16.4+

Turns out TDLib's patch had an issue with duplicated -simulator suffix that was ignored by clang of Xcode 16.0, but causes an issue with 16.4

xcrun --sdk iphonesimulator clang -target x86_64-apple-ios-simulator-simulator -mios-simulator-version-min=12.0

clang: error: version '-simulator' in target triple 'arm64-apple-ios-simulator-simulator' is invalid

When running make vars-iOS-simulator, I was able to spot an exact issue with TARGET_TRIPLE

@@ -4,10 +4,10 @@ iOS-simulator
 >>> Environment variables for iphonesimulator.x86_64
 SDK-iphonesimulator.x86_64: iphonesimulator
 ARCH-iphonesimulator.x86_64: x86_64
-TARGET_TRIPLE-iphonesimulator.x86_64: x86_64-apple-ios-simulator-simulator
+TARGET_TRIPLE-iphonesimulator.x86_64: x86_64-apple-ios-simulator
 SDK_ROOT-iphonesimulator.x86_64: /Applications/Xcode-16.0.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk
-CC-iphonesimulator.x86_64: xcrun --sdk iphonesimulator clang -target x86_64-apple-ios-simulator-simulator
-CPP-iphonesimulator.x86_64: xcrun --sdk iphonesimulator clang -target x86_64-apple-ios-simulator-simulator -E
+CC-iphonesimulator.x86_64: xcrun --sdk iphonesimulator clang -target x86_64-apple-ios-simulator
+CPP-iphonesimulator.x86_64: xcrun --sdk iphonesimulator clang -target x86_64-apple-ios-simulator -E
 CFLAGS-iphonesimulator.x86_64: -mios-simulator-version-min=12.0
 LDFLAGS-iphonesimulator.x86_64: -mios-simulator-version-min=12.0
 BZIP2_SRCDIR-iphonesimulator.x86_64: build/iOS-simulator/iphonesimulator.x86_64/bzip2-1.0.8
@@ -37,10 +37,10 @@ PYTHON_LIB-iphonesimulator.x86_64: td/example/ios/Py
 >>> Environment variables for iphonesimulator.arm64
 SDK-iphonesimulator.arm64: iphonesimulator
 ARCH-iphonesimulator.arm64: arm64
-TARGET_TRIPLE-iphonesimulator.arm64: arm64-apple-ios-simulator-simulator
+TARGET_TRIPLE-iphonesimulator.arm64: arm64-apple-ios-simulator
 SDK_ROOT-iphonesimulator.arm64: /Applications/Xcode-16.0.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk
-CC-iphonesimulator.arm64: xcrun --sdk iphonesimulator clang -target arm64-apple-ios-simulator-simulator
-CPP-iphonesimulator.arm64: xcrun --sdk iphonesimulator clang -target arm64-apple-ios-simulator-simulator -E
+CC-iphonesimulator.arm64: xcrun --sdk iphonesimulator clang -target arm64-apple-ios-simulator
+CPP-iphonesimulator.arm64: xcrun --sdk iphonesimulator clang -target arm64-apple-ios-simulator -E
 CFLAGS-iphonesimulator.arm64: -mios-simulator-version-min=12.0
 LDFLAGS-iphonesimulator.arm64: -mios-simulator-version-min=12.0
 BZIP2_SRCDIR-iphonesimulator.arm64: build/iOS-simulator/iphonesimulator.arm64/bzip2-1.0.8

@Kylmakalle
Kylmakalle marked this pull request as draft August 27, 2025 18:17
Kylmakalle added a commit to Swiftgram/TDLibFramework that referenced this pull request Aug 27, 2025
@Kylmakalle
Kylmakalle marked this pull request as ready for review August 27, 2025 18:21
@Kylmakalle

Kylmakalle commented Aug 27, 2025

Copy link
Copy Markdown
Contributor Author

I somehow missed #3364 entirely, will post my findings there

@Kylmakalle

Copy link
Copy Markdown
Contributor Author

re-opening, since #3364 breaks visionOS builds

@Kylmakalle Kylmakalle reopened this Sep 7, 2025
@vincentneo

Copy link
Copy Markdown
Contributor

works great, thanks!

@tdlib tdlib deleted a comment from bnnayaf12-lang May 12, 2026
@levlam

levlam commented May 15, 2026

Copy link
Copy Markdown
Contributor

Thank you, @Kylmakalle!
I merged another fix of the issue from #3364, which was submitted earlier, therefore closing this one.

@levlam levlam closed this May 15, 2026
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.

7 participants