Install from sources on Centos 7 fails

Cmake greater than 3.11 is not available via yum install cmake. that gives only 2.8 version. The only option is to use a precompiled Cmake. but even that does not allow to fully complete installation is I use a specific installation directory (not the default /usr/local , but /usr/local/manticore.

These are the steps(https is removed on all wgets to by pass forum filtering):

In /opt folder:
wget -c manticore-3.5.2-200722-6903305-release.tar.gz
tar -zxf manticore-3.5.2-.tar.gz
cd manticore-3.5.2-

(Stemmer download could be added to documentation for installs as this part is missing)
wget snowball.tartarus.org/dist/libstemmer_c.tgz
tar xvf libstemmer_c.tgz

yum install libmariadb-dev mariadb-devel libmysqlclient-dev mysql-devel
yum install re2
yum install gcc gcc-c++ make expat-devel libicu-devel openssl-devel boost-devel rpm-build systemd-units
yum install cmake (if installs lower than 3.11 version use:

Get precompiled Cmake

wget github.com/Kitware/CMake/releases/download/v3.19.0-rc3/cmake-3.19.0-rc3-Linux-x86_64.tar.gz

tar -zxf cmake-3.19.0-rc3-Linux-x86_64.tar.gz

cd cmake-3.19.0-rc3-Linux-x86_64/

ln -s /opt/cmake-3.19.0-rc3-Linux-x86_64/bin/cmake /bin/cmake

as /bin is a symlink to /usr/bin/ and is the same as doing this:

ln -s /opt/cmake-3.19.0-rc3-Linux-x86_64/bin/cmake /usr/bin/cmake

In any case, as mentioned I installed a precompiled version of cmake 3.19 to /opt/cmake-3.19.0-rc3-Linux-x86_64 and created a link for it to /bin/cmake simply to ensure any other calls used the correct version as well, as you’ve already seen.

The installation directory is usually left at its default, which is /usr/local. Installing software here ensures that it is automatically available to users. It is possible to specify a different installation directory by adding -DCMAKE_INSTALL_PREFIX=/usr/local/manticore to the CMake command line.

As for precompiling the configuration, this was actually done in the build/ directory with

mkdir build && cd build

cmake -S /opt/manticore-3.5.2-201002-8b2c175-release-source -DWITH_MYSQL=1 -DWITH_RE2=1 -DWITH_STEMMER=1 -DCMAKE_INSTALL_PREFIX=/usr/local/manticore

to set the source as was recommended in the documentation combined with the flags.

Create a folder /usr/local/manticore

mkdir manticore

After cmake completed the precompile, within the same build/ directory to actually install was done with:

make -j4

and this is where it fails:

[ 82%] Building CXX object src/CMakeFiles/libsphinx.dir/hazard_pointer.cpp.o
[ 83%] Building CXX object src/CMakeFiles/libsphinx.dir/task_info.cpp.o
[ 83%] Building CXX object src/CMakeFiles/libsphinx.dir/mini_timer.cpp.o
[ 84%] Linking CXX static library liblibsphinx.a
[ 84%] Built target libsphinx
src/CMakeFiles/searchd.dir/build.make:177: *** src/CMakeFiles/indexer.dir/build.make:102: *** target pattern contains no %'. Stop. target pattern contains no %‘. Stop.
src/CMakeFiles/indextool.dir/build.make:102: *** target pattern contains no %'. Stop. make[1]: *** [src/CMakeFiles/searchd.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [src/CMakeFiles/indexer.dir/all] Error 2 make[1]: *** [src/CMakeFiles/indextool.dir/all] Error 2 src/CMakeFiles/spelldump.dir/build.make:102: *** target pattern contains no %’. Stop.
make[1]: *** [src/CMakeFiles/spelldump.dir/all] Error 2
make: *** [all] Error 2

Any ideas on how to fix this?

And I am really sorry for forum filters trying to tell me i can only put 2 links on my first post.

Could you post full build log at gist or pastebin or use markdown triple ` to keep formatting sane?

like this

Is this the one?

```-- Option DISABLE_MEMROUTINES OFF
```-- Option USE_SYSLOG ON
```-- Option WITH_ZLIB ON
```-- Option WITH_ODBC ON
```-- ODBC_INCLUDE_DIRS is /usr/include
```-- ODBC_LIBRARY is /usr/lib64/libodbc.so
```-- ODBC found is TRUE
```-- ODBC will be loaded dynamically in runtime as libodbc.so.2
```-- Option WITH_EXPAT ON
```-- EXPAT will be loaded dynamically in runtime as libexpat.so.1
```-- Option WITH_ICONV ON
```-- Option WITH_MYSQL 1
```-- mysql_config was found /bin/mysql_config
```-- MySQL Include dir: /usr/include/mysql;/usr/include/mysql/mysql
```-- MySQL Library    : mariadb
```-- MySQL Library dir: /usr/lib64/
```-- MySQL CXXFLAGS: -I/usr/include/mysql -I/usr/include/mysql/mysql
```-- MySQL Library Name   : libmysqlclient.so
```-- MYSQL will be loaded dynamically in runtime as libmariadb.so.3
```-- Option WITH_PGSQL OFF
```-- Checking for unaligned RAM access
```-- Option WITH_RE2 1
```-- library: re2::re2
```-- Option WITH_STEMMER 1
```-- library: stemmer
```-- Option WITH_ICU ON
```-- library: icu::icu, icu-data: /opt/cache/icu-src/source/data/in/icudt65l.dat
```-- Could NOT find Valgrind (missing: VALGRIND_INCLUDE_DIR)
```-- Provide distr with -DDISTR=<distr>, one of: bionic;buster;debian;default;focal;jessie;macos;macosbrew;rhel;rhel6;rhel7;rhel8;stretch;trusty;wheezy;xenial
```-- Will create RPM for generic RedHat/Centos
```-- set src prefix to /tmp/m due to too long path
```-- Building for rhel
```-- Generating config.h file
```-- Configured by CMake with these definitions: -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_SSL=ON -DDL_UNIXODBC=1 -DUNIXODBC_LIB=libodbc.so.2 -DDL_EXPAT=1 -DEXPAT_LIB=libexpat.so.1 -DUSE_LIBICONV=1 -DDL_MYSQL=1 -DMYSQL_LIB=libmariadb.so.3 -DLOCALDATADIR=/usr/local/manticore/var/data -DFULL_SHARE_DIR=/usr/local/manticore/share/manticore -DUSE_RE2=1 -DUSE_ICU=1 -DUSE_BISON=ON -DUSE_FLEX=ON -DUSE_SYSLOG=1 -DWITH_EXPAT=ON -DWITH_ICONV=ON -DWITH_MYSQL=1 -DWITH_ODBC=ON -DWITH_RE2=1 -DWITH_STEMMER=1 -DWITH_ZLIB=ON -DGALERA_SONAME=libgalera_manticore.so.31 -DSYSCONFDIR=/usr/local/manticore/etc/manticoresearch
```-- Generate globalaliases.h from charsets/*.txt
```-- Discovered and added individual google-tests
```-- Generate rtestconfig.h from /opt/manticore-3.5.2-201002-8b2c175-release-source/src/testrt.conf
```-- python binary is /usr/bin/python
```-- Create ubertest.php proxy
```-- Configuring done
```-- Generating done
```-- Build files have been written to: /opt/manticore-3.5.2-201002-8b2c175-release-source/build

with make error messages

The errors of the make were at the end (on my first post). Strangely - I have run the build and the make and a got a different result this time:

```[  1%] Generate version from sources
```[  2%] Built target udfexample
```[  5%] Built target wsrep
```CMake Deprecation Warning at /opt/manticore-3.5.2-201002-8b2c175-release-source/sphinxrev.cmake:2 (cmake_minimum_required):
```  Compatibility with CMake < 2.8.12 will be removed from a future version of
```  CMake.
```  CMake that the project does not need compatibility with older versions.
```[ 30%] Built target stemmer
```-- Version not changed: 3.5.2 8b2c175@201002, from tarball
```[ 30%] Built target vergen
```[ 31%] Built target gtest
```[ 32%] Built target sphinxclient
```[ 33%] Built target gtest_main
```[ 34%] Built target gmock
```[ 51%] Built target lsearchd
```[ 52%] Built target testcli
```[ 53%] Built target gmock_main
```[ 84%] Built target libsphinx
```Scanning dependencies of target indexer
```Scanning dependencies of target searchd
```Scanning dependencies of target indextool
```Scanning dependencies of target spelldump
```[ 84%] Building CXX object src/CMakeFiles/spelldump.dir/spelldump.cpp.o
```[ 85%] Building CXX object src/CMakeFiles/indexer.dir/indexer.cpp.o
```[ 86%] Building CXX object src/CMakeFiles/indextool.dir/indextool.cpp.o
```[ 86%] Building CXX object src/CMakeFiles/searchd.dir/searchd.cpp.o
```[ 87%] Linking CXX executable spelldump
```[ 87%] Linking CXX executable indextool
```[ 87%] Linking CXX executable indexer
```[ 87%] Built target spelldump
```Scanning dependencies of target tests
```[ 88%] Building CXX object src/CMakeFiles/tests.dir/tests.cpp.o
```[ 88%] Built target indextool
```Scanning dependencies of target wordbreaker
```[ 88%] Building CXX object src/CMakeFiles/wordbreaker.dir/sphinxstd.cpp.o
```[ 88%] Built target indexer
```Scanning dependencies of target testrt
```[ 89%] Building CXX object src/CMakeFiles/testrt.dir/testrt.cpp.o
```[ 89%] Linking CXX executable tests
```[ 90%] Building CXX object src/CMakeFiles/wordbreaker.dir/wordbreaker.cpp.o
```[ 90%] Built target tests
```Scanning dependencies of target index_converter
```[ 91%] Building CXX object src/CMakeFiles/index_converter.dir/index_converter.cpp.o
```[ 91%] Linking CXX executable testrt
```[ 91%] Linking CXX executable wordbreaker
```[ 91%] Built target testrt
```Scanning dependencies of target gmanticoretest
```[ 91%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_rtstuff.cpp.o
```[ 91%] Built target wordbreaker
```[ 92%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_tokenizer.cpp.o
```[ 92%] Linking CXX executable index_converter
```[ 92%] Built target index_converter
```[ 92%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_text.cpp.o
```[ 93%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_functions.cpp.o
```[ 93%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_globalstate.cpp.o
```[ 94%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_searchd.cpp.o
```/opt/manticore-3.5.2-201002-8b2c175-release-source/src/gtests/gtests_functions.cpp: In member function ‘virtual void functions_int64_le_Test::TestBody()’:
```/opt/manticore-3.5.2-201002-8b2c175-release-source/src/gtests/gtests_functions.cpp:1987:50: warning: ‘u.functions_int64_le_Test::TestBody()::<anonymous union>::pMva[0]’ is used uninitialized in this ```function [-Wuninitialized]
```  auto iTest = ( int64_t ) ( ( uint64_t ) u.pMva[0] | ( ( ( uint64_t ) u.pMva[1] ) << 32 ) );
```                                                  ^
```/opt/manticore-3.5.2-201002-8b2c175-release-source/src/gtests/gtests_functions.cpp:1987:79: warning: ‘u.functions_int64_le_Test::TestBody()::<anonymous union>::pMva[1]’ is used uninitialized in this ```function [-Wuninitialized]
```  auto iTest = ( int64_t ) ( ( uint64_t ) u.pMva[0] | ( ( ( uint64_t ) u.pMva[1] ) << 32 ) );
```                                                                               ^
```[ 94%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_filter.cpp.o
```[ 95%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_searchdaemon.cpp.o
```[ 96%] Linking CXX executable searchd
```[ 97%] Built target searchd
```[ 97%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_pqstuff.cpp.o
```[ 98%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_json.cpp.o
```[ 98%] Building C object src/gtests/CMakeFiles/gmanticoretest.dir/cJSON_test.c.o
```[100%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_threadstuff.cpp.o
```[100%] Linking CXX executable gmanticoretest
```[100%] Built target gmanticoretest

I see the difference now. Deleted everything from /build forlder.

Executed:

```make -j4

Got errors shown on the first post and make stopped at 84%

So i ran this again without deleting anything from build folder:
```cmake -S /opt/manticore-3.5.2-201002-8b2c175-release-source -DWITH_MYSQL=1 -DWITH_RE2=1 -DWITH_STEMMER=1 -DCMAKE_INSTALL_PREFIX=/usr/local/manticore
```make -j4

and make went to 100% with warnings you see on my previous post.

On clean build is is always the same (repeating build and make will do 100% to finish)

[ 84%] Linking CXX static library liblibsphinx.a
[ 84%] Built target libsphinx
src/CMakeFiles/indexer.dir/build.make:102: *** src/CMakeFiles/searchd.dir/build.make:177: *** target pattern contains no %'target pattern contains no %’. Stop.
. Stop.
src/CMakeFiles/indextool.dir/build.make:102: *** target pattern contains no %'. Stop. make[1]: *** [src/CMakeFiles/searchd.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [src/CMakeFiles/indexer.dir/all] Error 2 make[1]: *** [src/CMakeFiles/indextool.dir/all] Error 2 src/CMakeFiles/spelldump.dir/build.make:102: *** target pattern contains no %’. Stop.
make[1]: *** [src/CMakeFiles/spelldump.dir/all] Error 2

So I’ll leave it here until you have more questions or a solution.

Is there any progress on this installation problem?

Hi @L4G

Not sure what went wrong in your case, but here’s how I compiled centos 7 package with -DCMAKE_INSTALL_PREFIX=/usr/local/manticore in centos 7 building docker in macos (but it shoudn’t make any difference):

➜  erlandas git clone https://github.com/manticoresoftware/manticoresearch.git
➜  erlandas cd manticoresearch/dist/build_dockers/centos7
➜  centos7 git:(master) chmod +x *
➜  centos7 git:(master) ✗ distr=centos7 ./build_base.sh
➜  centos7 git:(master) ✗ distr=centos7 ./build_boost.sh
➜  centos7 git:(master) ✗ distr=centos7 ./build_cmake.sh
➜  centos7 git:(master) ✗ docker run -it centos7_cmake:317 bash
[root@2bc0b28b66f6 manticore012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789]#
[root@2bc0b28b66f6 manticore012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789]# cd /
[root@2bc0b28b66f6 /]# git clone --depth 1 https://github.com/manticoresoftware/manticoresearch.git
[root@2bc0b28b66f6 /]# cd manticoresearch/
[root@2bc0b28b66f6 manticoresearch]#
[root@2bc0b28b66f6 manticoresearch]# mkdir build
[root@2bc0b28b66f6 manticoresearch]# cd build/
[root@2bc0b28b66f6 build]# cmake -DWITH_MYSQL=1 -DWITH_RE2=1 -DWITH_STEMMER=1 -DCMAKE_INSTALL_PREFIX=/usr/local/manticore ..
...
-- Will create RPM for generic RedHat/Centos
-- set src prefix to /tmp/m due to too long path
-- Building for rhel
-- Generating config.h file
-- Configured by CMake with these definitions: -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_SSL=ON -DDL_UNIXODBC=1 -DUNIXODBC_LIB=libodbc.so.2 -DDL_EXPAT=1 -DEXPAT_LIB=libexpat.so.1 -DUSE_LIBICONV=1 -DDL_MYSQL=1 -DMYSQL_LIB=libmysqlclient.so.18 -DLOCALDATADIR=/usr/local/manticore/var/data -DFULL_SHARE_DIR=/usr/local/manticore/share/manticore -DUSE_RE2=1 -DUSE_ICU=1 -DUSE_BISON=ON -DUSE_FLEX=ON -DUSE_SYSLOG=1 -DWITH_EXPAT=ON -DWITH_ICONV=ON -DWITH_MYSQL=1 -DWITH_ODBC=ON -DWITH_RE2=1 -DWITH_STEMMER=1 -DWITH_ZLIB=ON -DGALERA_SONAME=libgalera_manticore.so.31 -DSYSCONFDIR=/usr/local/manticore/etc/manticoresearch
-- Generate globalaliases.h from charsets/*.txt
-- Populate gtests from https://github.com/google/googletest/archive/master.zip
-- Found PythonInterp: /usr/bin/python (found version "2.7.5")
-- Discovered and added individual google-tests
-- Generate rtestconfig.h from /manticoresearch/src/testrt.conf
-- python binary is /usr/bin/python
-- Create ubertest.php proxy
-- Configuring done
-- Generating done
-- Build files have been written to: /manticoresearch/build
[root@2bc0b28b66f6 build]# make -j4
...
[ 97%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_filter.cpp.o
[ 97%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_searchdaemon.cpp.o
[ 98%] Linking CXX executable searchd
[ 98%] Built target searchd
[ 98%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_pqstuff.cpp.o
[100%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_json.cpp.o
[100%] Building C object src/gtests/CMakeFiles/gmanticoretest.dir/cJSON_test.c.o
[100%] Building CXX object src/gtests/CMakeFiles/gmanticoretest.dir/gtests_threadstuff.cpp.o
[100%] Linking CXX executable gmanticoretest
[100%] Built target gmanticoretest
[root@2bc0b28b66f6 build]# make package
...
CPack: Create package using RPM
CPack: Install projects
CPack: - Run preinstall target for: MANTICORE
CPack: - Install project: MANTICORE []
CPack: -   Install component: Unspecified
CPack: -   Install component: applications
CPack: -   Install component: converter
CPack: -   Install component: devel
CPack: -   Install component: icudata
CPack: -   Install component: meta
CPack: -   Install component: tools
CPack: Create package
CPackRPM: Will use GENERATED spec file: /manticoresearch/build/_CPack_Packages/Linux/RPM/SPECS/manticore-converter.spec
CPackRPM: Will use GENERATED spec file: /manticoresearch/build/_CPack_Packages/Linux/RPM/SPECS/manticore.spec
CPackRPM: Will use GENERATED spec file: /manticoresearch/build/_CPack_Packages/Linux/RPM/SPECS/manticore-Unspecified.spec
CPack: - package: /manticoresearch/build/manticore-3.5.3_201119.0709fc5-1.el7.x86_64.rpm generated.
CPack: - package: /manticoresearch/build/manticore-Unspecified-3.5.3_201119.0709fc5-1.el7.x86_64.rpm generated.
CPack: - package: /manticoresearch/build/manticore-converter-3.5.3_201119.0709fc5-1.el7.x86_64.rpm generated.
CPack: - package: /manticoresearch/build/manticore-converter-debuginfo-3.5.3_201119.0709fc5-1.el7.x86_64.rpm generated.
CPack: - package: /manticoresearch/build/manticore-debuginfo-3.5.3_201119.0709fc5-1.el7.x86_64.rpm generated.

➜  erlandas docker cp 2bc0b28b66f6:/manticoresearch/build/manticore-3.5.3_201119.0709fc5-1.el7.x86_64.rpm .
➜  erlandas docker run -it centos:7 bash
➜  erlandas docker cp manticore-3.5.3_201119.0709fc5-1.el7.x86_64.rpm 1e4b71d36ebd:/

[root@1e4b71d36ebd /]# yum install manticore-3.5.3_201119.0709fc5-1.el7.x86_64.rpm
[root@1e4b71d36ebd /]# ls -la /usr/bin/searchd
-rwxr-xr-x 1 root root 9077752 Nov 23 04:12 /usr/bin/searchd
[root@1e4b71d36ebd /]# ls -la /usr/local/manticore/
total 16
drwxr-xr-x 4 root root 4096 Nov 23 04:19 .
drwxr-xr-x 1 root root 4096 Nov 23 04:19 ..
drwxr-xr-x 2 root root 4096 Nov 23 04:19 lib64
drwxr-xr-x 5 root root 4096 Nov 23 04:19 var

[root@1e4b71d36ebd /]# searchd -v
Manticore 3.5.3 0709fc5@201119 dev
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2020, Manticore Software LTD (http://manticoresearch.com)

I have tried the latest stable 3.19 Cmake buil and it actually stops at 80%
I still see the problem with Cmake at the same place just after libsphinx is built. So there must be something Cmake does not like in the code. Either way - it could be even Cmake problem on Centos 7 as i was getting this:

```[ 79%] Building CXX object src/CMakeFiles/libsphinx.dir/fnv64.cpp.o
```[ 80%] Linking CXX static library liblibsphinx.a
```[ 80%] Built target libsphinx
```src/CMakeFiles/indexer.dir/build.make:102: *** src/CMakeFiles/searchd.dir/build.make:163: *** target pattern contains no `%'target pattern contains no `%'.  Stop.
```.  Stop.
```src/CMakeFiles/indextool.dir/build.make:102: *** target pattern contains no `%'.  Stop.
```make[1]: *** [src/CMakeFiles/searchd.dir/all] Error 2
```make[1]: *** Waiting for unfinished jobs....
```make[1]: *** [src/CMakeFiles/indexer.dir/all] Error 2
```make[1]: *** [src/CMakeFiles/indextool.dir/all] Error 2
```src/CMakeFiles/spelldump.dir/build.make:102: *** target pattern contains no `%'.  Stop.
```make[1]: *** [src/CMakeFiles/spelldump.dir/all] Error 2
```make: *** [all] Error 2

After some more tests for another few hours and getting nowhere I have decided to install Docker on my server and give it a try as I was hitting a wall. Will update afterwards.

Maybe it’s a problem of cmake 3.19 which we’ll have to fix eventually when we need smth from 3.19. As I showed, with cmake 3.17.3 it works fine, we anyway use our dockers for build to not depend on the host server’s OS, cmake version etc.

Yes, it is very possible that Cmake 3.19 is not compatible yet.

:slight_smile: It would refuse to do although I have repeated this 3 times just as you were doing with docker. It complains about cmakelist not being present in build folder. Tried in manticoresearch folder - it does start but that is not the right way. What is missing here?

[root@web2 opt]# git clone GitHub - manticoresoftware/manticoresearch: Easy to use open source fast database for search | Good alternative to Elasticsearch now | Drop-in replacement for E in the ELK soon
Cloning into ‘manticoresearch’…
remote: Enumerating objects: 482, done.
remote: Counting objects: 100% (482/482), done.
remote: Compressing objects: 100% (315/315), done.
remote: Total 53332 (delta 267), reused 286 (delta 166), pack-reused 52850
Receiving objects: 100% (53332/53332), 32.76 MiB | 30.83 MiB/s, done.
Resolving deltas: 100% (40456/40456), done.
[root@web2 opt]# cd manticoresearch/dist/build_dockers/centos7
[root@web2 centos7]#
[root@web2 opt]# cd manticoresearch/dist/build_dockers/centos7
[root@web2 centos7]# chmod +x *
[root@web2 centos7]# ./build_base.sh
Sending build context to Docker daemon 2.56 kB
Step 1/6 : FROM centos:7
—> 8652b9f0cb4c
Step 2/6 : RUN yum install -y gcc gcc-c++ make git flex bison rpm-build mysql-devel expat-devel postgresql-devel unixODBC-devel systemd-units python-devel wget && yum clean all && rm -rf /var/cache/yum && mkdir /manticore012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
—> Using cache
—> 4dc4c2369bc0
Step 3/6 : RUN cd / && wget https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc && mv mc /usr/local/bin/
—> Using cache
—> 32c7d8357330
Step 4/6 : WORKDIR /manticore012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
—> Using cache
—> 7e60b288206b
Step 5/6 : ENV DISTR rhel7
—> Using cache
—> 5eba4bf250de
Step 6/6 : CMD
—> Using cache
—> e6f87e2ab3ae
Successfully built e6f87e2ab3ae
[root@web2 centos7]#
[root@web2 centos7]# ./build_boost.sh
Sending build context to Docker daemon 2.048 kB
Step 1/4 : FROM base_build:centos7
—> e6f87e2ab3ae
Step 2/4 : ARG boostminorver=72
—> Using cache
—> 605d0905b097
Step 3/4 : RUN wget https://dl.bintray.com/boostorg/release/1.${boostminorver}.0/source/boost_1_${boostminorver}_0.tar.gz && tar -zxf boost_1_${boostminorver}0.tar.gz && rm boost_1${boostminorver}0.tar.gz && cd boost_1${boostminorver}0 && ./bootstrap.sh && ./b2 install --with-context --with-system runtime-link=static && cd … && rm -rf boost_1${boostminorver}_0
—> Using cache
—> 759e0a35570f
Step 4/4 : CMD
—> Using cache
—> f6311665bbaf
Successfully built f6311665bbaf
[root@web2 centos7]# ./build_cmake.sh
Sending build context to Docker daemon 2.56 kB
Step 1/6 : FROM centos7_boost:172
—> f6311665bbaf
Step 2/6 : RUN yum update -y ca-certificates && yum clean all && rm -rf /var/cache/yum && mc update
—> Using cache
—> 3adae2f2bb3e
Step 3/6 : ARG cmakever=“3.17.3”
—> Using cache
—> 5931958e94c6
Step 4/6 : RUN cd / && wget https://github.com/Kitware/CMake/releases/download/v${cmakever}/cmake-${cmakever}-Linux-x86_64.tar.gz && tar -zxf cmake-${cmakever}-Linux-x86_64.tar.gz && rm cmake-${cmakever}-Linux-x86_64.tar.gz
—> Using cache
—> 3ed84eae5b52
Step 5/6 : ENV PATH $PATH:/cmake-${cmakever}-Linux-x86_64/bin
—> Using cache
—> d5643af0b1b0
Step 6/6 : CMD
—> Using cache
—> ff88459cfcc3
Successfully built ff88459cfcc3
[root@web2 centos7]# docker run -it centos7_cmake:317 bash
[root@ebe84ab56f82 manticore012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789]# cd /
[root@ebe84ab56f82 /]# git clone --depth 1 GitHub - manticoresoftware/manticoresearch: Easy to use open source fast database for search | Good alternative to Elasticsearch now | Drop-in replacement for E in the ELK soon
Cloning into ‘manticoresearch’…
remote: Enumerating objects: 2117, done.
remote: Counting objects: 100% (2117/2117), done.
remote: Compressing objects: 100% (1841/1841), done.
remote: Total 2117 (delta 249), reused 1135 (delta 151), pack-reused 0
Receiving objects: 100% (2117/2117), 4.76 MiB | 1.34 MiB/s, done.
Resolving deltas: 100% (249/249), done.
[root@ebe84ab56f82 /]# cd manticoresearch/
[root@ebe84ab56f82 manticoresearch]# mkdir build && cd build
[root@ebe84ab56f82 build]# cmake -DWITH_MYSQL=1 -DWITH_RE2=1 -DWITH_STEMMER=1 -DCMAKE_INSTALL_PREFIX=/usr/local/manticore
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.

CMake Error: The source directory “/manticoresearch/build” does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
[root@ebe84ab56f82 build]#

OK, Docker must be some path missing but when you have mentioned that Cmake 3.17 was tested and working I did the same since I did not know what else to test with Docker image installation (you may see the whole list of command done just as yours). Maybe some step missed prior to that. Still - would be beneficial to others to mention the correct way on Install page. Less questions asked :wink:

So I went ahead and downloaded Cmake 3-17.3 , built it and took latest ManticoreSearch build from Git based on your commands.

This time it went like charm and installed everything. So I believe it would be best to mention on Installation documentation both - Lowest and highest Cmake version tested. Would save a lot of trouble to all. So my case on installation is solved. it was installed where I wanted.

Instructions for someone building on Centos 7 with MariaDB from sources some time in future:

Download Manticore In /opt folder:
wget -c https://repo.manticoresearch.com/repository/manticoresearch_source/release/manticore-3.5.2-200722-6903305-release.tar.gz
tar -zxf manticore-3.5.2-.tar.gz
rename manticore-3.5.2-
to manticore

cd /opt/manticore

or get from github in /opt folder

git clone --depth 1 GitHub - manticoresoftware/manticoresearch: Easy to use open source fast database for search | Good alternative to Elasticsearch now | Drop-in replacement for E in the ELK soon

wget http://snowball.tartarus.org/dist/libstemmer_c.tgz
tar -xvf libstemmer_c.tgz

yum install libmariadb-dev mariadb-devel libmysqlclient-dev mysql-devel
yum install re2
yum install gcc gcc-c++ make expat-devel libicu-devel openssl-devel boost-devel rpm-build systemd-units
yum install cmake (if installs lower than 3.13 version use:

wget https://cmake.org/files/v3.17/cmake-3.17.3.tar.gz

tar -zxf cmake-3.17.3.tar.gz

cd /cmake-3.17.3

(Note: the make install step is optional, cmake will run from the build directory just fine.)

./bootstrap
make
#Optional, skipped this step, cmake is built in bin folder and that is enough:
make install

The installation directory is usually left at its default, which is /usr/local and usually better not to install here. It is possible to specify a different installation directory by adding

-DCMAKE_INSTALL_PREFIX=/usr/local/manticore to the CMake command line.

As for precompiling the configuration, this was actually done in the /build directory in

cd /opt/manticoresearch

mkdir build && cd build

/opt/cmake-3.17.3/bin/cmake -S /opt/manticoresearch -DWITH_MYSQL=1 -DWITH_RE2=1 -DWITH_STEMMER=1 -DCMAKE_INSTALL_PREFIX=/usr/local/manticore

to set the source as was recommended in the documentation combined with the flags.

Create a folder /usr/local/manticore

mkdir manticore

After cmake completed the precompile, within the same build/ directory to actually install was done with:

make -j4

and

make -j4 install

again per the documentation.

This installs Manticore in /usr/local/manticore

Check the version:

cd /usr/local/manticore/usr/bin

./searchd -v
Manticore 3.5.3 0709fc5b@201119 dev
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2020, Manticore Software LTD (http://manticoresearch.com)