Commit Graph

183 Commits

Author SHA1 Message Date
Kefu Chai
71462ddf05 cmake/modules/BuildRocksDB.cmake: enable compressions for rocksdb
we should enable them if they are found.

currently, we don't have bzip2 compressor plugin, so it's not detected
in the cmake script. we can always enable it for rocksdb in future.

Fixes: http://tracker.ceph.com/issues/24025
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-05-23 23:59:41 +08:00
Kefu Chai
4d646ef579 cmake: do not check for aligned_alloc() anymore
this reverts 16f0a67d

Fixes: http://tracker.ceph.com/issues/23653
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-05-17 10:33:04 +08:00
Dan Mick
39b2626c7a Remove embedded 'cephd' code
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2018-05-11 13:10:26 -07:00
Kefu Chai
19230378c8 cmake: specify missing settings for dpdk
* after upgrading to gcc-8, seems dpdk requires more settings to compile.
  in which, CONFIG_RTE_MAX_VFIO_GROUPS=64 is copied from config/common_base.
* librte_bus_pci.a depends on librte_pci.a, so reorder the libraries
  in DPDK_LIBRARIES.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-05-06 15:26:14 +08:00
Kefu Chai
50a052d79e
Merge pull request #19714 from qwren/qatzip-compressor
compressor: add QAT support

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-05-04 09:17:17 +08:00
Kefu Chai
791af5459e cmake: enable CMP0051
the new behavior of get_target_property(<var> <target> SOURCES) will be
enforced in future versions of cmake, so let ready for this change now
by removing the generator expressions from the returned source file
list.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-26 16:47:54 +08:00
Kefu Chai
4aea3bed7f cmake: enable CMP0046
so cmake will error on "non-existent dependency in add_dependencies", we
add dependency on CONFIGURE_FILE() output, which is wrong, as its output
is not a target, and is generated when cmake runs. so remove them from
dependencies.

regarding to ceph_ver.h, its path is also wrong. it is created under
${CMAKE_BINARY_DIR}/src/include. so this is another reason to remove it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-26 16:44:09 +08:00
Kefu Chai
53a1500a8f cmake,make-dist: bump up boost version to 1.67
* to pick up the fix of https://svn.boost.org/trac10/ticket/11622
* also the boost::python's library name now includes the version suffix
  of python version, so update BuildBoost.cmake accordingly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-21 09:02:28 +08:00
Kefu Chai
112f79f8de cmake: s/boost_256/boost_sha256/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-21 01:33:24 +08:00
Kefu Chai
3178bb9638 cmake: disable gflags support in rocksdb
to silence the warnings like

CMake Warning at CMakeLists.txt:73 (find_package):
  By not providing "Findgflags.cmake" in CMAKE_MODULE_PATH this project
has
  asked CMake to find a package configuration file provided by "gflags",
but
  CMake did not find one.

  Could not find a package configuration file provided by "gflags" with
any
  of the following names:

    gflagsConfig.cmake
    gflags-config.cmake

  Add the installation prefix of "gflags" to CMAKE_PREFIX_PATH or set
  "gflags_DIR" to a directory containing one of the above files.  If
"gflags"
  provides a separate development package or SDK, be sure it has been
  installed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-21 01:17:37 +08:00
Kefu Chai
19aee456c0 cmake,make-dist: use sha256 instead of md5 for checksum
the boost's download page offers the SHA256 hash, so it'd be easier to
verify the hash this way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-21 01:17:35 +08:00
Qiaowei Ren
9f3965aef3 compressor: add QAT support
This patch adds new QATzip plugin to support QAT for compression.

QATZip is a user space library which builds on top of the Intel
QAT (QuickAssist Technology) user space library, to provide extended
accelerated compression and decompression services by offloading the
actual compression and decompression request(s) to the hardware
QAT accelerators, which are more efficient in terms of cost and power
than general purpose CPUs for those specific compute-intensive
workloads.

Based on QAT accelerators, QATZip can support several compression
algorithm, including deflate, snappy, lz4, etc..

Signed-off-by: Qiaowei Ren <qiaowei.ren@intel.com>
2018-04-18 12:05:44 +08:00
Kefu Chai
faa84ab975 cmake: expose Boost_VERSION
to appease the consumers of FindBoost.cmake, they are expecting this
variable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-13 12:19:36 +08:00
Kefu Chai
a15d3d39a7 cmake: rename the boost header target to Boost::boost
because FindBoost.cmake defines Boost::boost as the target for header
only dependencies.

