Skip to content

Instantly share code, notes, and snippets.

@gotnix
Last active June 12, 2018 05:57
Show Gist options
  • Save gotnix/4723b0bafe9fbf5267c9e145001958ea to your computer and use it in GitHub Desktop.
Save gotnix/4723b0bafe9fbf5267c9e145001958ea to your computer and use it in GitHub Desktop.
Patch for Sphinx/Coreseek 3.2.14 on CentOS Linux release 7.5.1804 (Core) (gcc4.7+)
diff -ruBN v1/coreseek-3.2.14/csft-3.2.14/buildconf.sh v2/coreseek-3.2.14/csft-3.2.14/buildconf.sh
--- v1/coreseek-3.2.14/csft-3.2.14/buildconf.sh 2010-05-07 01:07:49.000000000 +0800
+++ v2/coreseek-3.2.14/csft-3.2.14/buildconf.sh 2018-06-12 12:03:52.869750853 +0800
@@ -2,5 +2,5 @@
autoheader \
&& aclocal \
-&& automake --foreign \
+&& automake --foreign --add-missing \
&& autoconf
diff -ruBN v1/coreseek-3.2.14/csft-3.2.14/configure.ac v2/coreseek-3.2.14/csft-3.2.14/configure.ac
--- v1/coreseek-3.2.14/csft-3.2.14/configure.ac 2010-05-07 01:07:49.000000000 +0800
+++ v2/coreseek-3.2.14/csft-3.2.14/configure.ac 2018-06-12 12:04:33.009452260 +0800
@@ -58,7 +58,7 @@
AC_PROG_CC
AC_PROG_CXX
-AC_PROG_RANLIB
+AC_PROG_RANLIB AM_PROG_AR
dnl Checks for embedded interpretors.
INN_ARG_PYTHON
diff -ruBN v1/coreseek-3.2.14/csft-3.2.14/src/sphinxexpr.cpp v2/coreseek-3.2.14/csft-3.2.14/src/sphinxexpr.cpp
--- v1/coreseek-3.2.14/csft-3.2.14/src/sphinxexpr.cpp 2010-05-07 01:07:49.000000000 +0800
+++ v2/coreseek-3.2.14/csft-3.2.14/src/sphinxexpr.cpp 2018-06-12 12:05:26.096455759 +0800
@@ -1010,7 +1010,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;
@@ -1044,7 +1044,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;
@@ -1077,7 +1077,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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment