aws / aws-sdk-cpp

AWS SDK for C++
Apache License 2.0
1.98k stars 1.06k forks source link

test case failed while using external project in cmake #2838

Closed NandyRL closed 9 months ago

NandyRL commented 9 months ago

Describe the bug

i have an application which uses cmake to build the container. I wanted to integrate aws sdk into it, so i used externalproject in cmakelists.

include(ExternalProject)

ExternalProject_Add(libawscpp-download
    GIT_REPOSITORY    https://github.com/aws/aws-sdk-cpp.git
    GIT_TAG           1.8.17
    LIST_SEPARATOR    "|"
    CMAKE_ARGS        -DBUILD_ONLY=s3
)

but some test cases are failing

Expected Behavior

should have run successfully

Current Behavior

failing
/tmp/meeting-sdk-linux-sample/build/libawscpp-download-prefix/src/libawscpp-download-build/.deps/build/src/AwsCCommon/tests/byte_buf_test.c:236:35: error: 'arr' may be used uninitialized [-Werror=maybe-uninitialized]
zoomsdk-build  |   236 |     struct aws_byte_buf src_buf = aws_byte_buf_from_empty_array(arr, sizeof(arr));
zoomsdk-build  |       |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
zoomsdk-build  | In file included from /tmp/meeting-sdk-linux-sample/build/libawscpp-download-prefix/src/libawscpp-download-build/.deps/build/src/AwsCCommon/tests/byte_buf_test.c:16:
zoomsdk-build  | /tmp/meeting-sdk-linux-sample/build/libawscpp-download-prefix/src/libawscpp-download-build/.deps/build/src/AwsCCommon/include/aws/common/byte_buf.h:507:36: note: by argument 1 of type 'const void *' to 'aws_byte_buf_from_empty_array' declared here
zoomsdk-build  |   507 | AWS_COMMON_API struct aws_byte_buf aws_byte_buf_from_empty_array(const void *bytes, size_t capacity);
zoomsdk-build  |       |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
zoomsdk-build  | /tmp/meeting-sdk-linux-sample/build/libawscpp-download-prefix/src/libawscpp-download-build/.deps/build/src/AwsCCommon/tests/byte_buf_test.c:235:13: note: 'arr' declared here
zoomsdk-build  |   235 |     uint8_t arr[16];
zoomsdk-build  |       |             ^~~

Reproduction Steps

just create a dummy app in c++ with cmake create container and add the abover externalProjects...

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.8.17

Compiler and Version used

11.4.0

Operating System and version

platform=linux/amd64 ubuntu:22.04

sbiscigl commented 9 months ago

GIT_TAG 1.8.17

thats a rather old tag that references an equally as old commit in the common runtime which appears to have a warning in tests. neither of those versions will be updated with any fixes. Is there a reason you cannot use the latest version?

github-actions[bot] commented 9 months ago

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.