jemalloc does not implement mallinfo. Only check for existence
of mallinfo when the allocator is not jemalloc.
Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
this is an un-modified message from dev-util/cmake-3.7.1
/usr/share/cmake/Modules/FindPythonLibs.cmake
call ``find_package(PythonInterp)`` first to
get the currently active Python version by default with a consistent
version of PYTHON_LIBRARIES.
Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
the detail error message we've met here
Found PythonInterp: python (found suitable version "2.7.12", minimum required is "2")
CMake Error at /usr/share/cmake/Modules/FindPythonLibs.cmake:54 (get_filename_component):
get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
src/CMakeLists.txt:209 (find_package)
* find_package(keyutils REQUIRED) if (WITH_LIBCEPHFS OR WITH_RBD)
prior to this change, we detect keyutils if the building platform is not
FreeBSD, we should instead check the WITH_* options, and let the
maintainer to decided what is the best for his/her platform, and error
out if the building host cannot fulfill the requirement to build the
asserts.
* build krbd.cc if (WITH_RBD)
Signed-off-by: Kefu Chai <kchai@redhat.com>
libcephd is a library that contains ceph daemon code
that can be statically linked in other applications.
Added MergeStaticLibraries.cmake that can merge static libraries
to form a bigger one. This approach avoids the need to mess with
STATIC libraries all over the code base.
Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
If the host system has boost version 1.61 or higher (as in the case
for ubuntu 16.10 yakkety) the ceph build is currently broken. it
will pickup the system boost libraries but use the headers from the
submodule.
This commit ensure that when WITH_SYSTEM_BOOST is OFF we always
use the boost libraries and headers built from the submodule.
Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
We're changing the default value because the previous one was
a makeshift solution to not fail Ceph compilation due to
the Beast's dependency on Boost >= 1.54 that wasn't available
on CentoOS 7. As we got the in-tree Boost we can compile
the ASIO front-end by default.
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
Intended to remove an apparent race. The two effects are
1. replace top-level command callouts w/file builtins
2. do them in the src/rgw sub-cmake
This is cleaner, and ideally avoids the race.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
now that monitors support rocksdb, fix the build system
to enable compiling without leveldb. kv_backend would need
to be set correctly if you were to to use rocksdb for the
monitors.
Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
Build Boost using the src/boost submodule, unless overridden
by -DWITH_SYSTEM_BOOST.
If -DBOOST_J=<n> is provided, builds Boost with <n> jobs.
Boost builds in the configured Build directory.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
msg/async: ibverbs/rdma support
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Mellanox <adirl@mellanox.com>
Reviewed-by: Matt Benjamin <mbenjami@redhat.com>
Reviewed-by: Mark Nelson <mnelson@redhat.com>
Fixes here:
Pull civetweb from new branch/commit.
Build civetweb.c w/ USE_IPV6 (w/o depending on extra ceph-only build
logic inside of civetweb.)
Make several things "const" to please the compiler.
Remap port string at '+' -> ,; to avoid , overload.
Use new civetweb options validate_http_method=no canonicalize_url_path=no
Signed-off-by: Marcus Watts <mwatts@redhat.com>
This is because of versioning issues between Boost and Beast
on CentOS 7. It is intended that this patch will be reverted
after merging the in-tree Boost facility.
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
The fcgi and expat libraries are only used by rgw, so only make them
hard requirements if WITH_RADOSGW is set.
Signed-off-by: David Disseldorp <ddiss@suse.de>
* renamed target to fio_ceph_objectstore
* moved into src/test/fio subdirectory
* added to cmake build
* added support for DDIR_READ
* added required fio option 'conf' to load a ceph configuration file
* added multiple collections per job to simulate parallelism from pgs
* creates objects of the appropriate size on setup
* added support for multiple jobs that share an ObjectStore instance
Signed-off-by: Casey Bodley <cbodley@redhat.com>
find_package(lttng-ust REQUIRED) fails to find the lttng library without
this change. because find_path(LTTNG_LIBRARY_DIR ...) does not search
in the default library paths. and the second mode of
FIND_PACKAGE_HANDLE_STANDARD_ARGS() does not stop the cmake with a fatal
message, even some of the required vars are missing. so use the
implemetantion from cmake upstream.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Include Python 3 bindings into the cmake build and make packages for them
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
* remove Findtcmalloc.cmake, use Findgperftools.cmake instead.
* tcmalloc is packaged in gperftools-dev, so we can check them in a single
place.
* fix the check of heap-profiler.h, we should enable the check as long
as tcmalloc is enabled or profiler is enabled.
* only check gperftools headers in "include/gperftools", and do not
"include/google" anymore. as we only support the distros which
shipping recent gperftools-dev package with "include/gperftools".
and "google/*.h" are deprecated.
* set ALLOC_LIBS with GPERFTOOLS_TCMALLOC_LIBRARY, so we can link
against tcmalloc with full path.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* AIO_LIBS is now named AIO_LIBARIES, and there is not point to print
out its path
* USE_NSS is not defined if NSS is not checked, so if(USE_NSS) is better
here.
Signed-off-by: Kefu Chai <kchai@redhat.com>
this behaviour matches the autotools. and we should not enable profiling
unless asked to do so.
Fixes: http://tracker.ceph.com/issues/16804
Signed-off-by: Kefu Chai <kchai@redhat.com>
for example
```
include_directories(${LEVELDB_PREFIX}/include)
```
does not make sense if `LEVELDB_PREFIX` is not defined.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* use find_package_handle_standard_args() and remove unused bits.
* rename OPENLDAP_LIBS to OPENLDAP_LIBRARIES, to be consistent with
find_package() modules.
Signed-off-by: Kefu Chai <kchai@redhat.com>
libuuid dependency is not found in ceph.spec.in or debian/control.
and we are not using libuuid since 62bfc7a.
Signed-off-by: Kefu Chai <kchai@redhat.com>
please note "make test" is used by cmake to run tests, so we cannot just
repurpose it to *build* them.
* AddCephTest.cmake: depends on "tests"
* CMakeLists.txt: let "check" depend on "tests"
* src/CMakeLists.txt: update the run-tox tests
* run-make-check.sh: use "make tests" and "ctest" instead of "make check"
* ceph-detect-init/CMakeLists.txt: let "tests" depend on
"ceph-detect-init"
* ceph-disk/CMakeLists.txt: let "tests" depend on "ceph-disk"
Signed-off-by: Kefu Chai <kchai@redhat.com>
The cmake build should select NSS or CryptoPP consistently with
current autoconf logic, as used in our RHEL builds (-DWITH_NSS),
and the SSL linkage must match (for NSS, -lssl3).
With this change, there is no direct linkage with libssl when NSS
is selected (I still see indirect linkage via libcurl, in turn
via libssh2, looking into that).
With guidance from upstream and downstream, NSS builds are now
selected by default.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
so it would be easier to figure out what allocator we are using later,
instead of poking around ${Foo}_FOUND variables.
Signed-off-by: Kefu Chai <kchai@redhat.com>
we decided to drop the static libraries from the *-dev debian packages.
so no more tricky changes for supporting creating both libraries.
* partially revert 1dbfb26: s/BUILD_SHARED_LIBS/ENABLE_SHARED/
- add_library() command use BUILD_SHARED_LIBS as the default library
type, and all intermediate libraries should static ones. it would
cause unnecessary confusion if some developer uses add_library() without
specifying the library type, and ends up with a .so. so we use our
own setting variables for specifying the type of user facing libraries.
* revert ac47440
- the BUILD_SHARED_LIBS setting is also populated to the gmock libraries,
which should be compiled as static ones. otherwise the unit tests will
crash on exit.
Signed-off-by: Kefu Chai <kchai@redhat.com>
so it would be easier to figure out paths, also
CMAKE_INSTALL_DOCDIR is composed using the PROJECT_NAME also.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* BUILD_SHARED_LIB is a cmake variable respected by add_library().
so we can simply expose it as an option instead of reinventing our own.
* and mark internal libraries as STATIC explicitly
* and add keyutil to librbd as secret.cc is using it. and secret.cc is
linked into librbd.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* Findlttng-ust.cmake: detect lttng-gen-tp, and make it a required var
* Findlttng-ust.cmake: fix the detection of lttng
* src/tracing/CMakeLists.txt:
- do not put the generated header files into ${CMAKE_SOURCE_DIR}/src/tracing,
instead we should put the generated files into ${PROJECT_BINARY_DIR}/include.
- do not compile the tracing library using the .c files in the repo,
instead, we should generate them at compile time using lttng-gen-tp,
and compile the genererated .c files.
* CMakeLists.txt: make the lttng-use package REQUIRED if WITH_LTTNG=ON
* src/CMakeLists.txt: let librados depend on librados-tp if LTTNG is
enabled: librados includes tracing/librados.h. the same applies to
librbd, libos and libosd. cmake could deduce the dependencies if we
add the lttng header files under include/tracing into the
corresponding target, as the lttng header files are already listed
as OUTPUT and GENERATED files, but this requires us to put all the
involved targets in the same CMakeLists.txt. in this case, three
CMakeLists.txts are impacted. so we create a new target for each
lttng header, and let the impacted target depend on it.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Moved all the libraries in CMAKE_BINARY_DIR/lib
and all the binaries in CMAKE_BINARY_DIR/bin. Set
various environment variables for test-ceph-helpers.
Put those variables throughout
qa/workunits/ceph-helpers.sh.
NOTE: This is a very rough draft of these fixes.
Signed-off-by: Ali Maredia <amaredia@redhat.com>
* pass the environment variables using `env` to pass environment
varibles with space(s) in them to the COMMAND in add_custom_target.
otherwise, cmake will try to quote the space with "\". this breaks the
generated command line.
* add a comment for ccache to note that we do not expect ccache to speed
up linking. we use it as the linker's launcher to workaround
https://bugs.python.org/issue8027. to be specific,
distutils.UnixCCompiler.link overwrites the first linker CLI's arg
using the the first C++ compiler's CLI arg, if "env" is not used to
launch the linker. this breaks the cythonization of our pybind APIs.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Use cmake's FindOpenSSL. Actually use the library definitions that
come out of it. Also use the include path. If SSL is disabled,
then build without any of this. The result will be a version
of civetweb that includes openssl support using dlopen() - ie,
what we used to do. This is probably a bit silly, and I hope
nobody actually expects to use it that way, but it's mostly harmless.
Signed-off-by: Marcus Watts <mwatts@redhat.com>
Use find_package to enforce the dependency up front (we should be
using this pattern throughout top-level CMakeLists.txt).
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Implement a new external authenticator based on LDAP and the
new external token format.
External LDAP auth now works, at least with openldap/X.500 style
naming and ldaps:// (SSL).
The latter is AD-friendly, but since AD uses dnattr=cn (IIRC)
everywhere, AD will need testing.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
This is temporary, until a way to stop repetitive
unecessary generation of headerfiles is figured out.
Signed-off-by: Ali Maredia <amaredia@redhat.com>
* use ${FUSE_LIBRARIES} instead of "fuse" when referencing libfuse.
* do not compile FuseStore.cc if !HAVE_LIBFUSE.
* CMakeLists.txt: s/HAVE_FUSE/HAVE_LIBFUSE/, to match with the one
defined for config.h.in.cmake, otherwise we need two vars:
HAVE_LIBFUSE, and HAVE_FUSE
Signed-off-by: Kefu Chai <kchai@redhat.com>
* this change is the cmake port of 911e7a0.
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.
* do not REQUIRE BZip2 in cmake anymore
* only link against bzip2 if it is detected
Signed-off-by: Kefu Chai <kchai@redhat.com>
Option WITH_XIO now OFF but required by default,
Findxio.cmake now using
FIND_PACKAGE_HANDLE_STANDARD_ARGS.
Signed-off-by: Ali Maredia <amaredia@redhat.com>