Error while building project using Docker
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 5k
- Forks
- 622
- Avg merge
- 8h 37m
- Merged PRs (30d)
- 5
Description
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 !
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read AnnService/src/Server/SearchService.cpp at RunSocketMode and AnnService/inc/Core/Common.h, then reproduce the failure with docker build -t sptag . using the reported Ubuntu 18.04 setup. Done means the Docker image builds successfully without the SearchService.cpp compilation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, docker
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100