[MDEV-21082] isnan/isinf compilation errors, isfinite warnings on MacOS Created: 2019-11-11 Updated: 2019-11-19 Resolved: 2019-11-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Compiling |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.2.30 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Alexey Bychko (Inactive) | Assignee: | Vladislav Lesin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
10.2 ES compilation fails under current MacOS due to incomplete or wrong definitions:
it results in compilation failure:
to solve that we might need to define 3d matrix - HAVE_ {IFINF,ISNAN},platform, compiler to handle cases like following:linux && gcc || clang (+ versions if needed) apple && clang (+ versions if needed) HAVE_{IFINF,ISNAN} || default fallback 10.2 built successfully with properly defined my_isnan() and my_isinf() Besides there is another issue on MacOS 10.9:
|
| Comments |
| Comment by Vladislav Lesin [ 2019-11-19 ] | |||||||||||||||||||
|
On some platforms(like Ubuntu 16.04) math.h contains isnan/isinf Note CHECK_SYMBOL_EXISTS(isnan math.h HAVE_ISNAN) returns So if we use CHECK_SYMBOL_EXISTS(...) on Ubuntu 16.04 we have To use std::isnan/std::isinf we must include cmath. It was included in That is why we include cmath and use std::isfinite on C++11 The solution is to use std::isnan/std::isinf/std::isfinite if the code The corresponding changes were already done for 10.3 CS:
|