From a0f2cbdfd22f3a015d882667e0f340b1c2603bd8 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 25 Sep 2015 10:30:10 +0200 Subject: [PATCH] Give a warning when system boost and stdlib-debug are used together In general this would lead to an immediate runtime crash because the runtime checks of libstdc++ change the layout of some STL objects. Therefore, this will only work when the boost libraries have been compiled with this same flag. At this time, it is not known whether any linux distribution contains such libraries. Fixes bug #9736. --- INSTALL | 6 +++++- config/lyxinclude.m4 | 9 +++++++++ status.21x | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index a330a0b241..96e9d58e7d 100644 --- a/INSTALL +++ b/INSTALL @@ -222,7 +222,11 @@ The following options allow you to tweak the generated code more precisely (see o --enable-stdlib-debug adds some debug code in the standard library; this slows down the code, but has been helpful in the - past to find bugs. + past to find bugs. Note that this is in general incompatible with + the system boost library (which is used when + --without-included-boost is specified). You may have to use + --disable-stdlib-debug when linking development versions against + your system's boost library. o --enable-concept-checks adds some compile-time checks. There is no run-time penalty. diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index a0094c10b3..d97911645e 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -360,6 +360,15 @@ AC_DEFUN([LYX_USE_INCLUDED_BOOST],[ fi fi AC_SUBST(BOOST_MT) + + dnl In general, system boost libraries are incompatible with + dnl the use of stdlib-debug in libstdc++. See ticket #9736 for + dnl details. + if test $enable_stdlib_debug = "yes" ; then + LYX_WARNING([Compiling LyX with stdlib-debug and system boost libraries may lead to + crashes. Consider using --disable-stdlib-debug or removing + --without-included-boost.]) + fi fi ]) diff --git a/status.21x b/status.21x index dafe9dc3f2..512f306e97 100644 --- a/status.21x +++ b/status.21x @@ -113,3 +113,5 @@ What's new - Work around gcc 5 bug 67557. +- Give a warning when system boost and stdlib-debug are used together + (bug 9736).