]> git.lyx.org Git - lyx.git/commitdiff
Give a warning when system boost and stdlib-debug are used together
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 11 Sep 2015 12:08:20 +0000 (14:08 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 22 Sep 2015 12:38:31 +0000 (14:38 +0200)
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
config/lyxinclude.m4

diff --git a/INSTALL b/INSTALL
index 7179dc3b63ea56ccd7e9dd6d0fb4d7f27a26c7d0..d3e266ff924c314504af38b0ebbd7dc5bd7ebdaa 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -223,7 +223,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.
index b488cefdc6c212eb8cbc9be590ab4271803b3044..5cfda06bbc515f602f3844aaca47bbe42a22ca30 100644 (file)
@@ -429,6 +429,15 @@ AC_DEFUN([LYX_USE_INCLUDED_BOOST],[
            else
              BOOST_LIBS="-lboost_regex${BOOST_MT} -lboost_signals${BOOST_MT}"
            fi
+
+           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
        AC_SUBST(BOOST_INCLUDES)
        AC_SUBST(BOOST_LIBS)