[MDEV-24761] libgalera_smm.so in generic tarball is not linking to correct files for Ubuntu Created: 2021-02-02  Updated: 2023-04-11

Status: Stalled
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.5
Fix Version/s: 10.5, 10.6

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Julius Goryavsky
Resolution: Unresolved Votes: 0
Labels: None


 Description   

wget https://downloads.mariadb.org/interstitial/mariadb-10.5.8/bintar-linux-x86_64/mariadb-10.5.8-linux-x86_64.tar.gz
# Try and use on Ubuntu 20.04.2 LTS

Will lead to errors for Galera lib. The reason:

# ldd libgalera_smm.so 
	linux-vdso.so.1 (0x00007ffd70dcd000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f21079a5000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f210799a000)
*	libssl.so.10 => not found
*	libcrypto.so.10 => not found
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f21077b9000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f210766a000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f210764d000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f210745b000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f2107c77000

The files on Ubuntu 20.04.2 LTS are currently

root:/usr/lib/x86_64-linux-gnu# ls -l libssl*
-rw-r--r-- 1 root root  382024 Aug 20 18:02 libssl3.so
-rw-r--r-- 1 root root 1016054 Dec  2 16:52 libssl.a
lrwxrwxrwx 1 root root      13 Dec  2 16:52 libssl.so -> libssl.so.1.1
-rw-r--r-- 1 root root  424664 Sep 16 14:51 libssl.so.1.0.0
-rw-r--r-- 1 root root  598104 Dec  2 16:52 libssl.so.1.1
root:/usr/lib/x86_64-linux-gnu# ls -l libcrypt*
-rw-r--r-- 1 root root  271570 Mar 10  2020 libcrypt.a
-rw-r--r-- 1 root root 5538118 Dec  2 16:52 libcrypto.a
-rw-r--r-- 1 root root 2361888 Sep 16 14:51 libcrypto.so.1.0.0
lrwxrwxrwx 1 root root      39 Mar 10  2020 libcrypt.so -> /lib/x86_64-linux-gnu/libcrypt.so.1.1.0

Trying to symlink these manually fails too:

root:/tmp# ldd libgalera_smm.so 
./libgalera_smm.so: /usr/lib/x86_64-linux-gnu/libssl.so.10: version `libssl.so.10' not found (required by ./libgalera_smm.so)
./libgalera_smm.so: /usr/lib/x86_64-linux-gnu/libcrypto.so.10: version `OPENSSL_1.0.1_EC' not found (required by ./libgalera_smm.so)
./libgalera_smm.so: /usr/lib/x86_64-linux-gnu/libcrypto.so.10: version `libcrypto.so.10' not found (required by ./libgalera_smm.so)
...

Using LD_PRELOAD seem to not work at first glance either, though this has not been confirmed.
Would likely be present in 10.6 too (and perhaps earlier versions), but 10.6 is not released yet. Please check other versions also when fixing.



 Comments   
Comment by Roel Van de Paar [ 2021-02-02 ]

From discussion with Alexey;

  • Symlink creation will not help in many cases because ABI is different (as found)
  • libssl.so.1.0.0 is the default on Ubuntu 20, libssl.so.10 is the default on Centos 8 etc.
  • Thus the generic packages will not work on Ubuntu nor Mint
Comment by Sergei Golubchik [ 2021-02-02 ]

I don't think one can package OpenSSL libraries with the GPLv2 code together.

Comment by Roel Van de Paar [ 2021-02-02 ]

abychko can we somehow make the package compatible with both?

Comment by Alexey Bychko (Inactive) [ 2021-02-16 ]

prepare OpenSSL, the steps:

build galera:

  • git checkout es-mariadb-4.x-static-ssl
  • cmake . -DGALERA_STATIC=ON -DOPENSSL_ROOT_DIR=/opt/openssl
  • make
  • ldd libgalera_enterprise_smm.so
Comment by Alexey Bychko (Inactive) [ 2021-02-16 ]

built on centos 7 and checked for missing libs on ubuntu 2004

[abychko@localhost es-galera]$ ldd libgalera_enterprise_smm.so
	linux-vdso.so.1 =>  (0x00007fffb2514000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f64bf5c1000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f64bf3b9000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f64bf1b5000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f64beead000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f64bebab000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f64be7dd000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f64bfebc000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f64be5c7000)

Comment by Alexey Bychko (Inactive) [ 2021-02-16 ]

license is https://www.openssl.org/source/license-openssl-ssleay.txt

Comment by Alexey Bychko (Inactive) [ 2021-02-16 ]

jplindst please merge 0cdd529959d6a3fe17a329e513e8159590738212 to CS galera (if needed of course)

Comment by Ramesh Sivaraman [ 2021-02-17 ]

abychko The Galera library build on CentOS7 works fine on Ubuntu-20.04

[vagrant@node1 es-galera]$ ldd libgalera_enterprise_smm.so
	linux-vdso.so.1 =>  (0x00007fff177fc000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f999284d000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f9992645000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f9992441000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f9992139000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f9991e37000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f9991a69000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f999317e000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f9991853000)
[vagrant@node1 es-galera]$ grep ssl libgalera_enterprise_smm.so
Binary file libgalera_enterprise_smm.so matches
[vagrant@node1 es-galera]$
[vagrant@node1 es-galera]$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[vagrant@node1 es-galera]$
 
 
ramesh@ax3win:~$ ldd libgalera_enterprise_smm.so
	linux-vdso.so.1 (0x00007ffee43d7000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007eff9f942000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007eff9f937000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007eff9f931000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007eff9f750000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007eff9f601000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007eff9f40f000)
	/lib64/ld-linux-x86-64.so.2 (0x00007effa0085000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007eff9f3f2000)
ramesh@ax3win:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"
ramesh@ax3win:~$
 
ramesh@ax3win:~$ cp libgalera_enterprise_smm.so mariadb-10.5.8-linux-x86_64/lib/galera/libgalera_smm.so
 
MariaDB [(none)]> select @@wsrep_provider;
+---------------------------------------------------------------+
| @@wsrep_provider                                              |
+---------------------------------------------------------------+
| /home/ramesh/mariadb-10.5.8-linux-x86_64/lib/libgalera_smm.so |
+---------------------------------------------------------------+
1 row in set (0.000 sec)
MariaDB [(none)]>
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| wsrep_cluster_size    | 2     |
+-----------------------+-------+
2 rows in set (0.001 sec)
MariaDB [(none)]>

Comment by Jan Lindström (Inactive) [ 2021-12-23 ]

26.4.10

Comment by Sergei Golubchik [ 2021-12-23 ]

It looks like it isn't fixed yet?

Generated at Thu Feb 08 09:32:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.