找不到 OpenSSL ...缺少:OPENSSL_CRYPTO_LIBRARY
我正在尝试交叉编译 aws-sdk-cpp,但在第一次运行 CMAKE 时出现以下错误。如果我第二次运行它,它会编译并链接,并且我已经测试了该应用程序,并且我确实可以使用 aws-sdk-cpp 功能。我已经搜索了好几天并尝试了各种事情:
- 为 OPENSSL_ROOT_DIR 设置环境变量
- 将其设置在 cmake 变量中,等等。
我在调用之前打印 OPENSSL_ROOT_DIR 变量
find_package(OpenSSL REQUIRED)
,它打印正确的内容小路。
我还将变量 OPENSSL_USE_STATIC_LIBS 设置为 TRUE,没有任何区别。 老实说,我不明白发生了什么,因为如果我第二次运行它,它就会构建和链接得很好。
CMake Error at /snap/cmake/1035/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR) (found version "1.1.1n")
Call Stack (most recent call first):
/snap/cmake/1035/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/snap/cmake/1035/share/cmake-3.22/Modules/FindOpenSSL.cmake:574 (find_package_handle_standard_args)
Projects/libraries/aws/s3/crt/aws-crt-cpp/crt/aws-c-cal/CMakeLists.txt:89 (find_package)
I am trying to cross-compile the aws-sdk-cpp and I am getting the following error just the very first time I run CMAKE. If I run it a second time it compiles and links and I have tested the application and I can indeed use the aws-sdk-cpp functionality. I have searched and searched for days and tried all kinds of things:
- Setting environment variable for OPENSSL_ROOT_DIR
- Setting it in a cmake variable, etc.
I print the OPENSSL_ROOT_DIR
variable right before the call to
find_package(OpenSSL REQUIRED)
and it prints the right PATH.
I have also set the variable OPENSSL_USE_STATIC_LIBS
to TRUE without any difference.
I honestly don't understand what is going on since if I run it a second time it builds and links just fine.
CMake Error at /snap/cmake/1035/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR) (found version "1.1.1n")
Call Stack (most recent call first):
/snap/cmake/1035/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/snap/cmake/1035/share/cmake-3.22/Modules/FindOpenSSL.cmake:574 (find_package_handle_standard_args)
Projects/libraries/aws/s3/crt/aws-crt-cpp/crt/aws-c-cal/CMakeLists.txt:89 (find_package)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我已经知道发生了什么事。
问题是我正在设置“
一旦删除它们”的值,它就起作用了。
Ok so I have figured what was going on.
the issue was that I was setting the values for
Once I deleted them it worked.