Bug #119800 An error occurred in ssl.cmake reading version information from opensslv.h, causing HAVE_TLSv13 to fail to compile.
| Submitted: | 28 Jan 8:53 | Modified: | 28 Jan 10:28 |
|---|---|---|---|
| Reporter: | 宋 song | Email Updates: | |
| Status: | Open | Impact on me: | |
| Category: | MySQL Server: Compiling | Severity: | S1 (Critical) |
| Version: | 8.4 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[28 Jan 10:28]
宋 song
Sorry, ignore this submission.
The expression `IF("${OPENSSL_MAJOR_MINOR_FIX_VERSION}" VERSION_GREATER "1.1.0")` can be compared.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: hello: An error occurred in ssl.cmake reading version information from opensslv.h, causing HAVE_TLSv13 to fail to compile. How to repeat: 1. For example, in opensslv.h, `#define OPENSSL_VERSION_NUMBER 0x1010117fL` corresponds to OpenSSL version 1.1.1w. 2. Directly using `STRING_APPEND(OPENSSL_MAJOR_MINOR_FIX_VERSION ".${OPENSSL_VERSION_MINOR}")` in ssl.cmake causes the final version `OPENSSL_MAJOR_MINOR_FIX_VERSION` to become 1.01.01. 3. This causes the following conditional statement to fail: `ADD_DEFINITIONS(-DHAVE_TLSv13)` `IF("${OPENSSL_MAJOR_MINOR_FIX_VERSION}" VERSION_GREATER "1.1.0")` `ADD_DEFINITIONS(-DHAVE_TLSv13)` `ENDIF()` Suggested fix: You can perform number base conversion before using it. `math(EXPR OPENSSL_VERSION_MINOR_DEC "0x${OPENSSL_VERSION_MINOR}")` `math(EXPR OPENSSL_FIX_VERSION_DEC "0x${OPENSSL_FIX_VERSION}")` `STRING_APPEND(OPENSSL_MAJOR_MINOR_FIX_VERSION ".${OPENSSL_VERSION_MINOR_DEC}")` `STRING_APPEND(OPENSSL_MAJOR_MINOR_FIX_VERSION ".${OPENSSL_FIX_VERSION_DEC}")`