Cross-compilation fails due to try_run
Cross-compilation on osx-arm fails due to try_run in FindMySQL.cmake:
2023-03-24T14:24:24.7234770Z -- The CXX compiler identification is Clang 14.0.6
2023-03-24T14:24:24.7653980Z -- Detecting CXX compiler ABI info
2023-03-24T14:24:25.5556530Z -- Detecting CXX compiler ABI info - done
2023-03-24T14:24:25.5752650Z -- Check for working CXX compiler: $BUILD_PREFIX/bin/arm64-apple-darwin20.0.0-clang++ - skipped
2023-03-24T14:24:25.5960720Z -- Detecting CXX compile features
2023-03-24T14:24:25.6158900Z -- Detecting CXX compile features - done
2023-03-24T14:24:32.0463070Z CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately:
2023-03-24T14:24:32.0531890Z DB_CLIENT_RUN (advanced)
2023-03-24T14:24:32.0535950Z DB_CLIENT_RUN__TRYRUN_OUTPUT (advanced)
2023-03-24T14:24:32.0537990Z For details see /Users/runner/miniforge3/conda-bld/tango-database_1679667488868/work/build/TryRunResults.cmake
2023-03-24T14:24:32.0539460Z CMake Error at configure/FindMySQL.cmake:160 (message):
2023-03-24T14:24:32.0541980Z Failed to run simple database client program:
2023-03-24T14:24:32.0543410Z
2023-03-24T14:24:32.0544060Z Call Stack (most recent call first):
2023-03-24T14:24:32.0545180Z configure/CMakeLists.txt:4 (find_package)
2023-03-24T14:24:32.0545910Z CMakeLists.txt:17 (include)
I tried passing -DDB_CLIENT_RUN=0 but that didn't help.
Using -DMySQL_VERSION=unknown worked.