venediktov / vanilla-rtb

Real Time Bidding (RTB) - Demand Side Platform framework

Home Page:http://forkbid.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vanilla-rtb build issues please help!

reoxey opened this issue · comments

/home/reoxey/CLionProjects/vanilla-rtb/rtb/datacache/any_str_ops.hpp:42:41: error: no match for call to ‘(const std::less<void>) (ufw::any_str_op<boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family>, boost::interprocess::iset_index> >, std::less<void> >::str_view_t, ufw::any_str_op<boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family>, boost::interprocess::iset_index> >, std::less<void> >::str_view_t)’
gmake[2]: *** [examples/CMakeFiles/country_cache_test.dir/country_cache_test.cpp.o] Error 1
gmake[2]: Leaving directory `/home/reoxey/CLionProjects/vanilla-rtb/Release'
gmake[1]: *** [examples/CMakeFiles/country_cache_test.dir/all] Error 2
gmake[1]: Leaving directory `/home/reoxey/CLionProjects/vanilla-rtb/Release'
gmake: *** [all] Error 2

can you rename your issue giving a meaningful name "vanilla-rtb does not build" , you are putting compiler error into issue name.

Can you share details of your platform, environment, and CMake and build command lines?

@mrbald, @venediktov thanks for the response
here is my details.

  • Ubuntu 14.04 64bits i5 4cores
  • Cmake version 3.2.2
  • Jetbrains intellij Clion 2017.1.1 IDE is used
reoxey@reoxey-Inspiron-3542:~/CLionProjects/vanilla-rtb$ cd Release
reoxey@reoxey-Inspiron-3542:~/CLionProjects/vanilla-rtb/Release$ cmake -DCMAKE_BUILD_TYPE=Release .. -G "Unix Makefiles"
CMAKE_INSTALL_PREFIX /usr/local
CMAKE_CURRENT_SOURCE_DIR /home/reoxey/CLionProjects/vanilla-rtb
CMAKE_CURRENT_BIN_DIR /home/reoxey/CLionProjects/vanilla-rtb/Release
CMake Warning (dev) in CMakeLists.txt:
  A logical block opening on the line

    /home/reoxey/CLionProjects/vanilla-rtb/CMakeLists.txt:28 (IF)

  closes on the line

    /home/reoxey/CLionProjects/vanilla-rtb/CMakeLists.txt:32 (ENDIF)

  with mis-matching arguments.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- JSONV version: 1.2.0
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   locale
-- RUNTIME_INSTALL_DIR == /usr/local/bin
-- LIBRARY_INSTALL_DIR == /usr/local/lib64
-- INCLUDE_INSTALL_DIR == /usr/local/include
-- CONFIG_INSTALL_DIR == /usr/local/lib64/cmake/jsonv
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   system
--   regex
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   log
--   system
--   serialization
--   program_options
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   log
--   serialization
--   system
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   log
--   program_options
--   system
--   serialization
--   date_time
-- benchmarks disabled (google.benchmark not found)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/reoxey/CLionProjects/vanilla-rtb/Release

i hope this helps

error in vanilla-rtb/Release/CMakeFiles/CMakeError.log

Determining if the pthread_create exist failed with the following output:
Change Dir: /home/reoxey/CLionProjects/vanilla-rtb/Release/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTryCompileExec962443860/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec962443860.dir/build.make CMakeFiles/cmTryCompileExec962443860.dir/build
gmake[1]: Entering directory `/home/reoxey/CLionProjects/vanilla-rtb/Release/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/reoxey/CLionProjects/vanilla-rtb/Release/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec962443860.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTryCompileExec962443860.dir/CheckSymbolExists.c.o   -c /home/reoxey/CLionProjects/vanilla-rtb/Release/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec962443860
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec962443860.dir/link.txt --verbose=1
/usr/bin/cc       CMakeFiles/cmTryCompileExec962443860.dir/CheckSymbolExists.c.o  -o cmTryCompileExec962443860 -rdynamic 
CMakeFiles/cmTryCompileExec962443860.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTryCompileExec962443860] Error 1
gmake[1]: Leaving directory `/home/reoxey/CLionProjects/vanilla-rtb/Release/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec962443860/fast] Error 2

File /home/reoxey/CLionProjects/vanilla-rtb/Release/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/reoxey/CLionProjects/vanilla-rtb/Release/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTryCompileExec1082825867/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec1082825867.dir/build.make CMakeFiles/cmTryCompileExec1082825867.dir/build
gmake[1]: Entering directory `/home/reoxey/CLionProjects/vanilla-rtb/Release/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/reoxey/CLionProjects/vanilla-rtb/Release/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec1082825867.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTryCompileExec1082825867.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.2/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec1082825867
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1082825867.dir/link.txt --verbose=1
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTryCompileExec1082825867.dir/CheckFunctionExists.c.o  -o cmTryCompileExec1082825867 -rdynamic -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTryCompileExec1082825867] Error 1
gmake[1]: Leaving directory `/home/reoxey/CLionProjects/vanilla-rtb/Release/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec1082825867/fast] Error 2

For Vanilla-RTB to compile:

  • the compiler should be something with good C++14 support (GCC 5.1+). What do you use?
  • the boost version should not be below 1.58. You seem to be with 1.54.

Once those are addressed, I absolutely suggest to start from checking out the code base clean and doing the build in the command line (running CMake in out-of-source-tree mode, like it's done in the Vanilla-RTB Travis integration build). This will rule out the IDE factor or on the contrary will confirm it's the IDE problem.

On a side note - I have tried to build from inside CLion on Ubuntu (cmake 3.8.2, gcc 7.1.1) - works.