Project

General

Profile

Actions

Bug #20853

closed

Enabling LZ4 in 12.1.1 fails

Added by Sander Klein over 6 years ago. Updated over 6 years ago.

Status:
Can't reproduce
Priority:
Normal
Assignee:
-
Category:
build
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I'm testing Luminus 12.1.1 from the Ceph repository on Ubuntu Xenial and it seems like it is not build with LZ4.

When trying to enable LZ4 I get the following error in the OSD:

2017-07-29 16:13:12.451189 7fba0715dc80 -1 load failed dlopen(): "/usr/lib/ceph/compressor/libceph_lz4.so: cannot open shared object file: No such file or directory" or "/usr/lib/ceph/libceph_lz4.so: cannot open shared object file: No such file or directory"
2017-07-29 16:13:12.451201 7fba0715dc80 -1 create cannot load compressor of type lz4
2017-07-29 16:13:12.451204 7fba0715dc80 -1 bluestore(/var/lib/ceph/osd/ceph-2) _set_compression unable to initialize lz4 compressor

Checking the /usr/lib/ceph/compressor directory indeed shows no lz4 compression being available.

After that I tried to build my own packages with lz4 enabled. I installed the liblz4-dev package and used the -DWITH_LZ4=ON flag, but still I do not get the required libceph_lz4.so file.

Actions #1

Updated by Haomai Wang over 6 years ago

how do you enable -DWITH_LZ4 ?

Actions #2

Updated by Sander Klein over 6 years ago

Since I'm trying to build .debs I added extraopts += -DWITH_LZ4=ON to debian/rules file.

But I also wonder why it is not build with lz4 by default.

Actions #3

Updated by Sander Klein over 6 years ago

Just to be more complete, I also added liblz4-dev to the build-depends in the control file.

Actions #4

Updated by Haomai Wang over 6 years ago

I'm not familiar to debain/control, but -DWITH_LZ4 is used to indicate cmake. I hope others can answer

Actions #5

Updated by Kefu Chai over 6 years ago

  • Category changed from OSD to build
Actions #6

Updated by Kefu Chai over 6 years ago


$ git diff debian/rules
diff --git a/debian/rules b/debian/rules
index 2e4ec9d22a..54f216c35e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,7 @@ export DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

 extraopts += -DUSE_CRYPTOPP=OFF -DWITH_OCF=ON -DWITH_LTTNG=ON -DWITH_PYTHON3=ON -DWITH_EMBEDDED=OFF
 extraopts += -DWITH_CEPHFS_JAVA=ON
+extraopts += -DWITH_LZ4=ON
 # assumes that ceph is exmpt from multiarch support, so we override the libdir.
 extraopts += -DCMAKE_INSTALL_LIBDIR=/usr/lib
 extraopts += -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib

$ dpkg -c ../ceph-common_12.1.1-1_amd64.deb | grep lz4
-rw-r--r-- root/root     18848 2017-07-18 00:55 ./usr/lib/ceph/compressor/libceph_lz4.so.2.0.0
lrwxrwxrwx root/root         0 2017-07-18 00:55 ./usr/lib/ceph/compressor/libceph_lz4.so -> libceph_lz4.so.2
lrwxrwxrwx root/root         0 2017-07-18 00:55 ./usr/lib/ceph/compressor/libceph_lz4.so.2 -> libceph_lz4.so.2.0.0
Actions #7

Updated by Kefu Chai over 6 years ago

  • Status changed from New to Can't reproduce

closing. please check your building env. and run

fakeroot debian/rules binary

then check the obj-x86_64-linux-gnu/CMakeCache.txt to see if LZ4 related variables are set correctly.

Actions

Also available in: Atom PDF