due to the limit of cmake < 3.1, this only applies to cmake > 3.1

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-13 12:19:36 +08:00
Yehuda Sadeh
c3a6f7588a rgw: mfa - initial work
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2018-04-09 07:01:02 -07:00
Kefu Chai
c454b1d1d6
Merge pull request #20535 from ifed01/wip-ifed-bring-fio
test/fio: enable objectstore FIO plugin building without the need to install and build FIO source code

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-03-06 08:36:39 +08:00
Igor Fedotov
939805165e test/fio: enable objectstore FIO plugin building without the need to install and build FIO source code
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
2018-03-05 20:35:08 +03:00
Kefu Chai
9535165149 cmake: add implicit dependencies between boost libs
so the dependencies can be included when linking against the one which
depends on them. for example, libboost_filesystem depends on
libboost_system, if we don't link against the latter, linker will bail
out when linking an executable using Boost::filesystem.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-02-27 21:26:42 +08:00
Kefu Chai
854ca24b19 cmake: add an alias for unit_test_framework
should pass --with-test for building Boost::unit_test_framework

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-02-27 21:26:42 +08:00
Casey Bodley
a467e5b1cf cmake: skip boost dependency on ALIAS targets
the boost override for add_library() does not work for ALIAS targets:

CMake Error at cmake/modules/BuildBoost.cmake:227 (add_dependencies):
  Cannot add target-level dependencies to alias target "Seastar::seastar".

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2018-02-27 21:26:42 +08:00
Kefu Chai
d051bf0441 cmake: disable DOWNLOAD_NO_PROGRESS if cmake ver is lower than 3.1
see https://cmake.org/cmake/help/v3.1/module/ExternalProject.html and
https://cmake.org/cmake/help/v3.0/module/ExternalProject.html. the
former has DOWNLOAD_NO_PROGRESS, while the latter does not.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-02-20 06:40:15 +08:00
Kefu Chai
2277a10279 cmake: fix the include dir for building boost::python
the "includes" directories are separated by spaces not semicolons.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-02-06 00:36:26 +08:00
Kefu Chai
6f725e76d5 cmake: build Boost.python with specified version of python
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-01-25 22:26:10 +08:00
Casey Bodley
ba85740955 cmake: remove cryptopp option
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2018-01-19 10:25:41 -05:00
Sage Weil
755ea1c054
Merge pull request #19914 from tchaikov/wip-cmake-check-boost-in-src
cmake: check version of boost in src/boost

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
2018-01-13 09:56:08 -06:00
Kefu Chai
fd5a522928 cmake: check version of boost in src/boost
after bumping up the required boost version, old copy of boost in
src/boost will not work. so we need to error out early.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-01-11 13:19:15 +08:00
Kefu Chai
9345a28a8a cmake: BuildBoost.cmake: use specified compiler for building boost
* user-config.jam is the suggested way for adding toolset for Boost.Build.
* always specify toolset when running b2, so we can build boost with
specified compiler instead of the default one guessed by boost building system.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-01-10 23:13:39 +08:00
Casey Bodley
0e47a339df cmake: update minimum boost version to 1.66
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2018-01-05 13:52:47 -05:00
Kefu Chai
6559a85051 cmake: disable FAIL_ON_WARNINGS for rocksdb
otherwise -Werror=implicit-fallthrough will fail the build with GCC-7

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-12-11 14:09:45 +08:00
Kefu Chai
99c0306324
Merge pull request #19208 from tchaikov/wip-spdk-17.10
spdk: update SPDK to v17.10

Reviewed-by: Nathan Cutler <ncutler@suse.com>
2017-11-30 00:39:18 +08:00
Kefu Chai
b3ceafe7d8 cmake,rpm,deb: update to accommodate SPDK v17.10
* cmake/modules/BuildSPDK.cmake: add lvol
* cmake/modules/BuildDPDK.cmake: add pci and bus_pci
* ceph.spec.in, cmake/modules/BuildSPDK.cmake, debian/control:
  re-introduce libuuid dependency, as 17.07 added lvol. and the latter
  depends on uuid.
* cmake/modules/BuildSPDK.cmake: avoid introducing local variable of
  `iface_libs`.
* cmake/modules/patch-dpdk-conf.sh: disable
  CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES, this option introduces the
  balanced allocation of memory. but it also requires libnuma-dev.
  let's disable it for now.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-29 18:03:23 +08:00
Kefu Chai
12dc5733c9
Merge pull request #18938 from tchaikov/wip-cmake
cmake: check gcc version not release date for libstdc++ saneness

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-11-29 15:38:16 +08:00
Kefu Chai
e3b703eb12 cmake: check bootstrap.sh instead before downloading boost
config.hpp does not exist if boost is not configured. so a boost source
directory unpacked from dist tarball does not have this file. the
bootstrap.sh instead, it is used to create the necessary config files
for jam.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-24 11:13:16 +08:00
Kefu Chai
9b3f9cd253 cmake: BuildDPDK: use ${CMAKE_MAKE_PROGRAM} when appropriate
DPDK requires GNU Make. see
spdk/dpdk/doc/guides/freebsd_gsg/build_dpdk.rst. so, we should use the
configured make program to do the job.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-21 17:47:17 +08:00
Kefu Chai
7c3221fda1 cmake: BuildDPDK: use POSIX compliant syntax
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-21 17:06:50 +08:00
Kefu Chai
a11ab928f7 cmake: check libaio on linux before building SPDK
SPDK requires libaio on linux.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-20 11:18:02 +08:00
Kefu Chai
e8add075ec cmake: add rte_mempool_{ring,stack} to Finddpdk.cmake
* also refactor it a little bit

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-18 10:44:56 +08:00
Kefu Chai
9964ac9251 cmake: BuildDPDK: do not build kernel modules
see also http://pkgs.fedoraproject.org/cgit/rpms/dpdk.git/tree/dpdk.spec

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-18 10:44:56 +08:00
Kefu Chai
01a9f17825 cmake: build spdk/dpdk in cmake modules
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: wanjun.lp <wanjun.lp@alibaba-inc.com>
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
2017-11-17 15:37:53 +08:00
Kefu Chai
571a786afc cmake: pass LDSHARED env var to distutils
otherwise, the default gcc will be used, and the $CMAKE_C_COMPILER
passed to the outer CMakeLists.txt won't kick in. moreover, if the
building script (ceph.spec for instance) could set the $PATH, and
expect that the CMakeLists.txt will use the toolchain executables
in the $PATH to build Ceph, distutils will continue using the default
$CC for linking the python bindings, on UNIX it will be gcc in the
new shell's $PATH, because we are using `install(CODE "... execute_process(
...))` for installing the python bindings. apparently, this is not
expected. because the new shell's $PATH is very likely different
from the one changed by the building script. to address this, we
should always specify the `$LDSHARED` env var explicitly.

also, pass env vars using `ENV{}` instead of the `env` command to
workaround the issue of https://cmake.org/pipermail/cmake/2015-December/062216.html,
because it's not straightforward to set environment variables with
spaces in the them using cmake. and because one cannot use add_custom_target()
in the script mode of cmake. this leave me only limited options to
fix this issue.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-15 15:22:07 +08:00
Kefu Chai
70b5b4bfbf cmake: should check the availability of aligned_alloc() by running the test
this mimics the failure of rocksdb without a working
aligned_alloc()/free().

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-10-31 17:39:09 +08:00
Kefu Chai
599a9ef3ca cmake: should use the value of GPERFTOOLS_LIBRARIES as REQUIRED_VARS
otherwise it's always true, even if the libaries are not found. also
the cmake output will be wrong without this change:

without this change, it is:

-- Found gperftools: GPERFTOOLS_TCMALLOC_LIBRARY;GPERFTOOLS_TCMALLOC_MINIMAL_LIBRARY;GPERFTOOLS_PROFILER_LIBRARY (found version "2.5.93")

with this change, it would be:

-- Found gperftools: /tmp/gperf/lib/libtcmalloc.so (found version "2.5.93")

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-10-31 16:58:04 +08:00
Kefu Chai
16f0a67d83 cmake: check for aligned_alloc()
in case developer is using patched tcmalloc.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-10-27 11:13:15 +08:00
Jianpeng Ma
b4cc9a9aa8 cmake: Build libpmem from source code.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2017-10-20 00:44:09 +08:00
Kefu Chai
caae3c4757 cmake: fix gperftools version detection
there is chance that its "patch" version is empty. in that case, do not
include it in its version string. otherwise, we will have something
like:

Found gperftools:
GPERFTOOLS_TCMALLOC_LIBRARY;GPERFTOOLS_TCMALLOC_MINIMAL_LIBRARY;GPERFTOOLS_PROFILER_LIBRARY
(found version "2.4.#define TC_VERSION_PATCH  """)

when running cmake

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-10-13 15:11:09 +08:00
Sage Weil
96c831167b Merge pull request #18092 from tchaikov/wip-cmake-cleanup
cmake: do not link against unused or duplicated libraries

Reviewed-by: Sage Weil <sage@redhat.com>
2017-10-05 11:18:27 -05:00
Brad Hubbard
598556f98b make-dist,cmake: Try multiple URLs to download boost before failing
Remove SPOF during boost download for make-dist and later cmake > 3.7

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2017-10-04 11:13:34 +10:00
Kefu Chai
2f4cc32741 cmake: always use CMAKE_RUNTIME_OUTPUT_DIRECTORY as the unittests' path
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-10-03 23:44:28 +08:00
Sage Weil
19987549e0 make-dist,cmake: move boost tarball location to download.ceph.com
Sourceforge is down.  Also, we can hammer our servers instead of
theirs.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-26 17:22:36 -04:00
Kefu Chai
04697cdbdc cmake: update the error message for gperftools bug
it's a follow-up of #17788

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-22 10:40:29 +08:00