Aws-sdk-cpp: When installing aws-sdk-cpp[transfer] with Visual Studio 2019, I got warning C4244

Created on 22 Jul 2020  路  7Comments  路  Source: aws/aws-sdk-cpp

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
A clear and concise description of what the bug is.
When installing aws-sdk-cpp[transfer] on VCPKG, I will get the following error. The related issue: https://github.com/microsoft/vcpkg/issues/12481

vcpkg\buildtrees\aws-sdk-cpp\src\1711dd1357-e84fc182db.clean\aws-cpp-sdk-transfer\source\transfer\TransferManager.cpp
vcpkg\buildtrees\aws-sdk-cpp\src\1711dd1357-e84fc182db.clean\aws-cpp-sdk-transfer\source\transfer\TransferManager.cpp(672): error C2220: the following warning is treated as an error
vcpkg\buildtrees\aws-sdk-cpp\src\1711dd1357-e84fc182db.clean\aws-cpp-sdk-transfer\source\transfer\TransferManager.cpp(672): warning C4244: 'argument': conversion from 'uint64_t' to 'size_t', possible loss of data
vcpkg\buildtrees\aws-sdk-cpp\src\1711dd1357-e84fc182db.clean\aws-cpp-sdk-transfer\source\transfer\TransferManager.cpp(671): warning C4244: 'argument': conversion from 'uint64_t' to 'size_t', possible loss of data
vcpkg\buildtrees\aws-sdk-cpp\src\1711dd1357-e84fc182db.clean\aws-cpp-sdk-transfer\source\transfer\TransferManager.cpp(740): warning C4244: 'argument': conversion from 'uint64_t' to 'size_t', possible loss of data
vcpkg\buildtrees\aws-sdk-cpp\src\1711dd1357-e84fc182db.clean\aws-cpp-sdk-transfer\source\transfer\TransferManager.cpp(739): warning C4244: 'argument': conversion from 'uint64_t' to 'size_t', possible loss of data
vcpkg\buildtrees\aws-sdk-cpp\src\1711dd1357-e84fc182db.clean\aws-cpp-sdk-transfer\source\transfer\TransferManager.cpp(819): warning C4244: 'initializing': conversion from 'uint64_t' to 'size_t', possible loss of data

SDK version number
Windows SDK 10.0.18362.0
Visual Studio 2019 16.6.5
Platform/OS/Hardware/Device
What are you running the sdk on?

To Reproduce (observed behavior)
Steps to reproduce the behavior (please share code)

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install aws-sdk-cpp[transfer]

Expected behavior
A clear and concise description of what you expected to happen.

Logs/output
If applicable, add logs or error output.

To enable logging, set the following system properties:

REMEMBER TO SANITIZE YOUR PERSONAL INFO

options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace;
Aws::InitAPI(options)

Additional context
Add any other context about the problem here.

bug third-party

All 7 comments

Hi @LilyWangL ,
sorry for the lack of response here, as an update:
I'm able to reproduce this and we are working on a fix.

Thanks for bringing it up to us.

What about this bug ?
Thank You.

hi @POWER-KI ,
Sorry the fix has been pushed on our side but I haven't created the PR for vcpkg to use the latest version of the sdk, I'll try getting around to doing that this week but if you have the time you could submit one to the vcpkg repo.

Hi,
By when this fix would be available in latest 1.8.x version?
Thank you.

I have found this solution:
add to CMAKE_CXX_FLAGS /WX-

Another thing if you try the example (from Using SDK) :
https://aws.amazon.com/blogs/developer/using-cmake-exports-with-the-aws-sdk-for-c/

you have to to add :

cmake -Daws-checksums_DIR=[pathTo... \out\install\x86-Releaselib\aws-checksums\cmake]
-Daws-c-common_DIR=[pathTo... \out\install\x86-Releaselib\aws-c-common\cmake]
-Daws-c-event-stream_DIR=[pathTo... \out\install\x86-Releaselib\aws-c-event-stream\cmake]
_and then follow the example :_
鈥揇aws-sdk-cpp_DIR=[path to your SDK build] [path to your source] -G "Visual Studio 16 2019" -A "Win32"

@KaibaLopez, aws-sdk-cpp has been upgraded to 1.8.83 in vcpkg, and this issue has been fixed, thanks for fixing this issue!

鈿狅笍COMMENT VISIBILITY WARNING鈿狅笍

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Was this page helpful?
0 / 5 - 0 ratings