This change is required to use the C++ tr1 headers only with libstdc++, as they are not in C++11. --- config.h.in.orig 2013-10-20 20:37:35.000000000 +0300 +++ config.h.in 2013-10-20 20:38:41.000000000 +0300 @@ -353,7 +353,8 @@ // TR1 regex not supported in GCC <= 4.5 #ifndef LYX_USE_TR1 -# if __GNUC__ == 4 +# include +# if __GNUC__ == 4 && !defined(_LIBCPP_VERSION) # define LYX_USE_TR1 # endif #endif