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

Compile Error Version 1.9.88 gcc 11.1.0 #1750

Closed
theShmoo opened this issue Aug 25, 2021 · 6 comments
Closed

Compile Error Version 1.9.88 gcc 11.1.0 #1750

theShmoo opened this issue Aug 25, 2021 · 6 comments
Assignees
Labels
bug This issue is a bug. closing-soon This issue will automatically close in 4 days unless further comments are made.

Comments

@theShmoo
Copy link
Contributor

Compile error because of warning:

Output:

[ 89%] Building CXX object aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/source/utils/event/EventStreamDecoder.cpp.o
In file included from aws-sdk-cpp/aws-cpp-sdk-core/include/aws/core/utils/event/EventHeader.h:13,
                 from /aws-sdk-cpp/aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp:7:
/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp: In function 'static void Aws::Utils::Event::EventStreamDecoder::onPayloadSegment(aws_event_stream_streaming_decoder*, aws_byte_buf*, int8_t, void*)':
/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp:77:77: error: 'this' pointer is null [-Werror=nonnull]
   77 |                         "ErrorMessage: " << handler->GetEventPayloadAsString());
      |                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/aws-sdk-cpp/aws-cpp-sdk-core/include/aws/core/utils/logging/LogMacros.h:143:30: note: in definition of macro 'AWS_LOGSTREAM_ERROR'
  143 |                 logStream << streamExpression; \
      |                              ^~~~~~~~~~~~~~~~
/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp: In static member function 'static void Aws::Utils::Event::EventStreamDecoder::onHeaderReceived(aws_event_stream_streaming_decoder*, aws_event_stream_message_prelude*, aws_event_stream_header_value_pair*, void*)':
/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp:134:77: error: 'this' pointer is null [-Werror=nonnull]
  134 |                         "ErrorMessage: " << handler->GetEventPayloadAsString());
      |                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/aws-sdk-cpp/aws-cpp-sdk-core/include/aws/core/utils/logging/LogMacros.h:143:30: note: in definition of macro 'AWS_LOGSTREAM_ERROR'
  143 |                 logStream << streamExpression; \
      |                              ^~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/build.make:782: aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/source/utils/event/EventStreamDecoder.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:853: aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

SDK version number

1.9.88

Platform/OS/Hardware/Device

$ cmake .. -DBUILD_ONLY:STRING="s3" -DCMAKE_BUILD_TYPE:STRING=Release -DOPENSSL_ROOT_DIR:PATH=/usr/local/
-- TARGET_ARCH not specified; inferring host OS to be platform compilation target
-- Building AWS libraries as shared objects
-- Generating linux build config
-- Building project version: 1.9.88
-- The CXX compiler identification is GNU 11.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/gcc-11.1.0/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") 
--   Zlib library: /usr/lib64/libz.so
-- Encryption: Openssl
-- Found OpenSSL: /usr/local/lib64/libcrypto.so (found version "1.1.1k")  
--   Openssl include directory: /usr/local/include
--   Openssl library: /usr/local/lib64/libssl.so;/usr/local/lib64/libcrypto.so
-- Http client: Curl
-- Found CURL: /usr/lib64/libcurl.so (found version "7.61.1")  
--   Curl include directory: /usr/include
--   Curl library: /usr/lib64/libcurl.so
-- Performing Test HAVE_ATOMICS_WITHOUT_LIBATOMIC
-- Performing Test HAVE_ATOMICS_WITHOUT_LIBATOMIC - Success
-- The C compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/gcc-11.1.0/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- AWS CRT C++ 1.9.88
CMake Warning (dev) at crt/aws-crt-cpp/crt/aws-c-common/CMakeLists.txt:5 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'STATIC_CRT'.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- CMake 3.20.2
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS
-- Performing Test AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS - Success
-- Performing Test AWS_HAVE_MSVC_MULX
-- Performing Test AWS_HAVE_MSVC_MULX - Failed
-- Performing Test AWS_HAVE_WINAPI_DESKTOP
-- Performing Test AWS_HAVE_WINAPI_DESKTOP - Failed
-- Performing Test AWS_ARCH_INTEL
-- Performing Test AWS_ARCH_INTEL - Success
-- Performing Test AWS_ARCH_ARM64
-- Performing Test AWS_ARCH_ARM64 - Failed
-- Performing Test AWS_ARCH_ARM32
-- Performing Test AWS_ARCH_ARM32 - Failed
-- Performing Test AWS_HAVE_GCC_INLINE_ASM
-- Performing Test AWS_HAVE_GCC_INLINE_ASM - Success
-- Performing Test AWS_HAVE_AUXV
-- Performing Test AWS_HAVE_AUXV - Success
-- Performing Test AWS_HAVE_EXECINFO
-- Performing Test AWS_HAVE_EXECINFO - Success
-- Performing Test AWS_SHOULD_DISABLE_STRINGOP_OVERFLOW
-- Performing Test AWS_SHOULD_DISABLE_STRINGOP_OVERFLOW - Success
-- Performing Test HAVE_M_AVX2_FLAG
-- Performing Test HAVE_M_AVX2_FLAG - Success
-- Performing Test HAVE_AVX2_INTRINSICS
-- Performing Test HAVE_AVX2_INTRINSICS - Success
-- Performing Test HAVE_MM256_EXTRACT_EPI64
-- Performing Test HAVE_MM256_EXTRACT_EPI64 - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Performing Test HAS_MOUTLINE_ATOMICS
-- Performing Test HAS_MOUTLINE_ATOMICS - Failed
-- Performing Test HAS_64BIT_FILE_OFFSET_BY_DEFAULT
-- Performing Test HAS_64BIT_FILE_OFFSET_BY_DEFAULT - Success
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Performing Test HAS_WGNU
-- Performing Test HAS_WGNU - Failed
-- Performing Test HAVE_SYSCONF
-- Performing Test HAVE_SYSCONF - Success
-- Looking for pthread_attr_setaffinity_np
-- Looking for pthread_attr_setaffinity_np - found
-- Performing Test HAS_SANITIZERS
-- Performing Test HAS_SANITIZERS - Failed
-- Building SIMD base64 decoder
-- The ASM compiler identification is GNU
-- Found assembler: /opt/gcc-11.1.0/bin/cc
-- Enabling SIKEP434R3 assembly code
-- Enabling BIKE_R3 x86_64 optimizations
-- Support for ADX assembly instructions detected
-- Found LibCrypto: /usr/local/lib64/libcrypto.so  
-- LibCrypto Include Dir: /usr/local/include
-- LibCrypto Shared Lib:  /usr/local/lib64/libcrypto.so
-- LibCrypto Static Lib:  /usr/local/lib64/libcrypto.so
-- Using libcrypto from system: /usr/local/lib64/libcrypto.so
-- Add s3-crt:s3 to C2J_SPECIAL_NAME_LIST
-- Considering s3
-- Looking for pathconf
-- Looking for pathconf - found
-- Looking for umask
-- Looking for umask - found
-- Updating version info to 1.9.88
-- Custom memory management disabled
-- Performing Test CURL_HAS_H2
-- Performing Test CURL_HAS_H2 - Failed
-- Performing Test CURL_HAS_TLS_PROXY
-- Performing Test CURL_HAS_TLS_PROXY - Failed
-- Configuring done
-- Generating done
@theShmoo theShmoo added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 25, 2021
@theShmoo
Copy link
Contributor Author

