ios-cmake icon indicating copy to clipboard operation
ios-cmake copied to clipboard

[bug] build config picks up host iconv and fails linking

Open AJenbo opened this issue 3 years ago • 2 comments

Describe the bug When building SDL2 the process will fail due to CMake seeing the host system iconv lib, and then failing to find a proper lib to link with at link time.

To Reproduce Steps to reproduce the behavior:

  1. Clone this PR https://github.com/diasurgical/devilutionX/pull/3612
  2. Run the build process

Expected behavior The build should successfully generate an iOS app.

Environment

  • CMake 3.22
  • https://github.com/diasurgical/devilutionX/blob/25dc2be56683cf5a9981d7041be040a346a655d3/CMakeLists.txt

AJenbo avatar Dec 01 '21 21:12 AJenbo

Hi! I see that you merged the aforementioned PR. Did you solve this somehow yourself?

leetal avatar Jan 08 '22 06:01 leetal

we endedup changing libsdl to first check for the ios specific one, and then avoid probing for the host lib if the first check fails. This isn't the most robust solution and only works out because it has another iconv implementation. If there where none and we had to fall back to SDL's own implementation this solution wouldn't have been possible.

https://github.com/libsdl-org/SDL/pull/5046/files

AJenbo avatar Jan 08 '22 08:01 AJenbo