[cheery-pick]fix bug that can't find libssl.1.1.1.so #57147
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Others
PR changes
Others
Description
Pcard-67010
背景:
PR50791之前为了在镜像里打入python3.10,python3.11,将镜像里的Openssl从1.0.2升级到1.1.1会导致一些本地openssl不是1.1.1的用户在import paddle时候报错如下:
导致的问题
升级之后libpaddle.so依赖了libssl.so1.1.1和libcrypto.so
原因
第三方库第三方库brpc.cmake中find_package(OPENSSL)在openssl1.0.2时得到的是静态库,升级为1.1.1后得到的是动态库libssl.so,故导致libpaddle.so link了libssl.so
解决办法:
解除依赖,用find_library找到libssl.a和libcrypto.a代替libssl.so和libcrypto.so