Project

General

Profile

Bug #13850

master fails to build when liblz4 is present (rocksdb)

Added by Dan Mick over 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
common
Target version:
-
Start date:
11/20/2015
Due date:
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
1 - critical
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

on rex001:

rocksdb/librocksdb.a(format.o): In function `LZ4_Uncompress':
/home/dmick/ceph/src/rocksdb/./util/compression.h:550: undefined reference to `LZ4_decompress_safe'
/home/dmick/ceph/src/rocksdb/./util/compression.h:550: undefined reference to `LZ4_decompress_safe'
rocksdb/librocksdb.a(block_based_table_builder.o): In function `LZ4HC_Compress':
/home/dmick/ceph/src/rocksdb/./util/compression.h:588: undefined reference to `LZ4_compressBound'
/home/dmick/ceph/src/rocksdb/./util/compression.h:594: undefined reference to `LZ4_compressHC2_limitedOutput'
rocksdb/librocksdb.a(block_based_table_builder.o): In function `LZ4_Compress':
/home/dmick/ceph/src/rocksdb/./util/compression.h:508: undefined reference to `LZ4_compressBound'
/home/dmick/ceph/src/rocksdb/./util/compression.h:512: undefined reference to `LZ4_compress_limitedOutput'

trying to investigate.

Associated revisions

Revision 911e7a02 (diff)
Added by Kefu Chai over 3 years ago

configure: link against bz2 and lz4 if detected

if we configure --with-librocksdb-static, the rocksdb's Makefile
will detect the installed libbz2 and libz4 by its own. if the
building env happens to have these libraries installed, a link
time dependency is introduced. so we are forced to link against
them.

Fixes: #13850
Fixes: #13981
Signed-off-by: Kefu Chai <>

History

#1 Updated by Dan Mick over 3 years ago

all these symbols are in the installed /usr/lib64/liblz4.so.1.6.0

#2 Updated by Dan Mick over 3 years ago

g++ -I/usr/include/nss3 -I/usr/include/nspr4 -Wall -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -fno-strict-aliasing -fsigned-char -rdynamic -ftemplate-depth-1024 -Wnon-virtual-dtor -Wno-invalid-offsetof -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fPIE -fstack-protector -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -Wstrict-null-sentinel -g -Wno-unused-parameter -std=gnu++11 -Wl,--as-needed -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -o ceph_objectstore_bench test/objectstore_bench.o libos.a -laio libos_types.a libkv.a rocksdb/librocksdb.a -lbz2 -lz -lleveldb -lsnappy ./.libs/libglobal.a ./.libs/libcommon.a -lboost_thread -latomic_ops -lboost_random -lblkid -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lm -lrt -lboost_system

yeah, I don't see lz4 in there

#3 Updated by Dan Mick over 3 years ago

--with-librocksdb-static is true; src/rocksdb/librocksdb.a does indeed still have unbound references to LZ4*

#4 Updated by Dan Mick over 3 years ago

rex001 had lz4-devel installed, which caused rocksdb to configure itself to use LZ4...but nothing consumed the '-llz4' snippet it placed in make_config.mk, so the link didn't know to use it.

We should probably explicitly disable lz4, or change things to set flags in the consuming link from the autoconfigured flags in rocksdb/make_config.mk

#5 Updated by Dan Mick over 3 years ago

  • Subject changed from master fails to build on f20 to master fails to build when liblz4 is present (rocksdb)

#6 Updated by Kefu Chai over 3 years ago

  • Assignee set to Kefu Chai

#7 Updated by Ioana Ciornei over 3 years ago

I got into this bug trying to build ceph on a machine that runs Arch. Since arch does not have different packages for -devel the lz4 headers are installed by default (systemd has lz4 as a dependency). Is there any workaround for this bug? Thanks

#8 Updated by Kefu Chai over 3 years ago

  • Status changed from New to Need Review

#9 Updated by Kefu Chai over 3 years ago

we'd better make sure our building env is a clean room, otherwise the configure script will detect the installed and bzlib and liblz4, and the created ceph-osd and ceph-mon executable will be dynamically linked against these libraries.

#10 Updated by Kefu Chai about 3 years ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF