Commit Graph

100 Commits

Author SHA1 Message Date
Pan Liu
2c2cae16cf dpdk: make compilation successful when use dpdk v16.11
Signed-off-by: Pan Liu <pan.liu@istuary.com>
2017-01-02 16:41:08 +08:00
Pan Liu
1ed6a37611 bluestore: fixed compilation error when enable spdk
Signed-off-by: Pan Liu <pan.liu@istuary.com>
2016-12-27 12:42:44 +08:00
Bassam Tabbara
bdf4db8c4c cmake: simplify find_package jemalloc
simplified the package to find jemalloc. this one matches
the one in src/rocksdb/cmake/modules. The existing one
was struggling to find jemalloc on some hosts.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2016-12-13 11:39:35 -05:00
Bassam Tabbara
c6067f48ec embedded: Add a skeleton libcephd library
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>
2016-11-28 23:48:02 -08:00
Adam C. Emerson
4731433eac cmake: Suppress warnings on Cython output
They are automatically generated code and we don't really control it.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2016-11-16 19:54:31 -05:00
Haomai Wang
eae7d5a645 msg/async: add dpdk stack plugin
Signed-off-by: Haomai Wang <haomai@xsky.com>
2016-11-09 11:39:20 +08:00
Haomai Wang
cf23acef71 msg/async/rdma: add build ops
Signed-off-by: Haomai Wang <haomai@xsky.com>
2016-11-01 15:34:04 +08:00
Alexander Graf
e70ab48b7f AArch64: Detect crc32 extension support from assembler
The used compiler may or may not be recent enough to recognize the
crc32 extended cpu type. However, it does not really have to know about
them either, since all we do is pass inline assembly instructions to
the assembler.

This patch moves the crc cpu extension detection from compiler based
to assembler based, so that we can build optimized code even when the
compiler does not know about the cpu type yet.

Fixes: http://tracker.ceph.com/issues/17516
Signed-off-by: Alexander Graf <agraf@suse.de>
2016-10-10 14:51:44 +02:00
Bassam Tabbara
e7e0b1bc1e erasure-code: Backward compatibility with legacy EC plugins
Resurrected jerasure_generic, jerasure_sse3, jerasure_sse4, jerasure_neon,
shec_generic, shec_sse3, shec_sse4 and shec_neon. These all are exact
copies of the new jerasure and shec plugins that support SIMD detection.

Moved EC preload code in ceph-mon and ceph-osd to a central location, added
warning when preloading legacy plugins.

OSMonitor::get_erasure_code and OSDMonitor:normalize_profile will now check
if legacy EC plugins are used and log a warning.

Added tests to check that warnings make it to the log.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2016-09-29 10:34:34 -07:00
Bassam Tabbara
10d06eb115 cmake: normalize use of SIMD flags
Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2016-09-29 10:34:33 -07:00
Bassam Tabbara
cc62c11a76 erasure-code: Remove SIMD flavors for jerasure and shec
By switching to a new gf-complete with SIMD runtime detection, we can now remove all the different flavors of jerasure and shec. This simplifies deployment and configuration of erasure coding, enables hetergenous OSDs, and enables us to take advantage of new performance improvements in jerasure without config/build changes.

This commit removes flavors from cmake, removes ErasureCodePluginSelect___, and fixes unit tests. There is now a single plugin for jerasure and a single plugin for shec.

SIMDExt.cmake was changed so that its a little more generic, and is not polluted with gf-complete specific CFLAG defines. The #define for SIMD instruction were based on gf-complete.

I also added a small init helper for jerasure that has code that was common between jerasure and shec.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2016-09-29 10:34:33 -07:00
Casey Bodley
1a76324981 fio: generalize for other ObjectStores
* 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>
2016-09-13 11:02:17 -04:00
Dan Mick
3fdccc9e2b Set ARM_CRC_FLAGS from the CRC test rather than ARM_NEON_FLAGS
Fixes: http://tracker.ceph.com/issues/17250
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2016-09-08 20:28:55 -07:00
Kefu Chai
367755e7f7 cmake: pass -DINTEL* to gf-complete cflags
* in addition to the -march=foobar, we also need to pass -DFOOBAR to
  gf-complete sources' cflags, so that the SIMD instructions can be
  generated as expected.
* also extract the compiler support for instruction extensions detections
  into SIMDExt.cmake.
* and only check the compiler support if CMAKE_SYSTEM_PROCESSOR matches
  with the instruction-set/arch to be checked.

Signed-off-by: tone.zhang <tone.zhang@linaro.org>
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-09-02 16:23:54 +08:00
Kefu Chai
2ed44f993f cmake: replace Findlttng-ust.cmake with FindLTTngUST.cmake
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>
2016-08-30 15:51:51 +08:00
Josh Durgin
aaac836380 Merge pull request #10208 from BlaXpirit/cmake-py3
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>
2016-08-12 16:30:35 -07:00
Oleh Prypin
5683a8259b cmake: Also build Python bindings for Python 3
Signed-off-by: Oleh Prypin <oleh@pryp.in>
2016-08-11 16:36:57 +03:00
Kefu Chai
5d9debd57d cmake: cleanup Findxio.cmake
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-11 14:53:03 +08:00
Kefu Chai
96fdb6914a cmake: cleanup Findleveldb.cmake
* and reference leveldb library and include dir with fullpath

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-11 14:53:02 +08:00
Kefu Chai
6c12edbf9d cmake: cleanup Findgperftools.cmake
* 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>
2016-08-11 14:06:39 +08:00
Kefu Chai
5444721b1d cmake: install platlib into a subdir of build-base dir
distutils' install command installs all stuff under $build-base, which
includes the temporary files. and rpm packaging does not like::
  Installed (but unpackaged) file(s)
and to support both py2 and py3, we should encode the python version
into the path, otherwise the built files will be overwritten.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-11 00:14:17 +08:00
Kefu Chai
300aedd8a6 cmake: fix wrong path introduced by bb163e9
s/CYTHON_MODULE_LIB/CYTHON_MODULE_DIR/

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-10 15:59:30 +08:00
Kefu Chai
bb163e98c0 cmake: specify distutils build path explicitly
so we don't need to replicate the logic in distutils/command/build.py
at different places.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-10 09:58:22 +08:00
Kefu Chai
333877023e doc,pybind: bypass sanity check if building doc
the empty .so file does not compile at all, so we need to bypass the
sanity check, if we are building docs. and what sphinx needs is just the
docstrings.

Fixes: http://tracker.ceph.com/issues/16940
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-09 17:08:45 +08:00
Kefu Chai
6c04c94d03 Merge pull request #10098 from dzafman/wip-16568
tools: New "removeall" used to remove head with snapshots

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-08-02 00:26:54 +08:00
Kefu Chai
8bf5cd1606 cmake: cleanup Findfuse.cmake
* remove unused stuff, we do not pass/use FUSE_VERSION in cmake.
  the FUSE_VERSION we are using is defined by "fuse_common.h".
* use FindPackageHandleStandardArgs for handling find_package()
  arguments.
* also detect osxfuse on MacOS.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-29 23:12:33 +08:00
David Zafman
b0be797ae6 cmake: Support extra arguments to tests using add_ceph_test
Signed-off-by: David Zafman <dzafman@redhat.com>
2016-07-27 09:58:59 -07:00
Kefu Chai
07206f3173 cmake: cleanup Findgperftools.cmake
remove unused bits

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-25 16:17:42 +08:00
Kefu Chai
98c3df5a0d cmake: cleanup Findudev.cmake
remove the crufts for handling the REQUIRED argument.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-25 15:40:30 +08:00
Kefu Chai
342d8279d4 cmake: cleanup Findblkid.cmake
* remove unused bits
* fix the wrong mark_as_advanced() call.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-25 15:40:30 +08:00
Kefu Chai
94db627c31 cmake: fix libaio detection
* we used to check the header file of "aio.h" which is part of glibc,
  the glibc async i/o, and the corresponding library is librt. but what
  we are using is libaio.
* reference libaio using AIO_LIBRARIES for consistency.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-25 15:40:30 +08:00
Kefu Chai
bfc25cbc93 cmake: cleanup Findbabeltrace.cmake
* we don't need the BABELTRACE_PATH_HINT setting, as packaging script
  requires the the babeltrace pacakges explicitly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-25 15:39:02 +08:00
