Commit Graph

58 Commits

Author SHA1 Message Date
Casey Bodley
ae0bac968e
Merge pull request #53849 from dvanders/dvanders_alma
install-deps.sh, do_cmake.sh: almalinux is another el flavour

Reviewed-by: John Mulligan <jmulligan@redhat.com>
2024-06-25 16:10:21 +01:00
Kefu Chai
ec0f9cca0f
Merge pull request #56718 from ceph/shallow-submodules
do_cmake.sh: Use shallow submodule clones

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2024-06-04 07:42:47 +08:00
Zack Cerza
0c345becf8 cmake: Support sccache
Signed-off-by: Zack Cerza <zack@redhat.com>
2024-04-09 16:39:35 -06:00
Zack Cerza
db0eed752e do_cmake.sh: Use shallow submodule clones
Signed-off-by: Zack Cerza <zack@redhat.com>
2024-04-04 15:31:01 -06:00
Zack Cerza
f97a16cfba do_cmake.sh: Use value of ARGS at runtime
The "Building Ceph" section of README.md instructs the user to run:

    ARGS="-DCMAKE_C_COMPILER=gcc-7" ./do_cmake.sh

But, very early on do_cmake.sh was doing ARGS="-GNinja", ignoring the existing
 value.

Signed-off-by: Zack Cerza <zack@redhat.com>
2024-03-14 15:43:36 -06:00
Brad Hubbard
838489f6b1 do_cmake.sh: set python version for Fedora 39
If do_cmake.sh is being exeuted on Fedora 39 set Python version to 3.12.
Remove versions for anything earlier than Fedora 37

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2023-11-21 10:44:33 +10:00
Rishabh Dave
eb6995436f cmake: add --progress flag to git submodule update commands
Ceph has lots of submodules that needs to be cloned before building
binaries from the repository. Seeing the progress when these submodules
are being cloned is useful, especially when developers/users have a
network issue or a slow network.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-10-31 23:14:49 +05:30
Dan van der Ster
6e85f76385 install-deps.sh, do_cmake.sh: almalinux is another el flavour
Signed-off-by: Dan van der Ster <dan.vanderster@clyso.com>
2023-10-05 09:51:34 -07:00
Ilya Dryomov
31eb4d2747
Merge pull request #48672 from nokia/fix_do_cmake_python_for_rocky
do_cmake.sh: build with correct python version on Rocky

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2023-07-12 11:07:12 +02:00
Rishabh Dave
8b14da0466 do_cmake.sh: set python version for Fedora 37
If do_cmake.sh is being exeuted on Fedora 37 set Python version to 3.11.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-04-05 21:57:26 +05:30
ShimTanny
2574672c2f do_cmake.sh: build with correct python version on rocky os
Fixes: https://tracker.ceph.com/issues/57945

Signed-off-by: ShimTanny <shimon.tanny@nokia.com>
2022-11-03 14:41:45 +02:00
Laura Flores
20d609b4ab do_cmake.sh: build with python3.10 on ubuntu version >= 22.0
Fixes: https://tracker.ceph.com/issues/57230
Signed-off-by: Laura Flores <lflores@redhat.com>
2022-08-23 10:09:11 -05:00
Kefu Chai
3d3b94a9dc do_cmake:sh: use newer gcc if available
despite that we are using clang in `run-make-check.sh`, `do_cmake.sh`
is still used by some workflows like jenkins' ceph-pr-api job.
now that we've migrated to C++20, we need to use GCC-11 or up for
building the tree. GCC-11 is installed from PPA repo in
`install-deps.sh`, but to avoid interfere with the build of older
branches which do not use GCC-11, as their builds might break if
we use GCC-11 for building them. we don't use the alternative machinary
to point gcc to gcc-11, see 8f342a32ce.

so, in this change, we try to use the newest GCC in system when
running `do_cmake.sh`.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-08-05 11:53:12 +08:00
Kefu Chai
7720651ea9 do_cmake:sh: do not set BOOST_J
do_cmake.sh is called by src/script/run-make.sh in configure() function,
in src/script/run-make.sh, BOOST_J is also set if it is not set. so we
can drop the code setting BOOST_J in do_cmake.sh.

this helps to silence the cmake warning like:

CMake Warning:
  Manually-specified variables were not used by the project:

    BOOST_J

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-08-11 17:34:23 +08:00
Kefu Chai
058d56e2c8 do_cmake.sh: use python3.10 for fedora 35
fedora34 was released in April 2021 with Python3.9. while fedora 35
(still Rawhide) will include python3.10. see https://fedoraproject.org/wiki/Releases/35/ChangeSet#Python_3.10

