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

libcrypto linking issue with AWS SDK 1.11.285 #2962

Closed
srinivasab3 opened this issue May 15, 2024 · 2 comments · Fixed by #2952
Closed

libcrypto linking issue with AWS SDK 1.11.285 #2962

srinivasab3 opened this issue May 15, 2024 · 2 comments · Fixed by #2952
Labels
bug This issue is a bug. p2 This is a standard priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.

Comments

@srinivasab3
Copy link

Describe the bug

Built the AWS SDK CPP with version 1.11.285.

Application CMake file looks something like this.

find_package(AWSSDK REQUIRED COMPONENTS kinesis s3 secretsmanager ssm lambda iot)
find_package(aws-crt-cpp REQUIRED)
find_package(aws-cpp-sdk-iot REQUIRED)
find_package(IotShadow-cpp REQUIRED)
find_package(crypto REQUIRED)

But we are getting the below error while running.
Apr 11 11:23:50 localhost cis[22510]: [cis-1] /opt/x/x/cis/lib/cis/cis: symbol lookup error: /opt/x/x/tools/lib/libs2n.so.1: undefined symbol: CRYPTO_tls1_prf
Apr 11 11:23:50 localhost cis[22510]: [ERROR] [cis-1]: process has died [pid 22589, exit code 127, cmd '/opt/x/x/cis/lib/cis/cis --config-file

CRYPTO_tls1_prf this function is present in the AWS prebuilt libcrypto.so.

root@localhost:~# ls -l /opt/x/x/tools/lib/libcrypto.so
-rw-r--r-- 1 root root 13434240 May 14 05:52 /opt/x/x/tools/lib/libcrypto.so

But there are libcrypto.so is present in other two locations.

root@localhost:~# ls -l /usr/lib/aarch64-linux-gnu/libcrypto.so*
-rw-r--r-- 1 root root 1770176 Mar 17 2022 /usr/lib/aarch64-linux-gnu/libcrypto.so.1.0.2
-rw-r--r-- 1 root root 2112712 May 15 2022 /usr/lib/aarch64-linux-gnu/libcrypto.so.1.1

root@localhost:~# ls -l /usr/local/lib/openssl-1.1.1/lib/libcrypto.so*
lrwxrwxrwx 1 root staff 16 Oct 13 2021 /usr/local/lib/openssl-1.1.1/lib/libcrypto.so -> libcrypto.so.1.1
-rwxr-xr-x 1 root staff 2849520 May 14 13:00 /usr/local/lib/openssl-1.1.1/lib/libcrypto.so.1.1

root@localhost:~# nm /opt/x/x/tools/lib/libcrypto.so | grep tls1_prf
000000000015acb0 T CRYPTO_tls1_prf

root@localhost:# nm /usr/lib/aarch64-linux-gnu/libcrypto.so.1.0.2
nm: /usr/lib/aarch64-linux-gnu/libcrypto.so.1.0.2: no symbols
root@localhost:
# nm /usr/lib/aarch64-linux-gnu/libcrypto.so.1.1
nm: /usr/lib/aarch64-linux-gnu/libcrypto.so.1.1: no symbols

root@localhost:~# nm /usr/local/lib/openssl-1.1.1/lib/libcrypto.so.1.1 | grep tls1_prf
000000000015db20 t pkey_tls1_prf_cleanup
000000000015d740 t pkey_tls1_prf_ctrl
000000000015db70 t pkey_tls1_prf_ctrl_str
000000000015dd20 t pkey_tls1_prf_derive
000000000015e2e8 t pkey_tls1_prf_init
000000000015d888 t tls1_prf_P_hash
00000000002488e0 d tls1_prf_pkey_meth

libs2n.so.1 is linking to /usr/local/lib/openssl-1.1.1/lib/libcrypto.so.1.1

ldd /opt/x/x/tools/lib/libs2n.so.1
linux-vdso.so.1 (0x0000ffffbe99d000)
libcrypto.so => /usr/local/lib/openssl-1.1.1/lib/libcrypto.so (0x0000ffffbe5a3000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffffbe572000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffffbe3fc000)
/lib/ld-linux-aarch64.so.1 (0x0000ffffbe96d000)
libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000ffffbe3d4000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffffbe3c0000)

Please let us know how we can fix this.

Expected Behavior

It should run fine without any linking error

Current Behavior

Apr 11 11:23:50 localhost cis[22510]: [cis-1] /opt/x/x/cis/lib/cis/cis: symbol lookup error: /opt/x/x/tools/lib/libs2n.so.1: undefined symbol: CRYPTO_tls1_prf
Apr 11 11:23:50 localhost cis[22510]: [ERROR] [cis-1]: process has died [pid 22589, exit code 127, cmd '/opt/x/x/cis/lib/cis/cis --config-file

Reproduction Steps

Mentioned above

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.11.285

Compiler and Version used

set(CMAKE_CXX_STANDARD 14)

Operating System and version

Linux

@srinivasab3 srinivasab3 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 15, 2024
@jmklix
Copy link
Member

jmklix commented May 15, 2024

We are currently working on this: #2952

@jmklix jmklix added p2 This is a standard priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet. and removed needs-triage This issue or PR still needs to be triaged. labels May 15, 2024
@jmklix jmklix linked a pull request May 15, 2024 that will close this issue
11 tasks
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

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. p2 This is a standard priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants