[LEAP 15][mariadb 10.2.9] how to get rid from warnings at compile step ?

Greetings !!

I have lot of LEAP 15 computers in my home, four in total.
I have two computers that run mariadb as test database servers.

I use the same application writtent in C using mysql API (linked with libmariadb-devel and libmariadb3) as I can see below


sirius:/exemples/mysql # ldd apimysql
        linux-vdso.so.1 (0x00007ffe0d58e000)
        libmariadb.so.3 => /usr/lib64/libmariadb.so.3 (0x00007f403b903000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f403b6eb000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f403b4e3000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f403b193000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f403af73000)
        [b]libssl.so.45 => /usr/lib64/libssl.so.45 (0x00007f403ad1b000)[/b]
        [b]libcrypto.so.43 => /usr/lib64/libcrypto.so.43 (0x00007f403a93b000)[/b]
        libc.so.6 => /lib64/libc.so.6 (0x00007f403a57b000)
        libssl.so.1.1 => /usr/lib64/libssl.so.1.1 (0x00007f403a30b000)
        libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1 (0x00007f4039e7b000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f403bb5b000)

When I use the same command on the other computer I got

antares:/exemples/mysql # ldd apimysql
        linux-vdso.so.1 (0x00007fff2b774000)
        libmariadb.so.3 => /usr/lib64/libmariadb.so.3 (0x00007f1f8ad8a000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f1f8ab73000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f1f8a96f000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f1f8a624000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1f8a406000)
        libssl.so.1.1 => /usr/lib64/libssl.so.1.1 (0x00007f1f8a19a000)
        libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1 (0x00007f1f89d0d000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f1f89953000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f1f8afdb000)

You can see in bold the two libraries added to the code on Sirius…
The problem is for me to get rid of those two warnings:

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: libssl.so.1.1, needed by /usr/lib64/libmariadb.so, may conflict with libssl.so.45
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: libcrypto.so.1.1, needed by /usr/lib64/libmariadb.so, may conflict with libcrypto.so.43

The makefile for both computers are the same


cflags=`mysql_config --cflags` 
clibs=`mysql_config --libs` 

apimysql: apimysql.c  
  @# @echo $(cflags)
  @gcc -c $(cflags) apimysql.c
  @# @echo $(clibs)
  @echo "Compilation avec optimisation du code..."
  @gcc apimysql.o -O $(clibs) -o apimysql

I compared the two configurations using “zypper se” to see that effectively on antares I did not have libssl45 nore libcrypto45 installed.
On antares I got no warning and the results are the same: it works as on sirius.

antares:/exemples/mysql # make
gcc -c `mysql_config --cflags`  apimysql.c
gcc apimysql.o -O `mysql_config --libs`  -o apimysql
antares:/exemples/mysql # ./apimysql 
MySQL client version: 10.2.9
Tentative de connexion...       [ok]
[Liège                                                                           ][4000]
[Rocourt                                                                         ][4000]
[Cointe                                                                          ][4000]
[Vottem                                                                          ][4041]
[Milmort                                                                         ][4041]
[Seraing                                                                         ][4100]
[Boncelles                                                                       ][4100]
[Jemeppe-sur-Meuse                                                               ][4101]
[Flémalle                                                                        ][4400]
[Ans                                                                             ][4430]
[Alleur                                                                          ][4432]
[Grâce-Hollogne                                                                  ][4460]
[Amel                                                                            ][4770
]

I tried to remove libssl43 and libcrypto45 from sirius but this affected, of course, libmariadb-devel, mysql-workbench, …

sirius:/exemples/mysql # zypper remove libssl45
Loading repository data...
Warning: No repositories defined. Operating only with the installed resolvables. Nothing can be installed.
Reading installed packages...
Resolving package dependencies...

The following 5 packages are going to be REMOVED:
  libmariadb-devel libressl-devel libssl45 libtls17 mysql-workbench

5 packages to remove.
After the operation, 86.3 MiB will be freed.
Continue? [y/n/...? shows all options] (y): n

I tried uninstall mysql-workbench (not supported) and libssl45 and libcrypto43 but it uninstall also libmariadb-devel I need :{

sirius:/exemples/mysql # zypper in libmariadb-devel
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 5 NEW packages are going to be installed:
  libcrypto43 libmariadb-devel libressl-devel libssl45 libtls17

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

With a third computer with exactly the same configuration as sirius I got the warnings, the host is called rasalgethi and works with the same settings than sirius.

rasalgethi:/exemples/mysql # make
Compiling apimysql.c
gcc -c `mysql_config --cflags`  apimysql.c
Compiling with optimisations...
gcc apimysql.o -O `mysql_config --libs`  -o apimysql
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: libssl.so.1.1, needed by /usr/lib64/libmariadb.so, may conflict with libssl.so.45
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: libcrypto.so.1.1, needed by /usr/lib64/libmariadb.so, may conflict with libcrypto.so.43

Questions are:

As on antares I use EXACTLY the same tools, mysql-workbench, mariadb-devel, gcc, etc… why libssl45 and libcrypto43 are NOT installed on the antares system… both sirius and antares are LEAP 15 and updated.
How can I get rid of these warnings ?

Hi
I would surmise the compiled mariadb used perhaps the third party libraries (check the source) rather than system libraries. Or you do have some non standard libraries installed…

Thanks for your reaction, malcom ^^

I use always zypper to do things but to solve this issue I had to use Yast/Software management.

I tracked wich package was required for libcrypto43 and libssl45 I found that libressl needed both packages, so I uninstalled (deleted) libressl, libcrypto and libssl, it worked without uninstalling libmariadb-devel.

Now it works as expected without any warnings ^^

sirius:/exemples/mysql # ldd apimysql
        linux-vdso.so.1 (0x00007ffc03fae000)
        libmariadb.so.3 => /usr/lib64/libmariadb.so.3 (0x00007f0ed080b000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f0ed05f3000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f0ed03eb000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f0ed009b000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0ecfe7b000)
        libssl.so.1.1 => /usr/lib64/libssl.so.1.1 (0x00007f0ecfc0b000)
        libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1 (0x00007f0ecf77b000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f0ecf3bb000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f0ed0a63000)

Hi
Sounds like a bug somewhere in libressl… or mariadb… likely something not using the update repository for building.