so update the script accordingly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-07 17:53:09 +08:00
Kefu Chai
e7597405c3 do_cmake.sh: refactor code to set PYBUILD
so it is more consistent with rhel/centos part.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-07 17:53:09 +08:00
Kefu Chai
d58a88c464 do_cmake: build with python3.9 on RHEL9
rhel9 has python3.9 as of rhel9beta

Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-03 09:34:01 +08:00
Kefu Chai
6dbd4f59f3 do_cmake: always pass -DWITH_PYTHON3 to cmake
do not pretend that we support python2 anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-09 19:13:21 +08:00
Kefu Chai
b05ea0d6e4 do_cmake,run-make: switch to ninja
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-09 19:13:21 +08:00
Vladimir Bashkirtsev
50564a60ce do_cmake.sh: do not perform 'git submodule update' if building from tarball
Signed-off-by: Vladimir Bashkirtsev <vladimir@bashkirtsev.com>
2021-01-09 14:36:55 +10:30
luo rixin
1621943c45 do_cmake: add a default value to BOOST_J
Signed-off-by: luo rixin <luorixin@huawei.com>
2020-12-23 17:11:29 +08:00
Sunny Kumar
2cc747cf4a do_cmake.sh: use python-3.9 with fedora version 33
Fedora-33 (rawhide) now has python-3.9.
Build breaks on Fedoa-33 with Traceback:
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
  Could NOT find Python3: Found unsuitable version "3.9.0", but required is
  exact version "3.8" (found /usr/bin/python3, found components: Interpreter
  Development)

Fixes: https://tracker.ceph.com/issues/47971
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
2020-10-26 11:42:06 +00:00
Abutalib Aghayev
2f705a7850 do_cmake.sh: do not unnecessarily warn about debug build
do_cmake.sh forgets to check the arguments passed to it and ends up warning
about debug build even if a user specifies a release build.

Signed-off-by: Abutalib Aghayev <agayev@gmail.com>
2020-05-13 17:13:25 -04:00
Kefu Chai
44ec921b44 do_cmake.sh: bail out if something goes wrong
so we can be aware if some updated submodule reference is missing in our
repo

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-01 00:14:19 +08:00
Kaleb S. KEITHLEY
5c80bb8f78 do_cmake.sh: fedora-32 (rawhide) build with python-3.8
Fedora-32 now has python-3.8.

Fedora-29 is EOL. All non-EOL versions of Fedora have python-3.7, except
Fedora-32

(Unclear to me why PYBUILD="3" isn't used, like Ubuntu and FreeBSD. That
would eliminate breakage when pyhon versions change in Rawhide.)

Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-01-03 08:34:37 -05:00
Kefu Chai
5fc657b40d cmake: drop WITH_PYTHON2 option
* drop WITH_PYTHON2 option
* print warning message if WITH_PYTHON3 is disabled
* drop MGR_PYTHON_VERSION option, as we don't support use different
  python version for python binding and ceph-mgr embedded python
  interpreter anymore. as before switching to python3-only build,
  we can build python3 and python2 python bindings, and ceph-mgr
  can use either of them. but after switching to python3-only
  build, ceph-mgr has to use whatever python version used to
  build python binding.
* move WITH_PYTHON3 option to $top_srcdir/CMakeLists.txt, as ceph-mgr
  and python binding will share this option.
* hardware ${PYTHON_VERSION} to 3
* hardware ${Python${PYTHON_VERSION}_VERSION_MAJOR} to 3
* only build boost library with python3
* s/Python_EXECUTABLE/Python3_EXECUTABLE/
* update the build scripts and packagings accordingly
* rename all cython${PYTHON_VERSION}_* targets to cython_*
* update distutils_install_module() so it does not take python_version
  parameter anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-19 10:58:58 +08:00
Kefu Chai
d4d31687c3
Merge pull request #30863 from matthewoliver/improve_do_cmake
do_cmake.sh: Add CEPH_GIT_DIR

Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-11-23 09:13:13 +08:00
Yuval Lifshitz
354d775e04 rgw/pubsub: add kafka notification endpoint
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
2019-11-05 19:25:03 +02:00
Matthew Oliver
eb33b30d3d do_cmake.sh: Add CEPH_GIT_DIR
This patch adds a new env variables that users can set to define the
location of the checked out ceph git repo.

The documentation mentions having to go edit the script directly to
point to the ceph git directory if the build dir isn't in the
top directory of the checked out git repo. This patch changes the '..'
into an env variable, CEPH_GIT_DIR, that defaults to '..'. To make it
easy to script and change.

This allows someone to do things like:

 export CEPH_GIT_DIR=~/git/ceph
 ./do_cmake.sh

or

 CEPH_GIT_DIR=~/git/ceph ./do_cmake.sh

Which is much better then editing the script directly.
The README.md has been modified to mention this variable and also
includes a drive by to mention `make -j` for new contributors to
build ceph quicker.

