Issue with CMake and Amazon FreeRTOS

AlexESP32
Posts: 2
Joined: Thu Oct 03, 2019 9:41 am

Issue with CMake and Amazon FreeRTOS

Postby AlexESP32 » Thu Oct 03, 2019 9:54 am

Hello.

I tried to build with CMake and i got this issue.
My OS is Windows 10, the choosen generator was Eclipse CDT4 - MinGW Makefiles.

C:\Users\ALEXALEX\Desktop\amazon-freertos-master\amazon-freertos-master>cmake --bu
ild build
[ 1%] Built target afr_kernel
[ 3%] Built target afr_freertos_plus_tcp
[ 13%] Built target afr_3rdparty_mbedtls
[ 14%] Built target afr_crypto
[ 17%] Built target afr_pkcs11_implementation
[ 17%] Built target afr_pkcs11
[ 19%] Built target afr_tls
[ 20%] Built target afr_secure_sockets
[ 20%] Built target afr_platform
[ 21%] Built target afr_common
[ 21%] Built target afr_https
[ 22%] Built target afr_dev_mode_key_provisioning
[ 22%] Built target afr_3rdparty_tinycbor
[ 22%] Building C object CMakeFiles/afr_serializer.dir/libraries/c_sdk/standard/se
rializer/src/json/iot_serializer_json_encoder.c.obj
C:\Users\ALEXALEX\Desktop\amazon-freertos-master\amazon-freertos-master\libraries\
c_sdk\standard\serializer\src\json\iot_serializer_json_encoder.c: In function '_ap
pendData':
C:\Users\ALEXALEX\Desktop\amazon-freertos-master\amazon-freertos-master\libraries\
c_sdk\standard\serializer\src\json\iot_serializer_json_encoder.c:465:13: error: 's
trncpy' output truncated before terminating nul copying 4 bytes from a string of t
he same length [-Werror=stringop-truncation]
strncpy( ( char * ) _jsonContainerPointer( pContainer ), _JSON_NULL_V
ALUE, _JSON_NULL_VALUE_LENGTH );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\ALEXALEX\Desktop\amazon-freertos-master\amazon-freertos-master\libraries\
c_sdk\standard\serializer\src\json\iot_serializer_json_encoder.c: In function '_ap
pendBoolean':
C:\Users\ALEXALEX\Desktop\amazon-freertos-master\amazon-freertos-master\libraries\
c_sdk\standard\serializer\src\json\iot_serializer_json_encoder.c:417:9: error: 'st
rncpy' output truncated before terminating nul copying 4 bytes from a string of th
e same length [-Werror=stringop-truncation]
strncpy( ( char * ) _jsonContainerPointer( pContainer ), _JSON_BOOL_TRUE,
_JSON_BOOL_TRUE_LENGTH );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\ALEXALEX\Desktop\amazon-freertos-master\amazon-freertos-master\libraries\
c_sdk\standard\serializer\src\json\iot_serializer_json_encoder.c:422:9: error: 'st
rncpy' output truncated before terminating nul copying 5 bytes from a string of th
e same length [-Werror=stringop-truncation]
strncpy( ( char * ) _jsonContainerPointer( pContainer ), _JSON_BOOL_FALSE
, _JSON_BOOL_FALSE_LENGTH );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1.exe: some warnings being treated as errors
CMakeFiles\afr_serializer.dir\build.make: 100: recipe for target 'CMakeFiles/afr_se
rializer.dir/libraries/c_sdk/standard/serializer/src/json/iot_serializer_json_enco
der.c.obj' failed
mingw32-make.exe[2]: *** [CMakeFiles/afr_serializer.dir/libraries/c_sdk/standard/s
erializer/src/json/iot_serializer_json_encoder.c.obj] Error 1
CMakeFiles\Makefile2:334: recipe for target 'CMakeFiles/afr_serializer.dir/all' fa
iled
mingw32-make.exe[1]: *** [CMakeFiles/afr_serializer.dir/all] Error 2
Makefile:82: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2

C:\Users\ALEXALEX\Desktop\amazon-freertos-master\amazon-freertos-master>

Maybee somene had the same issue and can tell me the solution to fix this.

Thank you very much ;)
Attachments
Error_CMake_Build.PNG
Error_CMake_Build.PNG (114.22 KiB) Viewed 143 times


Who is online

Users browsing this forum: Baidu [Spider], Google [Bot], Micrified and 13 guests