Skip to content

Build failed on RHEL9 with OpenSSL 3 #2622

@majestix508

Description

@majestix508

I was building the main branch with:
cmake -DBUILD_ONLY="sns" -DBUILD_SHARED_LIBS=OFF ../
But at the make-run I get Segmentation Faults on sns-gen-tests so I tried to build with:

cmake -DBUILD_ONLY="sns" ../
then on "make -j 4 VERBOSE=1" I get this output:

cd /home/someuser/aws-sdk-cpp/build/generated/tests/sns-gen-tests && /usr/bin/cmake -E cmake_link_script CMakeFiles/sns-gen-tests.dir/link.txt --verbose=1

/usr/bin/c++ -O3 -DNDEBUG @CMakeFiles/sns-gen-tests.dir/objects1.rsp -o sns-gen-tests  -Wl,-rpath,/home/someuser/aws-sdk-cpp/build/tests/testing-resources:/home/someuser/aws-sdk-cpp/build/generated/src/aws-cpp-sdk-sns:/home/someuser/aws-sdk-cpp/build/src/aws-cpp-sdk-core ../../../tests/testing-resources/libtesting-resources.so ../../src/aws-cpp-sdk-sns/libaws-cpp-sdk-sns.so ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so ../../../crt/aws-crt-cpp/libaws-crt-cpp.a ../../../crt/aws-crt-cpp/crt/aws-c-mqtt/libaws-c-mqtt.a ../../../lib/libaws-c-event-stream.a ../../../crt/aws-crt-cpp/crt/aws-c-s3/libaws-c-s3.a ../../../crt/aws-crt-cpp/crt/aws-c-auth/libaws-c-auth.a ../../../crt/aws-crt-cpp/crt/aws-c-http/libaws-c-http.a ../../../crt/aws-crt-cpp/crt/aws-c-io/libaws-c-io.a ../../../lib/libs2n.a /usr/lib64/libcrypto.so ../../../crt/aws-crt-cpp/crt/aws-c-compression/libaws-c-compression.a ../../../crt/aws-crt-cpp/crt/aws-c-cal/libaws-c-cal.a /usr/lib64/libcrypto.so ../../../crt/aws-crt-cpp/crt/aws-c-sdkutils/libaws-c-sdkutils.a ../../../crt/aws-crt-cpp/crt/aws-checksums/libaws-checksums.a ../../../crt/aws-crt-cpp/crt/aws-c-common/libaws-c-common.a -lpthread -ldl -lm -lrt 
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `OPENSSL_free'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_CIPHER_CTX_key_length'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `sk_pop_free_ex'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `SSLeay'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `X509_NAME_hash'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_CIPHER_CTX_cleanup'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_aead_aes_256_gcm_tls13'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `AWSLC_thread_local_clear'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_AEAD_CTX_seal'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `sk_new_null'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `BN_num_bytes'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_AEAD_CTX_open'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_aead_aes_128_gcm'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_AEAD_CTX_cleanup'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_MD_CTX_destroy'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_aead_chacha20_poly1305'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_PKEY_get1_tls_encodedpoint'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `OPENSSL_malloc'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `AWSLC_thread_local_shutdown'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `sk_num'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_AEAD_CTX_free'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `sk_value'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_MD_CTX_create'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `sk_free'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `FIPS_mode'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_PKEY_base_id'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_aead_aes_256_gcm'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_AEAD_CTX_init'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_CIPHER_CTX_init'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `sk_push'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_AEAD_CTX_zero'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_aead_aes_256_gcm_tls12'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_aead_aes_128_gcm_tls13'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `SSLeay_version'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_MD_size'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_aead_aes_128_gcm_tls12'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_PKEY_size'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `CRYPTO_tls1_prf'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_PKEY_set1_tls_encodedpoint'
/usr/bin/ld: ../../../src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so: undefined reference to `EVP_MD_CTX_size'
collect2: error: ld returned 1 exit status
make[2]: *** [generated/tests/sns-gen-tests/CMakeFiles/sns-gen-tests.dir/build.make:134: generated/tests/sns-gen-tests/sns-gen-tests] Error 1
make[2]: Leaving directory '/home/someuser/aws-sdk-cpp/build'
make[1]: *** [CMakeFiles/Makefile2:939: generated/tests/sns-gen-tests/CMakeFiles/sns-gen-tests.dir/all] Error 2
make[1]: Leaving directory '/home/someuser/aws-sdk-cpp/build'
make: *** [Makefile:156: all] Error 2

Expected Behavior

build should finish and tests should pass

Current Behavior

failed on build - see description

Reproduction Steps

RHEL 9.2 (Plow)
gcc 11.3.1
openssl 1.3.0

git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp
cd aws-sdk-cpp
mkdir build;cd build

cmake -DBUILD_ONLY="sns" -DBUILD_SHARED_LIBS=OFF ../
or
cmake -DBUILD_ONLY="sns" ../

make -j 4

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.11.137

Compiler and Version used

gcc 11.3.1

Operating System and version

RHEL 9.2

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.closed-for-stalenessp2This is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions