Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.2.1: compile error 2x - error: cannot convert 'uint32_t [5]' {aka 'unsigned int [5]'} to 'unsigned char (&)[20]' #119

Open
thomas-roos opened this issue Mar 4, 2025 · 1 comment

Comments

@thomas-roos
Copy link

Describe the bug
Compile issue

To Reproduce
Yocto master - remove 002 patch.

Expected behavior
Compiles

Logs

| FAILED: CMakeFiles/fwe.dir/src/CacheAndPersist.cpp.o                                                                                                                                                                                                                                                                                                                                                                                 
| /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++ --sysroot=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot -DAWS_AUTH_USE_IMPORT_EXPORT -DAWS_CAL_USE_IMPORT_EXPORT -DAWS_CHECKSUMS_USE_IMPORT_EXPORT -DAWS_COMMON_USE_IMPORT_EXPORT -DAWS_COMPRESS
ION_USE_IMPORT_EXPORT -DAWS_CRT_CPP_USE_IMPORT_EXPORT -DAWS_ENABLE_EPOLL -DAWS_EVENT_STREAM_USE_IMPORT_EXPORT -DAWS_HTTP_USE_IMPORT_EXPORT -DAWS_IO_USE_IMPORT_EXPORT -DAWS_MQTT_USE_IMPORT_EXPORT -DAWS_S3_USE_IMPORT_EXPORT -DAWS_SDKUTILS_USE_IMPORT_EXPORT -DAWS_SDK_VERSION_MAJOR=1 -DAWS_SDK_VERSION_MINOR=11 -DAWS_SDK_VERSION_PATCH=516 -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CHRONO_DYN_LINK -DBOOST_CHRONO_NO
_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DUSE_IMPORT_EXPORT=1 -I/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git/include -I/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/build -isystem /home/ubuntu/data/yocto_maste
r/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../lib/x86_64-poky-linux/gcc/x86_64-poky-linux/14.2.0/include -isystem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../lib/x86_64-poky-linux/gcc/x86_64-poky-linux/14.2.0/include-fixed -isystem /home/ubuntu
/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../lib/x86_64-poky-linux/gcc/x86_64-poky-linux/14.2.0/../../../../../x86_64-poky-linux/include -isystem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/include/c++/14.2.0 -isystem /home/ubuntu/data/yocto_master/build/tmp/wo
rk/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/include/c++/14.2.0/x86_64-poky-linux -isystem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/include/c++/14.2.0/backward -isystem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/lib/x86_64-poky-linux/14.2.0/include -isy
stem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/local/include -isystem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../lib/x86_64-poky-linux/gcc/../../../lib/x86_64-poky-linux/gcc/x86_64-poky-linux/14.2.0/../../../../../x86_64-poky-linux/include -isys
tem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/include -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security  --sysroot=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot  -O2 -g -fcanon-prefix-m
ap  -fmacro-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git=/usr/src/debug/aws-iot-fleetwise-edge/1.2.1  -fdebug-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git=/usr/src/debug/aws-iot-fleetwise-edge/1.2.1  -fmacro-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-
fleetwise-edge/1.2.1/build=/usr/src/debug/aws-iot-fleetwise-edge/1.2.1  -fdebug-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/build=/usr/src/debug/aws-iot-fleetwise-edge/1.2.1  -fdebug-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot=  -fmacro-prefix-map=/home/ubuntu/data/yocto_master/build
/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot=  -fdebug-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native=  -fmacro-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native=  -pipe -fvisibility-inlines-hidden -fsanitize=address -fno-omit-frame-po
inter -O2 -g -DNDEBUG -fPIC -Wconversion -Wall -Wextra -pedantic -ffunction-sections -fdata-sections -fno-omit-frame-pointer -DBOOST_UUID_NO_SIMD -fPIC -MD -MT CMakeFiles/fwe.dir/src/CacheAndPersist.cpp.o -MF CMakeFiles/fwe.dir/src/CacheAndPersist.cpp.o.d -o CMakeFiles/fwe.dir/src/CacheAndPersist.cpp.o -c /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git/src/CacheAndPersi
st.cpp                                                                                                                                                                                                                                                                                                                                                                                                                                 
| /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git/src/CacheAndPersist.cpp: In function 'std::string Aws::IoTFleetWise::{anonymous}::calculateSha1(const uint8_t*, size_t)':                                                                                                                                                                                                         
| /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git/src/CacheAndPersist.cpp:54:22: error: cannot convert 'uint32_t [5]' {aka 'unsigned int [5]'} to 'unsigned char (&)[20]'                                                                                                                                                                                                           
|    54 |     sha1.get_digest( digest );                                                                                                                                                                                                                                                                                                                                                                                               
|       |                      ^~~~~~                                                                                                                                                                                                                                                                                                                                                                                                  
|       |                      |                                                                                                                                                                                                                                                                                                                                                                                                       
|       |                      uint32_t [5] {aka unsigned int [5]}                                                                                                                                                                                                                        
| In file included from /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git/src/CacheAndPersist.cpp:9:                                                                                                                                     
| /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/include/boost/uuid/detail/sha1.hpp:179:43: note:   initializing argument 1 of 'void boost::uuids::detail::sha1::get_digest(unsigned char (&)[20])'                    
|   179 | inline void sha1::get_digest(digest_type& digest)                                                                                                                                                                                                                               
|       |                              ~~~~~~~~~~~~~^~~~~~                                                                                                                                                                                                                                
| /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git/src/CacheAndPersist.cpp: In member function 'Aws::IoTFleetWise::ErrorCode Aws::IoTFleetWise::CacheAndPersist::write(std::streambuf&, Aws::IoTFleetWise::DataType, const std::string&)':
| /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git/src/CacheAndPersist.cpp:259:22: error: cannot convert 'unsigned int [5]' to 'unsigned char (&)[20]'                                                                                  
|   259 |     sha1.get_digest( digest );                                                                                                                                                                                                                                                  
|       |                      ^~~~~~                                                                                                                                                                                                                                                     
|       |                      |                                                                                                                                                                                                                                                          
|       |                      unsigned int [5]                                                                                                                                                                                                                                           
| /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/include/boost/uuid/detail/sha1.hpp:179:43: note:   initializing argument 1 of 'void boost::uuids::detail::sha1::get_digest(unsigned char (&)[20])'                    
|   179 | inline void sha1::get_digest(digest_type& digest)                                                                                                                                                                                                                               
|       |                              ~~~~~~~~~~~~~^~~~~~       

