Bug #115535 Update build platform for openSUSE 15 RPMS to openSUSE 15.6
Submitted: 7 Jul 2024 21:24 Modified: 14 Aug 2024 18:53
Reporter: Peter VARGA Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:9.0.0 OS:SUSE (15 SP6)
Assigned to: CPU Architecture:Any

[7 Jul 2024 21:24] Peter VARGA
Description:
The SLES 15 SP6 is using new glibc and openssl versions. Compiling any source using libmysqlclient.so fails with:

ld: warning: libssl.so.1.1, needed by /usr/lib64/mysql/libmysqlclient.so, may conflict with libssl.so.3
ld: warning: libcrypto.so.1.1, needed by /usr/lib64/mysql/libmysqlclient.so, may conflict with libcrypto.so.3

Existing programs compiled below SLES 15 SP6 crash.

How to repeat:
mysql-foo.cpp:

#include <mysql.h>

int main()
{
   mysql_library_init( 0, nullptr, nullptr );
   return 0;
}

g++-13 `mysql_config --include` mysql-foo.cpp -o mysql-foo `mysql_config --libs`

Suggested fix:
Update the openssl version to the SLES 15 SP6.
[7 Jul 2024 23:04] Peter VARGA
Of course, a workaround is to add the correct libraries to the link command:

g++-13 `mysql_config --include` mysql-foo.cpp -o mysql-foo `mysql_config
--libs` /usr/lib64/libssl.so.1.1 /usr/lib64/libcrypto.so.1.1
[8 Jul 2024 8:29] Terje Røsten
Hi,

which RPM package is used? 

What is output from:

$ rpm -qa | grep -i mysql
[8 Jul 2024 8:36] Terje Røsten
Seems to work fine here:

$ zypper install mysql-community-devel

[snip]

The following 4 NEW packages are going to be installed:
  mysql-community-client-plugins mysql-community-common mysql-community-devel mysql-community-libs

4 new packages to install.
Overall download size: 11.4 MiB. Already cached: 0 B. After the operation, additional 84.9 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y

[snip]

(1/4) Installing: mysql-community-client-plugins-9.0.0-1.sl15.x86_64 ........................................................................[done]
(2/4) Installing: mysql-community-common-9.0.0-1.sl15.x86_64 ................................................................................[done]
(3/4) Installing: mysql-community-libs-9.0.0-1.sl15.x86_64 ..................................................................................[done]
(4/4) Installing: mysql-community-devel-9.0.0-1.sl15.x86_64 .................................................................................[done]

$ namei /usr/lib64/mysql/libmysqlclient.so
f: /usr/lib64/mysql/libmysqlclient.so
 d /
 d usr
 d lib64
 d mysql
 l libmysqlclient.so -> libmysqlclient.so.24
   l libmysqlclient.so.24 -> libmysqlclient.so.24.1.0
     - libmysqlclient.so.24.1.0
$ emacs -nw mysql-foo.cpp

$ cat mysql-foo.cpp

#include <mysql.h>

int main()
{
   mysql_library_init( 0, nullptr, nullptr );
   return 0;
}

$ g++ `mysql_config --include` mysql-foo.cpp -o mysql-foo `mysql_config --libs`
[8 Jul 2024 9:04] Terje Røsten
Seems like openSUSE 15 now ships both libopenssl-1_1-devel and libopenssl-3-devel.

Indeed, current MySQL packages are built with OpenSSL 1.1 and libopenssl-1_1-devel is required to build apps against libmysqlclient.so.

Hmm, mysql-community-devel requires openssl-devel, which is provided by libopenssl-devel which in turn requires libopenssl-3-devel = 3.1.4.
[9 Aug 2024 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[9 Aug 2024 10:19] Terje Røsten
The correct fix is to update build platform to openSUSE 15.6 and build against system openssl 3.x
[12 Aug 2024 8:12] Terje Røsten
Posted by developer:
 
Also upgrade compiler to GCC 13.3.0, available as gcc-13 / g++-13.
[14 Aug 2024 18:53] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Server 9.1.0 release, and here's the proposed changelog entry from the documentation team:

SLES 15 binaries are now built using GCC 13.

Thank you for the bug report.
[20 Aug 2024 22:35] Philip Olson
Posted by developer:
 
Update: Fixed as of the upcoming MySQL Server 8.0.40, 8.4.3, and 9.1.0 releases, and here's the proposed changelog entry from the documentation team:

Changed the SLES 15 target platform from openSUSE 15.5 to 15.6, which
also means using GCC 13 instead of GCC 12 and building against the
system's OpenSSL 3.x instead of OpenSSL 1.1.x.