Signed-off-by: Matthew Oliver <moliver@suse.com>
2019-11-04 00:30:09 +00:00
Junyoung, Sung
678c14259f do_cmake: Disable shell command printing feature before cmake execution
Signed-off-by: Junyoung, Sung <junyoung.sung@navercorp.com>
2019-10-25 02:17:59 +09:00
Junyoung, Sung
87ada5fcc8 do_cmake: Warn user about slow debug performance only for not set
Signed-off-by: Junyoung, Sung <junyoung.sung@navercorp.com>
2019-10-25 00:48:59 +09:00
Kefu Chai
6d59402800 do_cmake.sh: enable amqp and rdma for EL8
the PowerTools repo now has the related dependencies, so let's enable
them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-10-17 22:22:08 +08:00
Kefu Chai
4ea4ddc482 do_cmake.sh: remove -DCMAKE_BUILD_TYPE=Debug from cmake options
so we can use do_cmake.sh for building release builds, which are
required for performance tests.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-10-09 12:26:17 +08:00
Kefu Chai
a118ba0eda do_cmake.sh: disable amqp and rdma on RHEL/CentOS 8
RHEL/CentOS 8 does not offer librabbitmq-devel, libibverbs-devel and
librdmacm-devel at this moment. so disable these features now.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-28 22:20:35 +08:00
Kefu Chai
612376a749 do_cmake.sh: set WITH_RADOSGW_AMQP_ENDPOINT using ARGS
so we can extend ARGS in a more unified way

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-28 22:20:35 +08:00
Yuval Lifshitz
b8b43fe59d allow for multiple "build" dirs to exist
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
2019-09-06 09:38:32 +03:00
Kefu Chai
9a47b328b8 do_cmake.sh: specify the supported py versions for different distros
there is chance that a distro offer a newer python3 version than the
supported one, so we need to avoid using the latest python3 version by
specifying the supported python3

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-07-24 00:45:22 +08:00
Brad Hubbard
f313ea3948 do_cmake.sh: Add a heading to the minimal config
Post #28634 the minimal ceph config is invalid without a header.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2019-06-28 15:46:30 +10:00
Nathan Cutler
ac8d7c5fd4 do_cmake.sh: use bash
Fixes: http://tracker.ceph.com/issues/39981
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-05-20 17:01:40 +02:00
Willem Jan Withagen
46b3d671b4 build: FreeBSD does not have /etc/os-release
So "manually" set requirements

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2019-03-04 11:33:38 +01:00
Nathan Cutler
18d2b2a603 do_cmake.sh: SUSE builds need WITH_RADOSGW_AMQP_ENDPOINT=OFF
Without this patch, "make check" fails on SUSE systems because
WITH_RADOS_AMQP_ENDPOINT defaults to "ON".

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-02-28 14:56:55 +01:00
Mark Nelson
d433522ae9 do_cmake: Warn user about slow debug performance by default.
Signed-off-by: Mark Nelson <mnelson@redhat.com>
2018-12-12 12:09:57 -06:00
Nathan Cutler
a691122a4e build/ops: do_cmake.sh: automate py3 build options for certain distros
Before this patch, run-make-check.sh was setting the cmake options for
py3 build based only on the absence of a python2 binary in the system.
This was not sufficiently deterministic, and it didn't help folks who
run do_cmake.sh directly.

With this patch, we explicitly force the py3 build in do_cmake.sh, for
those OS types/versions we know need it.

Fixes: https://tracker.ceph.com/issues/37330
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-11-21 16:51:16 +01:00
Sage Weil
7e6a57bd26 do_cmake.sh: default to Debug build
Signed-off-by: Sage Weil <sage@redhat.com>
2018-09-21 10:27:04 -05:00
Kefu Chai
79b55473ef run-make-check,do_cmake: set BOOST_J if !WITH_SYSTEM_BOOS
it's also more readable if we can set the number of make jobs
in a single place.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-11 22:22:47 +08:00
Kefu Chai
5868e496fa do_cmake: fail if cmake fails
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-26 16:50:37 +08:00
Kefu Chai
af2c91ace6 deb,rpm,do_cmake: switch to cmake3
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-06 13:29:21 +08:00
Nathan Cutler
7a17722d45 build/ops: do_cmake.sh: get rid of which dependency
"which" is not available on minimal systems, whereas "type" is a shell builtin,
so the chances of the command "just working" are greater with type than with
which.

In other parts of Ceph build/ops we have replaced "which" with "type" to good
effect.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-04-23 10:50:04 +02:00
Abhishek Lekshmanan
9b99018b99 build: do_cmake: allow ARGS to be overridden
so that one can do stuff like
ARGS="-DCMAKE_C_COMPILER=gcc-7 -D.." ./do_cmake.sh

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2018-01-10 18:02:29 +01:00
Shinobu Kinjo
5a3eed74d8 vstart.sh: drop .ceph_port and use randomly selected available port
vstart.sh becomes independent of do_cmake.sh

Signed-off-by: Shinobu Kinjo <shinobu@redhat.com>
2017-12-01 12:16:06 +09:00