Android: Fail to find math library during Eigen build
I'm building Eigen 3.3.7 for android (arm32 / arm64) with Android NDK r20b and CMake 3.16.0. Using 2 build configurations:
- NDK-provided cmake toolchain file (doesn't support new unified sysroot introduced in NDK r19+)
- cmake build-it android support macros (announced to support new unified sysroot introduced in NDK r19+)
Result is the same:
-- Performing Test EIGEN_COMPILER_SUPPORT_CPP11
-- Performing Test EIGEN_COMPILER_SUPPORT_CPP11 - Success
-- Performing Test COMPILER_SUPPORT_std=cpp03
-- Performing Test COMPILER_SUPPORT_std=cpp03 - Success
-- Performing Test standard_math_library_linked_to_automatically
-- Performing Test standard_math_library_linked_to_automatically - Failed
-- Performing Test standard_math_library_linked_to_as_m
-- Performing Test standard_math_library_linked_to_as_m - Failed
CMake Error at CMakeLists.txt:111 (message):
Can't link to the standard math library. Please report to the Eigen
developers, telling them about your platform.
(failing macros are located in EIGEN_SOURCE/cmake/FindStandardMathLibrary.cmake)
Same code works fine with CMake 3.12.x-3.15.x.
Edited by Brad King