and

| FAILED: CMakeFiles/fwe.dir/src/CollectionSchemeIngestion.cpp.o                                                                                                                                                                                                                          
| /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++ --sysroot=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sys
root -DAWS_AUTH_USE_IMPORT_EXPORT -DAWS_CAL_USE_IMPORT_EXPORT -DAWS_CHECKSUMS_USE_IMPORT_EXPORT -DAWS_COMMON_USE_IMPORT_EXPORT -DAWS_COMPRESSION_USE_IMPORT_EXPORT -DAWS_CRT_CPP_USE_IMPORT_EXPORT -DAWS_ENABLE_EPOLL -DAWS_EVENT_STREAM_USE_IMPORT_EXPORT -DAWS_HTTP_USE_IMPORT_EXPORT -D
AWS_IO_USE_IMPORT_EXPORT -DAWS_MQTT_USE_IMPORT_EXPORT -DAWS_S3_USE_IMPORT_EXPORT -DAWS_SDKUTILS_USE_IMPORT_EXPORT -DAWS_SDK_VERSION_MAJOR=1 -DAWS_SDK_VERSION_MINOR=11 -DAWS_SDK_VERSION_PATCH=516 -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CHRONO_DYN_LINK -DBOOST_CHRONO_NO
_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DUSE_IMPORT_EXPORT=1 -I/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git/include 
-I/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/build -isystem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../lib/x86_64-poky-linux
/gcc/x86_64-poky-linux/14.2.0/include -isystem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../lib/x86_64-poky-linux/gcc/x86_64-poky-linux/14.2.0/include-fixed -isystem /home/ubuntu
/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../lib/x86_64-poky-linux/gcc/x86_64-poky-linux/14.2.0/../../../../../x86_64-poky-linux/include -isystem /home/ubuntu/data/yocto_master/build/tmp/wor
k/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/include/c++/14.2.0 -isystem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/include/c++/14.2.0/x86_64-poky-linux -isystem /home/ubuntu/data/yocto_
master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/include/c++/14.2.0/backward -isystem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/lib/x86_64-poky-linux/14.2.0/include -isy
stem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/local/include -isystem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native/usr/bin/x86_64-poky-lin
ux/../../lib/x86_64-poky-linux/gcc/../../../lib/x86_64-poky-linux/gcc/x86_64-poky-linux/14.2.0/../../../../../x86_64-poky-linux/include -isystem /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/include -m64 -march=cor
e2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security  --sysroot=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot  -O2 -g -fcanon-prefix-m
ap  -fmacro-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git=/usr/src/debug/aws-iot-fleetwise-edge/1.2.1  -fdebug-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/g
it=/usr/src/debug/aws-iot-fleetwise-edge/1.2.1  -fmacro-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/build=/usr/src/debug/aws-iot-fleetwise-edge/1.2.1  -fdebug-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/core
2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/build=/usr/src/debug/aws-iot-fleetwise-edge/1.2.1  -fdebug-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot=  -fmacro-prefix-map=/home/ubuntu/data/yocto_master/build
/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot=  -fdebug-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native=  -fmacro-prefix-map=/home/ubuntu/data/yocto_master/build/tmp/work/cor
e2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot-native=  -pipe -fvisibility-inlines-hidden -fsanitize=address -fno-omit-frame-pointer -O2 -g -DNDEBUG -fPIC -Wconversion -Wall -Wextra -pedantic -ffunction-sections -fdata-sections -fno-omit-frame-pointer -DBOOST_UUID_NO_
SIMD -fPIC -MD -MT CMakeFiles/fwe.dir/src/CollectionSchemeIngestion.cpp.o -MF CMakeFiles/fwe.dir/src/CollectionSchemeIngestion.cpp.o.d -o CMakeFiles/fwe.dir/src/CollectionSchemeIngestion.cpp.o -c /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-ed
ge/1.2.1/git/src/CollectionSchemeIngestion.cpp                                                                                                                                                                                                                                            
| /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git/src/CollectionSchemeIngestion.cpp: In member function 'Aws::IoTFleetWise::ExpressionNode* Aws::IoTFleetWise::CollectionSchemeIngestion::serializeNode(const Aws::IoTFleetWise::Schema
s::CommonTypesMsg::ConditionNode&, Aws::IoTFleetWise::ICollectionScheme::ExpressionNode_t&, std::size_t&, int)':                                                                                                                                                                          
| /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git/src/CollectionSchemeIngestion.cpp:709:40: error: cannot convert 'uint32_t [5]' {aka 'unsigned int [5]'} to 'unsigned char (&)[20]'                                                   
|   709 |             invocationHash.get_digest( digest );                                                                                                                                                                                                                                
|       |                                        ^~~~~~                                                                                                                                                                                                                                   
|       |                                        |                                                                                                                                                                                                                                        
|       |                                        uint32_t [5] {aka unsigned int [5]}                                                                                                                                                                                                      
| In file included from /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/git/src/CollectionSchemeIngestion.cpp:7:                                                                                                                           
| /home/ubuntu/data/yocto_master/build/tmp/work/core2-64-poky-linux/aws-iot-fleetwise-edge/1.2.1/recipe-sysroot/usr/include/boost/uuid/detail/sha1.hpp:179:43: note:   initializing argument 1 of 'void boost::uuids::detail::sha1::get_digest(unsigned char (&)[20])'                    
|   179 | inline void sha1::get_digest(digest_type& digest)                                                                                                                                                                                                                               
|       |                              ~~~~~~~~~~~~~^~~~~~

@thomas-roos
Copy link
Author

tested with this PR: aws4embeddedlinux/meta-aws#11701

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant