Description:
"Configuring SSL Library Support" documentation page for 8.0 states that building MySQL requires at least OpenSSL version 1.0.1. However, building fails when OpenSSL 1.0.2 is installed, and WITHOUT_SERVER=ON option is set.
The error is:
/build/tmp-build/mysql-8.0.35/sql-common/client.cc: In function 'void* mysql_get_ssl_session_data(MYSQL*, unsigned int, unsigned int*)':
/build/tmp-build/mysql-8.0.35/sql-common/client.cc:3530:17: error: 'SSL_SESSION_is_resumable' was not declared in this scope
3530 | if (!sess || !SSL_SESSION_is_resumable(sess.get())) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/build/tmp-build/mysql-8.0.35/sql-common/client.cc: In function 'SSL_SESSION* ssl_session_deserialize_from_data_ptr(MYSQL*, char*)':
/build/tmp-build/mysql-8.0.35/sql-common/client.cc:3575:17: error: 'SSL_SESSION_is_resumable' was not declared in this scope
3575 | if (ret && !SSL_SESSION_is_resumable(ret)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
With WITHOUT_SERVER=OFF (which is the default), the build succeeds.
How to repeat:
1. Prepare a clean environment based on a distro with OpenSSL pre-1.1.1 (e.g. Ubuntu Xenial)
2. Prepare MySQL sources
3. cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITHOUT_SERVER=ON -DWITH_SSL=system -DWITH_ZLIB=bundled -DWITH_LIBWRAP=OFF -DWITH_AUTHENTICATION_FIDO=OFF -DWITH_AUTHENTICATION_KERBEROS=OFF -DWITH_AUTHENTICATION_LDAP=OFF
4. make
Suggested fix:
In source file sql-common/client.cc, move 'SSL_SESSION_is_resumable' stub definition out of '#ifdef HAVE_PSI_INTERFACE' block.
Description: "Configuring SSL Library Support" documentation page for 8.0 states that building MySQL requires at least OpenSSL version 1.0.1. However, building fails when OpenSSL 1.0.2 is installed, and WITHOUT_SERVER=ON option is set. The error is: /build/tmp-build/mysql-8.0.35/sql-common/client.cc: In function 'void* mysql_get_ssl_session_data(MYSQL*, unsigned int, unsigned int*)': /build/tmp-build/mysql-8.0.35/sql-common/client.cc:3530:17: error: 'SSL_SESSION_is_resumable' was not declared in this scope 3530 | if (!sess || !SSL_SESSION_is_resumable(sess.get())) { | ^~~~~~~~~~~~~~~~~~~~~~~~ /build/tmp-build/mysql-8.0.35/sql-common/client.cc: In function 'SSL_SESSION* ssl_session_deserialize_from_data_ptr(MYSQL*, char*)': /build/tmp-build/mysql-8.0.35/sql-common/client.cc:3575:17: error: 'SSL_SESSION_is_resumable' was not declared in this scope 3575 | if (ret && !SSL_SESSION_is_resumable(ret)) { | ^~~~~~~~~~~~~~~~~~~~~~~~ With WITHOUT_SERVER=OFF (which is the default), the build succeeds. How to repeat: 1. Prepare a clean environment based on a distro with OpenSSL pre-1.1.1 (e.g. Ubuntu Xenial) 2. Prepare MySQL sources 3. cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITHOUT_SERVER=ON -DWITH_SSL=system -DWITH_ZLIB=bundled -DWITH_LIBWRAP=OFF -DWITH_AUTHENTICATION_FIDO=OFF -DWITH_AUTHENTICATION_KERBEROS=OFF -DWITH_AUTHENTICATION_LDAP=OFF 4. make Suggested fix: In source file sql-common/client.cc, move 'SSL_SESSION_is_resumable' stub definition out of '#ifdef HAVE_PSI_INTERFACE' block.