aws-sdk-cpp icon indicating copy to clipboard operation
aws-sdk-cpp copied to clipboard

Compile fails with gcc 7.2.0

Open jp-ryussi opened this issue 8 years ago • 3 comments

I had the following error while compiling the SDK with options -DBUILD_ONLY="s3" on Ubuntu 14.04 with gcc 7.2.0

In file included from /root/S3_test/ios-s3-driver/aws-sdk-cpp/aws-cpp-sdk-core/include/aws/core/utils/ratelimiter/DefaultRateLimiter.h:21:0,
                 from /root/S3_test/ios-s3-driver/aws-sdk-cpp/aws-cpp-sdk-s3-integration-tests/BucketAndObjectOperationTest.cpp:25:
/root/S3_test/ios-s3-driver/aws-sdk-cpp/aws-cpp-sdk-core/include/aws/core/utils/memory/stl/AWSFunction.h:57:3: error: mangled name for ‘F Aws::BuildFunction(F) [with F = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > > (*)() noexcept]’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
 F BuildFunction(F f)
   ^~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [aws-cpp-sdk-s3-integration-tests/CMakeFiles/aws-cpp-sdk-s3-integration-tests.dir/BucketAndObjectOperationTest.cpp.o] Error 1
make[1]: *** [aws-cpp-sdk-s3-integration-tests/CMakeFiles/aws-cpp-sdk-s3-integration-tests.dir/all] Error 2
make: *** [all] Error 2

jp-ryussi avatar Dec 11 '17 13:12 jp-ryussi

You could try compiling without -Werror.

Bu11etmagnet avatar Dec 11 '17 13:12 Bu11etmagnet

I'm having the same issue with gcc version 7.2.1 20171128 (GCC) on Arch

In file included from /home/adam.vondersaar/Projects/aws-sdk-cpp/aws-cpp-sdk-core/include/aws/core/utils/ratelimiter/DefaultRateLimiter.h:21:0, from /home/adam.vondersaar/Projects/aws-sdk-cpp/aws-cpp-sdk-s3-integration-tests/BucketAndObjectOperationTest.cpp:25: /home/adam.vondersaar/Projects/aws-sdk-cpp/aws-cpp-sdk-core/include/aws/core/utils/memory/stl/AWSFunction.h:57:3: error: mangled name for ‘F Aws::BuildFunction(F) [with F = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > > (*)() noexcept]’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type] F BuildFunction(F f) ^~~~~~~~~~~~~ cc1plus: all warnings being treated as errors make[2]: *** [aws-cpp-sdk-s3-integration-tests/CMakeFiles/aws-cpp-sdk-s3-integration-tests.dir/build.make:64: aws-cpp-sdk-s3-integration-tests/CMakeFiles/aws-cpp-sdk-s3-integration-tests.dir/BucketAndObjectOperationTest.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:285: aws-cpp-sdk-s3-integration-tests/CMakeFiles/aws-cpp-sdk-s3-integration-tests.dir/all] Error 2 make: *** [Makefile:130: all] Error 2

trashguy avatar Dec 11 '17 14:12 trashguy

See https://github.com/aws/aws-sdk-cpp/issues/620

singku avatar Dec 11 '17 18:12 singku