Build errors

Sep 15, 2014 at 9:25 AM
Hello,

I have a problem when I try to build casablanca. My compiler is g++ 4.8 and the OS is Ubuntu 12.04.

Any ideas ?

Thanks

$ git clone https://git01.codeplex.com/casablanca
$ cd casablanca/Release
$ mkdir build.release
cmake .. -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost version: 1.48.0
-- Found the following Boost libraries:
-- random
-- chrono
-- system
-- thread
-- locale
-- regex
-- filesystem
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- checking for module 'openssl'
-- found openssl, version 1.0.1
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1..1")
-- Setting gcc options
-- Added test library httpclient_test
-- Added test library httplistener_test
-- Added test library json_test
-- Added test library pplx_test
-- Added test library streams_test
-- Added test library uri_test
-- Added test library utils_test
-- Added test library websocketclient_test
-- Configuring done
-- Generating done
-- Build files have been written to: /work/casablanca/Release/build.release

$ make
...
In file included from /usr/include/boost/bind/mem_fn.hpp:215:0,
             from /usr/include/boost/mem_fn.hpp:22,
             from /usr/include/boost/function/detail/prologue.hpp:18,
             from /usr/include/boost/function.hpp:24,
             from /usr/include/boost/locale/gnu_gettext.hpp:12,
             from /usr/include/boost/locale.hpp:20,
             from /work/casablanca/Release/src/pch/stdafx.h:74,
             from /work/casablanca/Release/src/http/client/http_linux.cpp:30:
/usr/include/boost/bind/mem_fn_template.hpp: In instantiation of ‘R boost::_mfi::mf2<R, T, A1, A2>::call(U&, const void*, B1&, B2&) const [with U = std::shared_ptr<web::http::client::details::linux_client>; B1 = const boost::system::error_code; B2 = std::shared_ptr<web::http::client::details::linux_client_request_context>; R = void; T = web::http::client::details::linux_client; A1 = const boost::system::error_code&; A2 = std::shared_ptr<web::http::client::details::linux_client_request_context>]’:
/usr/include/boost/bind/mem_fn_template.hpp:286:46: required from ‘R boost::_mfi::mf2<R, T, A1, A2>::operator()(U&, A1, A2) const [with U = std::shared_ptr<web::http::client::details::linux_client>; R = void; T = web::http::client::details::linux_client; A1 = const boost::system::error_code&; A2 = std::shared_ptr<web::http::client::details::linux_client_request_context>]’
/usr/include/boost/bind/bind.hpp:392:34: required from ‘void boost::_bi::list3<A1, A2, A3>::operator()(boost::_bi::type<void>, F&, A&, int) [with F = boost::_mfi::mf2<void, web::http::client::details::linux_client, const boost::system::error_code&, std::shared_ptr<web::http::client::details::linux_client_request_context> >; A = boost::_bi::list2<const boost::system::error_code&, const long unsigned int&>; A1 = boost::_bi::value<std::shared_ptr<web::http::client::details::linux_client> >; A2 = boost::arg<1> (*)(); A3 = boost::_bi::value<std::shared_ptr<web::http::client::details::linux_client_request_context> >]’
/usr/include/boost/bind/bind_template.hpp:102:59: required from ‘boost::_bi::bind_t<R, F, L>::result_type boost::_bi::bind_t<R, F, L>::operator()(const A1&, const A2&) [with A1 = boost::system::error_code; A2 = long unsigned int; R = void; F = boost::_mfi::mf2<void, web::http::client::details::linux_client, const boost::system::error_code&, std::shared_ptr<web::http::client::details::linux_client_request_context> >; L = boost::_bi::list3<boost::_bi::value<std::shared_ptr<web::http::client::details::linux_client> >, boost::arg<1> (*)(), boost::_bi::value<std::shared_ptr<web::http::client::details::linux_client_request_context> > >; boost::_bi::bind_t<R, F, L>::result_type = void]’
/usr/include/boost/asio/impl/read_until.hpp:614:9: required from ‘void boost::asio::detail::read_until_delim_string_op<AsyncReadStream, Allocator, ReadHandler>::operator()(const boost::system::error_code&, std::size_t, int) [with AsyncReadStream = boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp>&>; Allocator = std::allocator<char>; ReadHandler = boost::_bi::bind_t<void, boost::_mfi::mf2<void, web::http::client::details::linux_client, const boost::system::error_code&, std::shared_ptr<web::http::client::details::linux_client_request_context> >, boost::_bi::list3<boost::_bi::value<std::shared_ptr<web::http::client::details::linux_client> >, boost::arg<1> (*)(), boost::_bi::value<std::shared_ptr<web::http::client::details::linux_client_request_context> > > >; std::size_t = long unsigned int]’
/usr/include/boost/asio/impl/read_until.hpp:685:60: required from ‘void boost::asio::async_read_until(AsyncReadStream&, boost::asio::basic_streambuf<Allocator>&, const string&, ReadHandler&&) [with AsyncReadStream = boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp>&>; Allocator = std::allocator<char>; ReadHandler = boost::_bi::bind_t<void, boost::_mfi::mf2<void, web::http::client::details::linux_client, const boost::system::error_code&, std::shared_ptr<web::http::client::details::linux_client_request_context> >, boost::_bi::list3<boost::_bi::value<std::shared_ptr<web::http::client::details::linux_client> >, boost::arg<1> (*)(), boost::_bi::value<std::shared_ptr<web::http::client::details::linux_client_request_context> > > >; std::string = std::basic_string<char>]’
/work/casablanca/Release/src/http/client/http_linux.cpp:806:138: required from here
/usr/include/boost/bind/mem_fn_template.hpp:271:43: error: no matching function for call to ‘get_pointer(std::shared_ptr<web::http::client::details::linux_client>&)’
     BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2);
Coordinator
Sep 15, 2014 at 7:51 PM
Hi jmcaricand,

In the recent versions of Casablanca, we've upgraded our minimum requirements to Ubuntu 14.04 and Boost 1.54. Could you please try using those to build Casablanca and see if you get the same errors?

Sincerely,
roschuma
Sep 16, 2014 at 4:17 AM
Hello,

Yes, I can build casablanca with Ubuntu 14.04. I downloaded boost 1.56 and I tried to build on Ubuntu 12.04. Is there a problem with your cmake configuration ? I cannot change boost directories. compiler always try to get boost headers in /usr/include.

But, perhaps I make a mistake. How can I tell to cmake to use /work/C++/boost_1_56_0 as root ?

Thanks,

Jean-Michel
Coordinator
Sep 16, 2014 at 5:50 PM
You could try setting BOOST_ROOT to that directory as a cmake option.

http://stackoverflow.com/questions/3016448/how-can-i-get-cmake-to-find-my-boost-installation

However, I'd like to mention that we no longer officially support 12.04, so it would be much better to simply upgrade to 14.04 which works without any modification.

roschuma
Mar 18, 2015 at 11:15 PM
I just cloned master on ubuntu 14 (on AWS) and I am having the same error as OP.

I following this guide: https://casablanca.codeplex.com/wikipage?title=Setup%20and%20Build%20on%20Linux

NB: git clone was giving me RPC error 54. I had to download the zip from codeplex then download from an accessible server I own.

Can someone try?
Mar 24, 2015 at 5:31 PM
It looks like it was my mistake. Make sure to use an instance with enough memory. 1GB was too little, I received out of memory error. I am trying 2GB instance now.