Compile error when build googletest with Cmake on Ubuntu 14.04 for Android cross compile

140 views
Skip to first unread message

Jin Li

unread,
May 3, 2019, 7:35:26 AM5/3/19
to Google C++ Testing Framework
Hey,

I saw following error messages when build gtest.cc on docker (Ubuntu 14.04) for Android cross compile. Please check if the attached patch makes sense.

Thanks,
Frank

[docker] [ 88%] Building CXX object third_party/googletest/build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o

[docker] In file included from /tmp/aws-iot-device-sdk-cpp/build-ndk/third_party/googletest/src/googletest/src/gtest-all.cc:41:

/tmp/aws-iot-device-sdk-cpp/build-ndk/third_party/googletest/src/googletest/src/gtest.cc:1952:21: error: implicit conversion changes signedness: 'const wchar_t' to 'wint_t' (aka 'unsigned int') [-Werror,-Wsign-conversion]

    left = towlower(*lhs++);

           ~~~~~~~~ ^~~~~~

/tmp/aws-iot-device-sdk-cpp/build-ndk/third_party/googletest/src/googletest/src/gtest.cc:1953:22: error: implicit conversion changes signedness: 'const wchar_t' to 'wint_t' (aka 'unsigned int') [-Werror,-Wsign-conversion]

    right = towlower(*rhs++);

            ~~~~~~~~ ^~~~~~

0001-Fix-sign-conversion-error-when-cross-compile-on-Andr.patch

Gennadiy Civil

unread,
May 3, 2019, 9:32:53 AM5/3/19
to Jin Li, Google C++ Testing Framework
Thank you for this. If you have a patch to consider please submit a proper PR.
Thanks again
G
Reply all
Reply to author
Forward
0 new messages