aws / aws-sdk-cpp

AWS SDK for C++
Apache License 2.0
1.91k stars 1.04k forks source link

arm32 build issue with some libs #2242

Open thomas-roos opened 1 year ago

thomas-roos commented 1 year ago

Describe the bug

When building for arm32 those libs do not build:

# ec2;\
# ec2-instance-connect;\
# polly-sample;\
# ssm;\
# ssm-contacts;\
# ssm-incidents;\
# ssm-sap;\
# sagemaker;\
# sagemaker-a2i-runtime;\
# sagemaker-edge;\
# sagemaker-featurestore-runtime;\
# sagemaker-geospatial;\
# sagemaker-metrics;\
# sagemaker-runtime;\
# rds;\
# rds-data;\
# securityhub;\
# quicksight;\
# iot;\
# redshift;\
# redshift-data;\
# redshift-serverless;\
# pinpoint;\
# pinpoint-email;\
# pinpoint-sms-voice-v2;\
# glue;\
# lightsail;\
# s3-crt;\
# s3;\
# s3control;\
# s3-encryption;\
# s3outposts;\
# identity-management;\

Expected Behavior

build as they do with arm64, x86-64

Current Behavior

error.log

Reproduction Steps

yocto (master) + meta-aws and enable building of all libs

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.10.30

Compiler and Version used

x86_64-poky-linux-g++ (GCC) 12.2.0

Operating System and version

yocto master on ubuntu 22.04.

thomas-roos commented 1 year ago

Easy reproducible example: https://github.com/thomas-roos/yocto_example/tree/aws-sdk-cpp_issue_2242

thomas-roos commented 1 year ago

cmake -DCMAKE_CXX_FLAGS="-Wno-psabi" helped to fix some ABI warnings but still those - do not build:

ec2
s3-encryption
identity-management

ERROR:

...
aws-cpp-sdk-ec2-integration-tests/CMakeFiles/aws-cpp-sdk-ec2-integration-tests.dir/EC2Tests.cpp.o:(.rodata+0xc0): first defined here
| /home/ubuntu/yocto/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/aws-sdk-cpp/1.11.24-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/12.2.0/ld: tests/aws-cpp-sdk-ec2-integration-tests/CMakeFiles/aws-cp
p-sdk-ec2-integration-tests.dir/EC2TestsDualStack.cpp.o:(.data.rel.ro+0x8): multiple definition of `typeinfo for Aws::Endpoint::DefaultEndpointProvider<Aws::Client::GenericClientConfiguration<true>, Aws::Endpoint::BuiltInParameters, Aws::Endpoint::ClientContextParameters>'; tests/a
...

full log (for ec2): error_ec.log