On 04.08.2023 11:57, Raj, Rahul via discuss wrote:
1. Can I stop building zlib algorithm? which is building by default, even after passing different plugin like LZ4, snappy etc.,. Any argument in cmake that can be passed to stop compiling ZLIB algorithm.
No. ZLIB is used internally, for example the COMPRESS() SQL function and the compressed client-server protocol. If no zlib is installed, the bundled (with MariaDB source) library is used.
2. Getting below error when linking 3rd party LZ4 library: In the below scenario build compilation is successfully. When trying to run below command to populate data folder to start server, it is throwing error.
*2023-08-02 17:56:58 0 [ERROR] mariadbd: Can't open shared library '/home/mariadb-10.11.3/maria_bin/lib/plugin/provider_lz4.so' (errno: 2, liblz4.so: cannot open shared object file: No such file or directory)*
The error message (from the MariaDB error log) says that liblz4.so could not be loaded by the mariadbd process. Where is it?
I have tried loading LD_LIBRARY_PATH, even that also produce the same result.
LD_LIBRARY_PATH is the right solution if liblz4.so is not in standard path. It must however be set in the environment from which the mariadbd process is started. Try this: #sudo LD_LIBRARY_PATH=/path/to/liblz4 ./scripts/mariadb-install-db --srcdir=/home/mariadb-10.11.3 --plugin-dir=/home/mariadb-10.11.3/maria_bin/lib/plugin --user=mysql It is probably easier to add the path containing liblz4.so to the standard search path for the dynamic linker. This would be in /etc/ld.so.conf or - depending on your Linux distribution - /etc/ld.so.conf.d/.