SPTAG
SPTAG copied to clipboard
Error while building project using Docker
Hello !
While installing the tool on Docker, I got the following error logs in the build step :
[ 26%] Building CXX object AnnService/CMakeFiles/server.dir/src/Server/SearchService.cpp.o
/app/AnnService/src/Server/SearchService.cpp: In member function 'void SPTAG::Service::SearchService::RunSocketMode()':
/app/AnnService/src/Server/SearchService.cpp:117:94: error: no matching function for call to 'max(unsigned int, SPTAG::SizeType&)'
auto threadNum = max((unsigned int)1, m_serviceContext->GetServiceSettings()->m_threadNum);
^
In file included from /app/AnnService/inc/Core/VectorIndex.h:7:0,
from /app/AnnService/inc/Server/ServiceContext.h:7,
from /app/AnnService/inc/Server/SearchService.h:7,
from /app/AnnService/src/Server/SearchService.cpp:4:
/app/AnnService/inc/Core/Common.h:33:10: note: candidate: template<class T> T max(T, T)
inline T max(T a, T b) {
^~~
/app/AnnService/inc/Core/Common.h:33:10: note: template argument deduction/substitution failed:
/app/AnnService/src/Server/SearchService.cpp:117:94: note: deduced conflicting types for parameter 'T' ('unsigned int' and 'int')
auto threadNum = max((unsigned int)1, m_serviceContext->GetServiceSettings()->m_threadNum);
^
AnnService/CMakeFiles/server.dir/build.make:257: recipe for target 'AnnService/CMakeFiles/server.dir/src/Server/SearchService.cpp.o' failed
make[2]: *** [AnnService/CMakeFiles/server.dir/src/Server/SearchService.cpp.o] Error 1
CMakeFiles/Makefile2:176: recipe for target 'AnnService/CMakeFiles/server.dir/all' failed
make[1]: *** [AnnService/CMakeFiles/server.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
In the build step, the following required libraries were installed :
- swig 3.0.12
- cmake 3.14.4
- boost 1.67.0
The container is build on Ubuntu 18.04. My computer is under Windows 10 and uses Docker 2.0.0.3 (31259).
Full log of the build step are in attachment file : build_step.log
Steps to reproduce :
- Open PowerShell with Windows 10 with Docker installed
- git clone
- cd SPTAG
- docker build -t sptag .
- Wait for logs
Hope it helps !
The latest version I downloaded is also reported incorrectly. The previous version will not report an error on ubuntu 18.04.