Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Patch for Sphinx/Coreseek 4.1 beta on Ubuntu14.04 LTS (gcc4.7+)
diff -ruN coreseek-4.1-beta/csft-4.1/buildconf.sh coreseek-4.1-beta.p0/csft-4.1/buildconf.sh
--- coreseek-4.1-beta/csft-4.1/buildconf.sh 2011-10-07 20:08:56.000000000 +0800
+++ coreseek-4.1-beta.p0/csft-4.1/buildconf.sh 2015-07-22 15:35:21.268304991 +0800
@@ -2,5 +2,5 @@
autoheader \
&& aclocal \
-&& automake --foreign \
+&& automake --add-missing --foreign \
&& autoconf
diff -ruN coreseek-4.1-beta/csft-4.1/configure.ac coreseek-4.1-beta.p0/csft-4.1/configure.ac
--- coreseek-4.1-beta/csft-4.1/configure.ac 2011-10-07 20:08:57.000000000 +0800
+++ coreseek-4.1-beta.p0/csft-4.1/configure.ac 2015-07-22 15:39:35.112302678 +0800
@@ -10,7 +10,7 @@
SPHINX_CONFIGURE_PART([checking build environment])
AC_CONFIG_AUX_DIR([config])
-AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+AM_INIT_AUTOMAKE([-Wall foreign])
AM_MAINTAINER_MODE
AM_PATH_PYTHON
AC_CONFIG_SRCDIR([src/searchd.cpp])
@@ -59,6 +59,7 @@
AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
+AM_PROG_AR
dnl Checks for embedded interpretors.
INN_ARG_PYTHON
diff -ruN coreseek-4.1-beta/csft-4.1/src/sphinxexpr.cpp coreseek-4.1-beta.p0/csft-4.1/src/sphinxexpr.cpp
--- coreseek-4.1-beta/csft-4.1/src/sphinxexpr.cpp 2011-10-07 20:08:58.000000000 +0800
+++ coreseek-4.1-beta.p0/csft-4.1/src/sphinxexpr.cpp 2015-07-22 15:40:27.764302198 +0800
@@ -1743,7 +1743,7 @@
/// evaluate arg, return interval id
virtual int IntEval ( const CSphMatch & tMatch ) const
{
- T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage
+ T val = this->ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage
ARRAY_FOREACH ( i, this->m_dValues ) // FIXME! OPTIMIZE! perform binary search here
if ( val<this->m_dValues[i] )
return i;
@@ -1774,7 +1774,7 @@
/// evaluate arg, return interval id
virtual int IntEval ( const CSphMatch & tMatch ) const
{
- T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage
+ T val = this->ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage
ARRAY_FOREACH ( i, m_dTurnPoints )
if ( val < Expr_ArgVsSet_c<T>::ExprEval ( m_dTurnPoints[i], tMatch ) )
return i;
@@ -1820,7 +1820,7 @@
/// evaluate arg, check if the value is within set
virtual int IntEval ( const CSphMatch & tMatch ) const
{
- T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage
+ T val = this->ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage
return this->m_dValues.BinarySearch ( val )!=NULL;
}