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 Debug build WITH_SEASTAR=ON
#23567
Conversation
tchaikov
commented
Aug 14, 2018
- References tracker ticket
- Updates documentation if necessary
- Includes tests for new functionality or reproducer for bug
c4d7e8a
to
4298583
Compare
a8fa7bc
to
6fb1581
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great cleanup!
src/osd/CMakeLists.txt
Outdated
${LEVELDB_LIBRARIES} | ||
dmclock heap_profiler cpu_profiler ${CMAKE_DL_LIBS}) | ||
${CMAKE_DL_LIBS}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see that we still link os in target_link_libraries(ceph-osd osd os
, can we make this one PUBLIC so it isn't needed in ceph-osd?
target_link_libraries(osd
PUBLIC os
PRIVATE dmclock heap_profiler cpu_profiler
5b238b3
to
923370b
Compare
@cbodley updated and repushed. |
jenkins test make check |
@tchaikov Removing the PR got things working again. |
@wjwithagen i can hardly tell what's going wrong with the failures. most of them are either segfaults or bus errors. will setup a FreeBSD vm to reproduce these failures. in the meanwhile, i'm inclined to merge it after running it thru rados qa suite. my wild guess is that the way how gtest is built in this change has a bad effect on the tests.. |
@tchaikov |
@tchaikov i'd prefer not to merge something that breaks freebsd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tchaikov
I have the feeling that this PR can be split into 2 pieces:
- cleanup and preparation for improved gtest.
- changes for gtest and gmock
Perhaps split the PR along those lines, and then I can test that seperately to find out which parts breaks FreeBSD.
CMakeLists.txt
Outdated
find_package(RocksDB 5.8 REQUIRED) | ||
else() | ||
include(BuildRocksDB) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tchaikov
This patch is more cleanup than it has something to do with gtest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please refer to the commit message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, as i put in the commit message. it's not a cleanup.
cmake/modules/BuildRocksDB.cmake
Outdated
set(rocksdb_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/rocksdb") | ||
set(rocksdb_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/rocksdb") | ||
set(rocksdb_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/rocksdb") | ||
set(rocksdb_BINARY_DIR "${CMAKE_BINARY_DIR}/src/rocksdb") | ||
ExternalProject_Add(rocksdb_ext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tchaikov
Same here..
cmake/modules/BuildGoogleTest.cmake
Outdated
-DBUILD_GMOCK=ON | ||
-DBUILD_GTEST=OFF | ||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON | ||
INSTALL_COMMAND "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tchaikov
Can I try this without this option? It could be one of the culpits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dropped this file from the latest changeset.
@@ -1,6 +1,6 @@ | |||
if(NOT Sanitizers_FIND_COMPONENTS) | |||
set(Sanitizers_FIND_COMPONENTS | |||
address undefined-behavior) | |||
address undefined_behavior) | |||
endif() | |||
if(HAVE_JEMALLOC) | |||
message(WARNING "JeMalloc does not work well with sanitizers") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tchaikov
Note that the standard allocator on FreeBSD is a Jemalloc version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am aware of this. and could you be more specific?
src/CMakeLists.txt
Outdated
@@ -520,7 +506,7 @@ set(ceph_osd_srcs | |||
ceph_osd.cc) | |||
add_executable(ceph-osd ${ceph_osd_srcs}) | |||
add_dependencies(ceph-osd erasure_code_plugins) | |||
target_link_libraries(ceph-osd osd os global-static common | |||
target_link_libraries(ceph-osd osd global-static common |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tchaikov
Looks like cleanup as well
i tested this PR on FreeBSD 11.2-RELEASE, with clang 6. the tests passed. |
923370b
to
4f81ee1
Compare
instead of building gtest/gmock as an external project, in the latest changset, they are built as sub-project as before. hopefully this would address the test failures on FreeBSD 12.0 CURRENT + clang 6.0. |
@tchaikov |
4f81ee1
to
d9cee47
Compare
@tchaikov |
@tchaikov And if the PR is not applied, tests are oke: Maybe I have some time tonight to disect the PR and see where tings go wrong. |
@tchaikov |
@wjwithagen thanks for testing. the generated debug symbol package of my test batch containing this PR is over 2G. the debug symbol package should be around 1.55G without this change. i will also look into this issue. |
@tchaikov |
@wjwithagen i didn't change any settings in specific. i just
but the vm was destroyed, so i can hardly tell what exactly linker i was using. if you are interested, i will try to create another this week-end. |
On 17/08/2018 09:52, Kefu Chai wrote:
@wjwithagen <https://github.com/wjwithagen> i didn't change any settings
in specific. i just
1. install |git| and |bash|
2. updated the ports using portsnap, and installed
3. ran |install-deps.sh|
4. ran |do_freebsd.sh|.
but the vm was destroyed, so i can hardly tell what exactly linker i was
using. if you are interested, i will try to create another this week-end.
@tchaikov
Thas is enough info.... Then you used the regular linker, sort of funny
that it works for you even while building tests.
Going to do the same with a 12.0-CURRENT version.
|
@wjwithagen i am moving the gtest change into #23628. the size of generated debug-info package looks sane: https://shaman.ceph.com/builds/ceph/wip-cmake-gtest/6f231ee8640a332b3a04808b7a5e9126369ebe57/ . could you give it a try ? while the build which contains the other commits in this PR fails due to over-sized debug-info: see https://shaman.ceph.com/builds/ceph/wip-cmake-cleanup-sanitize-links-os/00283a21e9c95144a30babc5c0be90e9c7fe0508/ . |
d9cee47
to
3e5c77a
Compare
now that the gtest change has been merged in #23628, i am removing it from this PR. |
@tchaikov |
and s/undefined-behavior/undefined_behavior/ to be compatible with seastar Signed-off-by: Kefu Chai <kchai@redhat.com>
3e5c77a
to
dda006a
Compare
@wjwithagen 7d46e18 and 3e5c77a are fishy. with these changes, the generated debug-info sizes > 2G. see https://shaman.ceph.com/builds/ceph/wip-cmake-link-dependencies/73449e3366d53cf365b628d4e3f01fdf0b05228f/ so i am dropping them. |
WITH_SEASTAR=ON
@tchaikov |