[ODBC-299] FindIconv.cmake too old to work on MacOS 11 (Big Sur) Created: 2020-12-21 Updated: 2021-08-12 Resolved: 2021-08-12 |
|
| Status: | Closed |
| Project: | MariaDB Connector/ODBC |
| Component/s: | General |
| Affects Version/s: | 3.1.11 |
| Fix Version/s: | 3.1.14 |
| Type: | Bug | Priority: | Major |
| Reporter: | Mitchell Blank Jr | Assignee: | Lawrin Novitsky |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | macos | ||
| Environment: |
MacOS 11.1 |
||
| Description |
|
When building for homebrew:
This is probably related to MacOS 11's weird way of handling system libraries. Basically the standard libraries like /usr/lib/libiconv.dylib are no longer present on the filesystem but you can link to them. Most likely you just need to import a newer version of FindIconv.cmake since I'm pretty sure cmake itself can find the package no problem. You seem to have a "frozen in amber" copy of that file. As a workaround to get homebrew building I am doing this:
see https://github.com/Homebrew/homebrew-core/pull/67348 The ".tbd" files are the linker information for that library. You don't need to pass that to the compiler (just "-liconv" will do) but I needed to find some filename to pass in as the library location so that FindIconv.cmake would be satisfied that it "found" it |
| Comments |
| Comment by Lawrin Novitsky [ 2021-08-12 ] | |||||||||||||||||
|
The FindIconv coming with cmake 3.21.1 from Homebrew does not solve the problem. | |||||||||||||||||
| Comment by Mitchell Blank Jr [ 2021-08-12 ] | |||||||||||||||||
|
What results do you get? When I do:
It finds the tbd file without issue:
This is with cmake 3.21.1, direct from Homebrew | |||||||||||||||||
| Comment by Lawrin Novitsky [ 2021-08-12 ] | |||||||||||||||||
|
The fix is skipping iconv search if MacOS version >= Big Sur. That fixed the build for me. Old FindIconv.cmake has been left in place, as newer version does not help, and we can't make minimal required cmake version higher(FindIconv appears in 3.11) as not all (linux) distributions have it. |