Bug #109251 | Cannot compile 5.7.39 on Ubuntu 22.04 because ssl is not found | ||
---|---|---|---|
Submitted: | 30 Nov 2022 16:06 | Modified: | 18 Jan 23:58 |
Reporter: | Mark Callaghan | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | 5.7.39, 5.7.40 | OS: | Ubuntu |
Assigned to: | CPU Architecture: | x86 |
[30 Nov 2022 16:06]
Mark Callaghan
[1 Dec 2022 10:09]
MySQL Verification Team
Hello Mark, Thank you for the report and feedback. Thanks, Umesh
[1 Dec 2022 10:15]
MySQL Verification Team
5.7.40 build details
Attachment: 109251_5.7.40.results (application/octet-stream, text), 19.85 KiB.
[7 Jan 7:29]
Roel Van de Paar
Thank you Mark for creating this bug. I am running into this also. While 5.5 and 8.0 compile fine on Ubuntu 22.04, 5.6 and 5.7 fail with this issue. This bug should be fixed asap IMHO, as it basically renders 5.6 and 5.7 unable to compile on the latest Ubuntu. The following hack also makes 5.7 compile: 1. Open cmake/ssl.cmake 2. Search for "# If we are invoked with" (around line 239 in current code) and just before that line add the following: SET(OPENSSL_INCLUDE_DIR "/usr/include/openssl") SET(OPENSSL_LIBRARY "/lib/x86_64-linux-gnu/libssl.a") SET(CRYPTO_LIBRARY "/lib/x86_64-linux-gnu/libcrypto.a") SET(OPENSSL_VERSION "1.1.1") SET(OPENSSL_MAJOR_VERSION "1") SET(OPENSSL_MINOR_VERSION "1") SET(OPENSSL_FIX_VERSION "1") SET(OPENSSL_FOUND TRUE) SET(WITH_SSL_PATH TRUE) 3. Compile as normal
[7 Jan 7:42]
Roel Van de Paar
The same patch works for 5.6. However, the build will fail with other errors using standard cmake. The issue seems to be a change in C++ standards or similar. Using clang instead of cmake makes the build succeed.
[7 Jan 7:54]
Roel Van de Paar
Btw, for 5.6 also search for 'If we are invoked with' and insert the same hack before that line, however that line has a lower line number (around line 205 currently) in 5.6.
[18 Jan 23:58]
Mark Callaghan
Replying to a previous comment ... Whether or not 8.x compiles OK on Ubuntu 22.04 depends on which version of 8.0. AFAIK MySQL 8 became ready for OpenSSL 3 in 8.0.30, so while I can get cmake to work for 8.0.28 with some edits, the build still fails.