问题描述
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/Users/jioby/Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/Users/jioby/Applications/CLion.app/Contents/bin/ninja/mac/aarch64/ninja -DWITH_DEBUG=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=boost -DDOWNLOAD_BOOST_TIMEOUT=60000 -DCMAKE_INSTALL_PREFIX=build_out -DMYSQL_DATADIR=build_out/data -DSYSCONFDIR=build_out/etc -DMYSQL_TCP_PORT=3307 -DMYSQL_UNIX_ADDR=mysql-debug.sock -G Ninja -S /Users/jioby/code/mysql-annotated-5.7.35 -B /Users/jioby/code/mysql-annotated-5.7.35/cmake-build-debug
CMake Deprecation Warning at CMakeLists.txt:30 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
···
-- suffixes <.a;.so;.dylib;.tbd>
-- OPENSSL_INCLUDE_DIR = /opt/homebrew/include
-- OPENSSL_LIBRARY = /opt/homebrew/lib/libssl.a
-- CRYPTO_LIBRARY = /opt/homebrew/lib/libcrypto.a
-- OPENSSL_MAJOR_VERSION =
-- OPENSSL_MINOR_VERSION =
-- OPENSSL_FIX_VERSION =
CMake Error at cmake/ssl.cmake:247 (MESSAGE):
SSL version must be at least 1.1.1
Call Stack (most recent call first):
CMakeLists.txt:568 (MYSQL_CHECK_SSL)
-- Configuring incomplete, errors occurred!
|
解决方案
本机同时安装有 openssl@1.1
和 openssl@3
,默认是 openssl@3
。而默认配置是 -DWITH_SSL=system
,即系统默认的 SSL。
CMake 选项手动指定 WITH_SSL
并指定路径:
1
|
-DWITH_SSL=/opt/homebrew/Cellar/openssl@1.1/1.1.1w
|
如果本机并未安装有 openssl@1.1.1
,那么使用 Brew 安装一个即可,这样可以保证多版本共存且不影响其他软件。
1
|
brew install openssl@1.1
|
参考资料