A fast patch:

diff --git a/aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp b/aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp
index f70a6c88f..10e9fb7d2 100644
--- a/aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp
+++ b/aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp
@@ -72,9 +72,6 @@ namespace Aws
                 assert(handler);
                 if (!handler)
                 {
-                    AWS_LOGSTREAM_ERROR(EVENT_STREAM_DECODER_CLASS_TAG, "Payload received, but decoder encountered internal errors before."
-                        "ErrorCode: " << EventStreamErrorsMapper::GetNameForError(handler->GetInternalError()) << ", "
-                        "ErrorMessage: " << handler->GetEventPayloadAsString());
                     return;
                 }
                 handler->WriteMessageEventPayload(static_cast<unsigned char*>(payload->buffer), payload->len);
@@ -129,9 +126,6 @@ namespace Aws
                 assert(handler);
                 if (!handler)
                 {
-                    AWS_LOGSTREAM_ERROR(EVENT_STREAM_DECODER_CLASS_TAG, "Payload received, but decoder encountered internal errors before."
-                        "ErrorCode: " << EventStreamErrorsMapper::GetNameForError(handler->GetInternalError()) << ", "
-                        "ErrorMessage: " << handler->GetEventPayloadAsString());
                     return;
                 }

@theShmoo
Copy link
Contributor Author

@jmklix sorry for asking again. But it is quite important for us to use s3 and we can't compile it without a patch right now. Could you check out my pull request?

@theShmoo
Copy link
Contributor Author

@KaibaLopez @jmklix This is obviously a bug! Why is this treated with such a low priority? I can't be the only one running into this problem?

kou added a commit to kou/arrow that referenced this issue Oct 24, 2021
We need a workaround for aws-sdk-cpp with g++ 11 because Ubuntu
21.10 ships g++ 11.
See also: aws/aws-sdk-cpp#1750
kou added a commit to kou/arrow that referenced this issue Oct 24, 2021
We need a workaround for aws-sdk-cpp with g++ 11 because Ubuntu
21.10 ships g++ 11.
See also: aws/aws-sdk-cpp#1750
kou added a commit to apache/arrow that referenced this issue Oct 26, 2021
We need a workaround for aws-sdk-cpp with g++ 11 because Ubuntu
21.10 ships g++ 11.
See also: aws/aws-sdk-cpp#1750

Closes #11532 from kou/packaging-ubuntu-21.10

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
ViniciusSouzaRoque pushed a commit to s1mbi0se/arrow that referenced this issue Nov 3, 2021
We need a workaround for aws-sdk-cpp with g++ 11 because Ubuntu
21.10 ships g++ 11.
See also: aws/aws-sdk-cpp#1750

Closes apache#11532 from kou/packaging-ubuntu-21.10

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
kou added a commit to apache/arrow that referenced this issue Nov 10, 2021
We need a workaround for aws-sdk-cpp with g++ 11 because Ubuntu
21.10 ships g++ 11.
See also: aws/aws-sdk-cpp#1750

Closes #11532 from kou/packaging-ubuntu-21.10

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
@KaibaLopez
Copy link
Contributor

Hi @theShmoo ,
This should have been taken care of now, can you verify that it works for you?

@KaibaLopez KaibaLopez added closing-soon This issue will automatically close in 4 days unless further comments are made. and removed needs-triage This issue or PR still needs to be triaged. labels Nov 19, 2021
@theShmoo
Copy link
Contributor Author

Thank you very much for fixing this! It works now without the patch. -> closed

@github-actions
Copy link

⚠️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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closing-soon This issue will automatically close in 4 days unless further comments are made.
Projects
None yet
Development

No branches or pull requests

3 participants