We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5099 - Invalid C functions in iOS CMake build
Summary: Invalid C functions in iOS CMake build
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: 2.0.12
Hardware: iPhone/iPod touch iOS (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-19 06:50 UTC by Steve Robinson
Modified: 2020-12-25 08:02 UTC (History)
0 users

See Also:


Attachments
Patch for include/SDL_config.h.cmake (1.14 KB, patch)
2020-04-19 06:50 UTC, Steve Robinson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Robinson 2020-04-19 06:50:04 UTC
Created attachment 4312 [details]
Patch for include/SDL_config.h.cmake

Various C functions are 'found' during CMake config when building for iOS, but they don't actually exist, leading to build errors. 

SDL uses CMake's CheckFunctionExists function, but CMake's documentation recommends using CheckSymbolExists to get around various limitations:
https://cmake.org/cmake/help/v3.17/module/CheckFunctionExists.html

In the meantime, I've attached a patch that comments out all the problem functions in include/SDL_config.h.cmake so the generated file builds fine on iOS, while not affecting other platforms.

Environment:
CMake: 3.17.1
Xcode: 11.4.1
macOS: 10.15.4
Comment 1 Steve Robinson 2020-12-25 08:02:21 UTC
Fixed in SDL 2.0.14, thanks!