Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: fix build WITH_SYSTEM_BOOST=ON #23510

Merged
merged 1 commit into from Aug 13, 2018

Conversation

tchaikov
Copy link
Contributor

@tchaikov tchaikov commented Aug 9, 2018

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

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

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>
@wjwithagen
Copy link
Contributor

@tchaikov
Not sure if this is going to fly with the CMake stuff that is in FreeBSD packages.
I always have this struggle on a Boost upgrade with FreeBSD that CMake is lagging.
And there might be some different opinions on how to handle python 27 versus 36.
So I'll throw this into Jenkins and see what comes of it.

Copy link
Contributor

@wjwithagen wjwithagen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have had several Jenkins runs already with this patch.
Latest:
http://cephdev.digiware.nl:8180/jenkins/job/ceph-master/2426/console

@tchaikov
Copy link
Contributor Author

@wjwithagen thanks for testing!

@tchaikov tchaikov merged commit e2e6a77 into ceph:master Aug 13, 2018
@tchaikov tchaikov deleted the wip-cmake-boost-build branch August 13, 2018 13:42
@wjwithagen
Copy link
Contributor

@tchaikov
As far as I can tell I need a small bit of this PR backported to mimic:
mimic : src/CMakeLists.txt:770
refers to Boost::python, which fails while building on FreeBSD.
Any chance to cherrypick anything, or should I just commit a PR against mimic?

@tchaikov
Copy link
Contributor Author

tchaikov commented Feb 6, 2019

no, i don't think so. as it does not break the build. i introduced this fix just to enable Ceph to find pre-built ceph-libboost-* packages when running make check . please follow the instructions at #26277 (comment) for backporting the changes.

@wjwithagen
Copy link
Contributor

@tchaikov
I'm not quite getting what you mean?
I would need to have:
mimic : src/CMakeLists.txt:770 look like:

target_link_libraries(ceph-mgr
  osdc client heap_profiler
  osdc client heap_profiler
  global-static ceph-common
  global-static ceph-common
  Boost::python ${MGR_PYTHON_LIBRARIES} ${CMAKE_DL_LIBS})
  Boost::python${MGR_PYTHON_VERSION_MAJOR}${MGR_PYTHON_VERSION_MINOR}
  ${MGR_PYTHON_LIBRARIES} ${CMAKE_DL_LIBS})

But I think that cannot be cherrypicked, so it warants a separate PR.
I can still follow @smithfarm's suggestions on how to backport.

@tchaikov
Copy link
Contributor Author

tchaikov commented Feb 6, 2019

i was trying to answer your question.

Any chance to cherrypick anything,

no, i don't think so. as it does not break the build. i introduced this fix just to enable Ceph to find pre-built ceph-libboost-* packages when running make check .

or should I just commit a PR against mimic?

please follow the instructions at #26277 (comment) for backporting the changes.

@wjwithagen
Copy link
Contributor

Tracker: http://tracker.ceph.com/issues/38213

@wjwithagen
Copy link
Contributor

@smithfarm
backport PR #26300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants