Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


On 03/05/2016 05:38 PM, Pranav Ganorkar wrote:
When trying to build sfx2 module with debugging symbols , I get the
following build error:

make sfx2.clean && make sfx2 debug=t

I fear that "selective debug" thing is not really working fully.

The problem is that recent GCC has a bug (<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66460> "ICE using __func__ in constexpr function") that causes internal compiler errors in constexpr functions that contain calls to assert (and where NDEBUG is not defined, so that the calls to assert actually expand to code).

That's why LO's configure.ac tries to detect whether marking functions that contain calls to assert as "constexpr" (via the expansion of LO's SAL_CONSTEXPR macro) is OK (see HAVE_CXX14_CONSTEXPR in config_host/config_global.h).

If you build LO with a GCC with above bug, using constexpr is still fine as long as calls to assert don't actually expand to any real code (i.e., in the implicit --disable-debug case). Hence, autogen.sh originally determined that HAVE_CXX14_CONSTEXPR is 1 for your environment. But when you call "make ... debug=t", autogen.sh does not get re-run, so the problematic functions (in include/o3tl/typed_flags_set.hxx) still get marked as "constexpr," even though their calls to assert now expand to code that triggers the GCC bug.

Probably best to disable HAVE_CXX14_CONSTEXPR regardless of whether your configure switches would cause NDEBUG to be defined, so that later builds with "make ... debug=t" do not run into this problem. Did that now with <https://cgit.freedesktop.org/libreoffice/core/commit/?id=4b8c29015d7c70121a161da0f3a85fa4ea0c5987> "Make detection of HAVE_CXX14_CONSTEXPR work with 'selective debugging.'" (Do a full top-level "make" once after pulling that, and afterwards "make sfx2.clean && make sfx2 debug=t" should work for you.)

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.