Commit 6faea427 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner

[3025] Detect a too old version of boost

With old version of boost and some versions of gcc, the RBTree
implementation is not stable with optimisations turned on. Detect the
old boost if we use gcc (no idea how to trigger it with the whole
machinery of the crashing test, so testing against the version).

Fail in that case now, we'll do something more drastic in following
commits.
parent 72bcad54
......@@ -898,6 +898,10 @@ if test "$BOOST_NUMERIC_CAST_WOULDFAIL" = "yes" -a X"$werror_ok" = X1 -a $CLANGP
AC_MSG_ERROR([Failed to compile a required header file. If you are using FreeBSD and Boost installed via ports, retry with specifying --without-werror. See the ChangeLog entry for Trac no. 1991 for more details.])
fi
if test "$BOOST_RBTREE_OLD" = "yes" ; then
AC_MSG_ERROR([Bah! Too old.])
fi
use_shared_memory=yes
AC_ARG_WITH(shared-memory,
AC_HELP_STRING([--with-shared-memory],
......
......@@ -30,6 +30,9 @@ dnl compile managed_mapped_file (can be empty).
dnl It is of no use if "WOULDFAIL" is yes.
dnl BOOST_STATIC_ASSERT_WOULDFAIL set to "yes" if BOOST_STATIC_ASSERT would
dnl cause build error; otherwise set to "no"
dnl BOOST_RBTREE_OLD if the version of boost is older than 1.48. The old
dnl version confuses some versions of gcc optimisations and
dnl certain files should be compiled without optimisations.
AC_DEFUN([AX_BOOST_FOR_BIND10], [
AC_LANG_SAVE
......@@ -106,9 +109,21 @@ if test "X$GXX" = "Xyes"; then
BOOST_NUMERIC_CAST_WOULDFAIL=yes])
CXXFLAGS="$CXXFLAGS_SAVED"
AC_MSG_CHECKING([Boost rbtree is old])
AC_TRY_COMPILE([
#include <boost/version.hpp>
#if BOOST_VERSION < 104800
#error Too old
#endif
],,[AC_MSG_RESULT(no)
BOOST_RBTREE_OLD=no
],[AC_MSG_RESULT(yes)
BOOST_RBTREE_OLD=yes])
else
# This doesn't matter for non-g++
BOOST_NUMERIC_CAST_WOULDFAIL=no
BOOST_RBTREE_OLD=no
fi
# Boost interprocess::managed_mapped_file is highly system dependent and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment