[MDEV-15932] Build with lz4 cannot be forced off Created: 2018-04-19  Updated: 2019-05-10  Resolved: 2019-04-30

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Embedded Server
Affects Version/s: 10.2.14
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Michal Schorm Assignee: Vladislav Vaintroub
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Fedora


Attachments: File liblz4.pc    

 Description   

Hello,

I tried to build MariaDB with lz4-devel package in the buildroot, but saying either

-DWITH_INNODB_LZ4=OFF

-DLZ4_LIBS=
-DWITH_INNODB_LZ4=OFF

-DLZ4_LIBS=%{_libdir}/liblz4.so
-DWITH_INNODB_LZ4=OFF

The build will either say "LZ4_LIBS set to NOTFOUND" or compile with "-DLZ4", thus atleast two parts will end up with "Requires: liblz4.so.1()"
(mariadb-rocksdb-engine and mariadb-server)

Fedora sources can be found - as usual - here:
https://src.fedoraproject.org/rpms/mariadb/tree/master



 Comments   
Comment by Vladislav Vaintroub [ 2019-04-30 ]

mschorm, Do you have a following situation

  • Use Centos/Redhat/Fedora
  • install lz4-devel
  • try to build MariaDB such that it does not have lz4 dependency. This does not work.

Is this a correct description?

I'd like to avoid diving into Fedora official packaging, buildroots and what not

Comment by Vladislav Vaintroub [ 2019-04-30 ]

use -DWITH_INNODB_LZ4=OFF -DWITH_ROCKSDB_LZ4=OFF

Tip:
cmake -LH |grep LZ4 ,
or just
grep LZ4 CMakeCache.txt

could have revealed the variables in question.

Comment by Michal Schorm [ 2019-05-10 ]

I moved from original 10.2.14 to 10.3.12

I found both a solution an another issue.

The issue:
If you use "-DWITH_INNODB_LZ4=OFF -DWITH_ROCKSDB_LZ4=OFF" but still set lz4 path to library like: "-DLZ4_LIBS=%{_libdir}/liblz4.so", the build will fail with:

BUILDSTDERR: make[2]: *** No rule to make target '/usr/lib64/liblz4.so', needed by 'storage/mroonga/ha_mroonga.so'.  Stop.
BUILDSTDERR: make[2]: *** Waiting for unfinished jobs....

Only the case when you also define "LZ4_LIBS" as an empty string, combined with your solution, will result into complete fix of the original issue.

Please, take a brief look at the mroonga error, to verify, if it's another issue uncovered, or not.

Thanks

Comment by Vladislav Vaintroub [ 2019-05-10 ]

I usually do not build with moronga groonga, but f I do, I have this in the output of

cmake -LH | grep LZ4

// use bundled LZ4
GRN_WITH_BUNDLED_LZ4:BOOL=OFF
// Support data compression by LZ4.
GRN_WITH_LZ4:STRING=auto
WITH_INNODB_LZ4:STRING=AUTO
// Build RocksDB with LZ4 compression. Possible values are 'ON', 'OFF', 'AUTO' and default is 'AUTO'
WITH_ROCKSDB_LZ4:STRING=AUTO

A brief research (git grep GRN_WITH_LZ4) reveals that it LZ4 is not used if you set
GRN_WITH_LZ4 to "no".

So why it is an error?

Generated at Thu Feb 08 08:25:06 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.