[CMake] Question about strange Android behavior

Christopher Broadbent chris at macolighting.com
Thu Jun 29 19:36:49 EDT 2017


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
>
> hbase Logo
>
> /jim.borden at couchbase.com/
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170630/fb7da505/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 1765 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170630/fb7da505/attachment.png>


More information about the CMake mailing list