[Bug 1894453] Re: Building Ceph packages with RelWithDebInfo
Tyler Stachecki
1894453 at bugs.launchpad.net
Thu Sep 10 13:54:36 UTC 2020
Checked out ceph-15.2.3 source on a up-to-date focal VM.
When running dpkg-buildpackage, CMakeCache.txt gets generated as
expected. However, the generated CMAKE_BUILD_TYPE is "None".
A bit odd, but going a step further, one can grep for CMAKE_C_FLAGS in that same file and see something to the effect of:
CMAKE_C_FLAGS_DEBUG:STRING=<sensible compiler settings for debug builds>
CMAKE_C_FLAGS_NONE:STRING=
...
...
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=<sensible compiler settings for release builds>
It seems, though, that since "None" is used, all of those are actually ignored and
CMAKE_C_FLAGS:STRING=<compiler flags from dpkg-buildpackage>
is used
That particular set of flags seems to be missing -DNDEBUG. It's worth
noting that -DNDEBUG is defined within
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING and including it may result in a
more optimized build.
This is not quite the Gentoo issue as Trent alluded.
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to ceph in Ubuntu.
https://bugs.launchpad.net/bugs/1894453
Title:
Building Ceph packages with RelWithDebInfo
Status in ceph package in Ubuntu:
In Progress
Bug description:
This is to consider/discuss the possibility of whether the Ceph
packages (UCA) should be built with RelWithDebInfo build option
(CMAKE_BUILD_TYPE [0]) which can be supplied to the build script
do_cmake.sh [1].
Currently, Upstream as well as UCA builds default to 'Debug' [0]
builds. But is any reason why shouldn't go for RelWithDebInfo (i.e.
"Release with Debug information")?
There's one issue noted with RelWithDebInfo which has a workaround too [2].
In general, gcc's -O2 [3] build should generate better code as well as
there's a specific case for Ceph [4] that it improves performance.
[0] https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
[1] https://github.com/ceph/ceph/blob/master/do_cmake.sh
[2] https://docs.ceph.com/docs/master/dev/perf/#common-issues
[3] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
[4] https://bugs.gentoo.org/show_bug.cgi?id=733316
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1894453/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list