Description:
The latest OpenSSL release, the 1.0.2 branch, added a little whitespace to the versioning header, which in turn has broken MySQL's compile.
------------------------------------------------
-- OPENSSL_INCLUDE_DIR = /usr/local/opt/openssl/include
-- OPENSSL_LIBRARY = /usr/local/opt/openssl/lib/libssl.dylib
-- CRYPTO_LIBRARY = /usr/local/opt/openssl/lib/libcrypto.dylib
-- OPENSSL_MAJOR_VERSION =
-- Looking for SHA512_DIGEST_LENGTH
-- Looking for SHA512_DIGEST_LENGTH - found
CMake Error at cmake/ssl.cmake:234 (MESSAGE):
Cannot find appropriate system libraries for SSL. Use WITH_SSL=bundled to
enable SSL support
Call Stack (most recent call first):
CMakeLists.txt:404 (MYSQL_CHECK_SSL)
----------------------------------------------------
Mike McQuaid of Homebrew has drawn up a short patch to fix the compile issue, which you can find here: https://github.com/mysql/mysql-server/pull/3 or attached at the bottom of this bug report.
Thanks!
How to repeat:
1) Compile OpenSSL 1.0.2
2) Build MySQL against it.
Suggested fix:
From de50476a36cdc18a832146d356e1aec3868fd1d1 Mon Sep 17 00:00:00 2001
From: Mike McQuaid <mike@mikemcquaid.com>
Date: Sun, 25 Jan 2015 11:32:42 +0000
Subject: [PATCH] ssl.cmake: fix version regex for OpenSSL 1.0.2.
OpenSSL 1.0.2 has whitespace between the # and define so make the regex more
liberal to match it accordingly.
---
cmake/ssl.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
index 42251a8..66eecd7 100644
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@ -166,7 +166,7 @@ MACRO (MYSQL_CHECK_SSL)
# Encoded as MNNFFPPS: major minor fix patch status
FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
OPENSSL_VERSION_NUMBER
- REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
+ REGEX "^#[\t ]+define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
)
STRING(REGEX REPLACE
"^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
--
2.1.4