[CMake] Question about strange Android behavior

Jim Borden jim.borden at couchbase.com
Thu Jun 29 20:27:09 EDT 2017


Thanks for that, adding the define mentioned in the answer (__STDC_LIMIT_MACROS) solved the issue!  Now at least I know there is an easy fix, and I can look into other things as well.

Jim Borden
Software Engineer
[hbase Logo]
jim.borden at couchbase.com

From: CMake <cmake-bounces at cmake.org> on behalf of Christopher Broadbent <chris at macolighting.com>
Date: Friday, June 30, 2017 8:36
To: "cmake at cmake.org" <cmake at cmake.org>
Subject: Re: [CMake] Question about strange Android behavior

We hit this on android too, and moved across to using std::numeric_limits in our code. The root cause for us was
differences between the C standard libraries on android, and the one we were running on Linux.

https://stackoverflow.com/questions/986426/what-do-stdc-limit-macros-and-stdc-constant-macros-mean might give
you a fix. To investigate, I'd want to run both builds with "make VERBOSE=1" and compare the commands that cmake
is generating for the failing files, just in case there is something more severe happening behind the scenes.

On 30/06/2017 09:13, Jim Borden wrote:
I’m not sure what the state of Android support is (there is the documentation on the CMake page, and then there is the documentation on the Android page which is different) but I wanted to point out a weird difference in behavior between CMake 3.7.2 and CMake 3.8.2 and ask about it.

My project compiles fine with CMake 3.7.2, but when I use 3.8.2 I get compiler errors to the tune of:

error: use of undeclared identifier 'UINT64_MAX' (and other such nonsense about similar types)

My invocation of CMake is as follows:

cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=16 -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_ANDROID_STL_TYPE=c++_static

Does anyone know why this would happen?
Jim Borden
Software Engineer
[base Logo]
jim.borden at couchbase.com<mailto:jim.borden at couchbase.com>




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170630/7e76b85e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 1765 bytes
Desc: image001.png
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170630/7e76b85e/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 1766 bytes
Desc: image002.png
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170630/7e76b85e/attachment-0003.png>


More information about the CMake mailing list