now that python3.10 has two digits as its minor version, we should be
able to match it.
this change fixes the build with python3.10. without this change, we'd
have
error: wrong library name 'python310' in the --with-<library> option.
when building with python3.10
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
To build Boost.Context (and other libraries) with support to allow
them to be valground usefully, and to include the define to link
against them.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
BuildBoost.cmake (used when we're building the submodule) doesn't
provide parity with FindBoost.cmake (used with system Boost).
Specifically, it doesn't set the _FOUND variables for the various
components, making it hard to depend on finding those features.
Set Boost_<component>_FOUND for all the components we're building in
BuildBoost.cmake to make using these variables possible.
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
* 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>
use the ones shiped from the latest cmake. which
* enables us to find the recent python intepreter and development files,
* find intepreter and development in a single `find_pacakge()` command,
simpler this way and less error prone.
and to accomodate this change:
* all `PYTHON${PYTHON_VERSION}_*` variables are renamed to
`Python${PYTHON_VERSION}_*` if we use `find_package(Python2...)` or
`find_package(Python3...)` to find python2 or python3 instead of using
`find_package(Python...)`.
* use "2" explicitly when using python2, as `Python_*` variables are not
defined anymore
* when compiling python support of ceph-mgr, continue using `Python_*`
variables. because we find the python interpreter and development
files using `find_pacakge(Python...)` for ceph-mgr.
Signed-off-by: Kefu Chai <kchai@redhat.com>
The issue has been fixed upstream under lockfree commit
7e23dac52d08ed1a099de9a6fb8bcdefbb06d2da but is not yet available in
a boost release.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
FindBoost.cmake from upstream cmake now finds python libraries like
find_package(Boost 1.67 python36)
and it export targets like Boost::python36
but we are still linking against Boost::python, so to be compatible
with FindBoost.cmake, we need to update BuildBoost.cmake and
mgr/CMakeLists.txt accordingly. in other words, to export
Boost::python36 and to link Boost::python36.
Signed-off-by: Kefu Chai <kchai@redhat.com>
we have 'DH_VERBOSE=1' in debian/rules, which instructs debhelper to
pass -DCMAKE_VERBOSE_MAKEFILE=ON to cmake. but the verbose output for
building boost does not really help if something goes wrong while
building the deb packages. if we do want to enable the verbose output,
we can always enable it by passing `-d <N>' to it. see
https://boostorg.github.io/build/manual/develop/index.html#bbv2.overview.invocation.options
.
Signed-off-by: Kefu Chai <kchai@redhat.com>
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>
* 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>
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>
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>
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>
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>
* 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>
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>