Kefu Chai
03a860ed11 cmake: add missing FindBacktrace.cmake
FindBacktrace.cmake is missing in older versions of cmake. so put a copy
in our tree.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-25 15:39:02 +08:00
Kefu Chai
e21d98aed4 cmake: cleanup FindOpenLdap.cmake
* 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>
2016-07-25 15:39:01 +08:00
Kefu Chai
3f6fd585f8 cmake: cleanup Findtcmalloc.cmake
use find_package_handle_standard_args() and remove unused bits.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-25 15:39:01 +08:00
Kefu Chai
3170f16e86 cmake: do not check libuuid anymore
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>
2016-07-25 15:39:01 +08:00
Kefu Chai
af1598a3b3 Merge pull request #10352 from wjwithagen/wip-wjw-freebsd-cmake-2
cmake: work to get inital FreeBSD stuff

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-07-24 18:18:45 +08:00
Willem Jan Withagen
b4b00f43b1 FindNSS.cmake: find includes in /usr/local/includes/nss/nss
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-07-20 15:57:42 +02:00
Kefu Chai
e8a16b7fda cmake: remove unused Findfio.cmake
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-20 16:22:29 +08:00
Kefu Chai
b5607f88e8 cmake: Findfcgi.cmake cleanups
FindPackageHandleStandardArgs() takes care of the find_package()
boilderplate stuff. so no need to repeat them. and remove the checkings
in env variables.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-20 16:21:06 +08:00
Kefu Chai
636522b669 cmake: use FindBacktrace instead of Findexecinfo
always better to use upstream cmake modules.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-20 14:47:52 +08:00
Kefu Chai
c30c5223b5 cmake: only allow up to 1 hour for a ceph test
quote from
https://cmake.org/cmake/help/v3.0/prop_test/TIMEOUT.html?highlight=timeout

> If it exceeds that the test process will be killed and ctest will move
> to the next test.

this helps us to identify test hang.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-16 12:00:47 +08:00
Kefu Chai
ce5724effb cmake: add a "tests" target to build tests
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>
2016-07-16 10:57:12 +08:00
Kefu Chai
c57dbd3451 cmake: pass necessary cflags to build_ext
this fixes:
```
creating
/home/kefu/ceph/build/src/pybind/rados/var/ceph/ceph/build/src/pybind/rados
creating
/home/kefu/ceph/build/src/pybind/rados/var/ceph/ceph/build/src/pybind/rados/pyrex
/usr/bin/gcc-6 -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes
-fno-strict-aliasing -iquote /var/ceph/ceph/src/include -fPIC
-I/usr/include/python2.7 -I/usr/include/x86_64-linux-
gnu/python2.7 -I/usr/include/python2.7 -c
/home/kefu/ceph/build/src/pybind/rados/pyrex/rados.c -o
/home/kefu/ceph/build/src/pybind/rados/var/ceph/ceph/build/src/pybind/rados/pyrex/ra
dos.o -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g
-fstack-protector-strong -Wformat -Werror=format-security -DNDEBUG -g
-fwrapv -O2 -Wall -Wstrict-prototypes -lpython2.
7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1
-Wl,-Bsymbolic-functions
/home/kefu/ceph/build/src/pybind/rados/pyrex/rados.c:239:28: fatal error:
rados/librados.h: No such file or directory
 #include "rados/librados.h"
                            ^
compilation terminated.
```

seems we can not pass the CFLAGS with space in it to setup.py using env variable

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-11 16:23:20 +08:00
Kefu Chai
6a99eec653 cmake: put cythonized .c files into ${CMAKE_CURRENT_BINARY_DIR}
it was put into the directory where .pyx is located. it's not expected
in an out-of-tree build.
* {rados,rbd,cephfs}/setup.py: use build_ext from cython if possible, fallback to
  the one from setuptools or distutils
* Distutils.cmake: pass --cython-c-in-temp --build-temp and
  --cython-include-dirs to "build_ext" command

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-11 16:23:20 +08:00
Kefu Chai
edd7c9d709 cmake: creage egg_info files into build directory
otherwise they will go to the source tree, and "git ls-files" will list
them as untracked files, which annoy gitbuilder-ceph-tarball*-cmake
gitbuilders. like

+ echo 'error: Added files:'
error: Added files:
+ cat .git/added-files
src/pybind/rados/rados.egg-info/PKG-INFO
...

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-08 15:02:59 +08:00
Kefu Chai
b5bb77d566 cmake: use the stock FindCURL.cmake
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-07 23:26:02 +08:00
Kefu Chai
3646fa5c6b cmake: use the stock FindEXPAT.cmake
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-07 23:26:02 +08:00
Josh Durgin
1c7ad3523d Merge pull request #9833 from onyb/wip-rados-pypi
pybind: make rados ready for PyPI

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-07-06 16:01:50 -07:00
Kefu Chai
0c5fb822dd cmake: refactor distutils_install_module to follow the pattern of distutils_install_cython_module
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-04 11:49:26 +08:00