Skip to content

Commit

Permalink
Build: Change build to always use system leveldb
Browse files Browse the repository at this point in the history
Dynamically link to the leveldb installed on the system rather than
statically linking ceph copy.  Remove the --with-system-leveldb config
option, and add a requirement for leveldb libraries for rpm and debian
packages.  Bug 3945.

Signed-off-by: Gary Lowell  <[email protected]>
  • Loading branch information
Gary Lowell committed Feb 27, 2013
1 parent a34e7c6 commit ea546ae
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 20 deletions.
1 change: 0 additions & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ autoconf
autoheader
automake -a --add-missing -Wall
( cd src/gtest && autoreconf -fvi; )
( cd src/leveldb && mkdir -p m4 && autoreconf -fvi; )
exit
1 change: 1 addition & 0 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Requires: librbd1 = %{version}-%{release}
Requires: librados2 = %{version}-%{release}
Requires: libcephfs1 = %{version}-%{release}
Requires: python
Requires: leveldb > 1.2
Requires(post): binutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
Expand Down
13 changes: 2 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ AC_MSG_NOTICE([RPM_RELEASE='$RPM_RELEASE'])
AC_CONFIG_MACRO_DIR([m4])

AC_CONFIG_SUBDIRS([src/gtest])
AC_CONFIG_SUBDIRS([src/leveldb])

# Environment
AC_CANONICAL_HOST
Expand Down Expand Up @@ -413,16 +412,8 @@ AC_ARG_WITH([ocf],
[with_ocf=no])
AM_CONDITIONAL(WITH_OCF, [ test "$with_ocf" = "yes" ])

# use system leveldb?
AC_ARG_WITH([system-leveldb],
[AS_HELP_STRING([--with-system-leveldb], [use system leveldb])],
,
[with_system_leveldb=no])
AS_IF([test "x$with_system_leveldb" = xyes],
[AC_CHECK_LIB([leveldb], [leveldb_open], [], [AC_MSG_FAILURE([libleveldb not found])], [-lsnappy -lpthread])])
AS_IF([test "x$with_system_leveldb" = xcheck],
[AC_CHECK_LIB([leveldb], [leveldb_open], [with_system_leveldb=yes], [], [-lsnappy -lpthread])])
AM_CONDITIONAL(WITH_SYSTEM_LEVELDB, [ test "$with_system_leveldb" = "yes" ])
# use system leveldb
AC_CHECK_LIB([leveldb], [leveldb_open], [], [AC_MSG_FAILURE([libleveldb not found])], [-lsnappy -lpthread])

# use system libs3?
AC_ARG_WITH([system-libs3],
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Standards-Version: 3.9.3

Package: ceph
Architecture: linux-any
Depends: ${shlibs:Depends}, ${misc:Depends}, sdparm | hdparm, binutils, ceph-common, uuid-runtime, python, xfsprogs, gdisk, parted
Depends: ${shlibs:Depends}, ${misc:Depends}, sdparm | hdparm, binutils, ceph-common, uuid-runtime, python, xfsprogs, gdisk, parted, libleveldb1 (> 1.2)
Recommends: ceph-mds, librados2, librbd1, btrfs-tools
Description: distributed storage and file system
Ceph is a distributed storage system designed to provide excellent
Expand Down
9 changes: 2 additions & 7 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = gnu
SUBDIRS = ocf java
DIST_SUBDIRS = gtest ocf leveldb libs3 java
DIST_SUBDIRS = gtest ocf libs3 java

EXTRA_DIST = \
libs3/COPYING \
Expand Down Expand Up @@ -64,14 +64,9 @@ if WITH_LIBAIO
LIBOS_LDA += -laio
endif

if WITH_SYSTEM_LEVELDB
# use system leveldb
LIBOS_LDA += -lleveldb -lsnappy
LEVELDB_INCLUDE =
else
LIBOS_LDA += leveldb/libleveldb.a
SUBDIRS += leveldb
LEVELDB_INCLUDE = -I$(top_srcdir)/src/leveldb/include
endif

# monitor
ceph_mon_SOURCES = ceph_mon.cc
Expand Down

0 comments on commit ea546ae

Please sign in to comment.