Unable to compile cpp-netlib on Ubuntu 12.04 #154

Closed
tysonite opened this Issue Oct 7, 2012 · 8 comments

Comments

Projects
None yet
6 participants

tysonite commented Oct 7, 2012

Boost version: 1.48
GCC version: 4.6.3
cpp-netlib version: latest from repository

CMake step succeeded:

~/cpp-netlib$ cmake -DCMAKE_BUILD_TYPE=Debug .
-- 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
-- Found ICU header files in /usr/include
-- Found ICU libraries: /usr/lib/libicuuc.so
-- Boost version: 1.48.0
-- Found the following Boost libraries:
--   unit_test_framework
--   system
--   regex
--   date_time
--   thread
--   chrono
--   filesystem
--   program_options
-- 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")
-- 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 
-- Performing Test HAVE_STD0X
-- Performing Test HAVE_STD0X - Success
-- Performing Test HAVE_STD11
-- Performing Test HAVE_STD11 - Failed
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mak/cpp-netlib

Compilation fails:

[ 31%] Building CXX object libs/network/src/CMakeFiles/cppnetlib-http-message.dir/http/response.cpp.o
cd /home/mak/cpp-netlib/libs/network/src && /usr/bin/c++   -DNETWORK_DEBUG -DNETWORK_ENABLE_HTTPS -std=c++0x -g -I/home/mak/cpp-netlib/include -I/home/mak/cpp-netlib    -Wall -std=c++0x -o CMakeFiles/cppnetlib-http-message.dir/http/response.cpp.o -c /home/mak/cpp-netlib/libs/network/src/http/response.cpp
In file included from /home/mak/cpp-netlib/libs/network/src/http/response.cpp:12:0:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp: In member function ‘void network::http::response_pimpl::set_destination(const string&)’:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:26:49: error: no matching function for call to ‘move(boost::unique_future >&)’
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:26:49: note: candidates are:
/usr/include/boost/thread/detail/move.hpp:44:110: note: template typename boost::enable_if >, boost::detail::thread_move_t >::type boost::move(T&)
/usr/include/boost/thread/detail/move.hpp:51:30: note: template boost::detail::thread_move_t boost::move(boost::detail::thread_move_t)
/usr/include/boost/thread/locks.hpp:490:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&&)
/usr/include/boost/thread/locks.hpp:496:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&)
/usr/include/boost/thread/locks.hpp:509:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&&)
/usr/include/boost/thread/locks.hpp:515:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&)
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp: In member function ‘void network::http::response_pimpl::set_source(const string&)’:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:41:44: error: no matching function for call to ‘move(boost::unique_future >&)’
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:41:44: note: candidates are:
/usr/include/boost/thread/detail/move.hpp:44:110: note: template typename boost::enable_if >, boost::detail::thread_move_t >::type boost::move(T&)
/usr/include/boost/thread/detail/move.hpp:51:30: note: template boost::detail::thread_move_t boost::move(boost::detail::thread_move_t)
/usr/include/boost/thread/locks.hpp:490:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&&)
/usr/include/boost/thread/locks.hpp:496:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&)
/usr/include/boost/thread/locks.hpp:509:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&&)
/usr/include/boost/thread/locks.hpp:515:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&)
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp: In member function ‘void network::http::response_pimpl::remove_headers()’:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:69:40: error: no matching function for call to ‘move(boost::unique_future, std::basic_string > >&)’
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:69:40: note: candidates are:
/usr/include/boost/thread/detail/move.hpp:44:110: note: template typename boost::enable_if >, boost::detail::thread_move_t >::type boost::move(T&)
/usr/include/boost/thread/detail/move.hpp:51:30: note: template boost::detail::thread_move_t boost::move(boost::detail::thread_move_t)
/usr/include/boost/thread/locks.hpp:490:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&&)
/usr/include/boost/thread/locks.hpp:496:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&)
/usr/include/boost/thread/locks.hpp:509:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&&)
/usr/include/boost/thread/locks.hpp:515:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&)
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp: In member function ‘void network::http::response_pimpl::set_body(const string&)’:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:105:42: error: no matching function for call to ‘move(boost::unique_future >&)’
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:105:42: note: candidates are:
/usr/include/boost/thread/detail/move.hpp:44:110: note: template typename boost::enable_if >, boost::detail::thread_move_t >::type boost::move(T&)
/usr/include/boost/thread/detail/move.hpp:51:30: note: template boost::detail::thread_move_t boost::move(boost::detail::thread_move_t)
/usr/include/boost/thread/locks.hpp:490:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&&)
/usr/include/boost/thread/locks.hpp:496:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&)
/usr/include/boost/thread/locks.hpp:509:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&&)
/usr/include/boost/thread/locks.hpp:515:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&)
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp: In member function ‘void network::http::response_pimpl::set_status(uint16_t)’:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:126:44: error: no matching function for call to ‘move(boost::unique_future&)’
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:126:44: note: candidates are:
/usr/include/boost/thread/detail/move.hpp:44:110: note: template typename boost::enable_if >, boost::detail::thread_move_t >::type boost::move(T&)
/usr/include/boost/thread/detail/move.hpp:51:30: note: template boost::detail::thread_move_t boost::move(boost::detail::thread_move_t)
/usr/include/boost/thread/locks.hpp:490:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&&)
/usr/include/boost/thread/locks.hpp:496:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&)
/usr/include/boost/thread/locks.hpp:509:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&&)
/usr/include/boost/thread/locks.hpp:515:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&)
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp: In member function ‘void network::http::response_pimpl::set_status_message(const string&)’:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:141:52: error: no matching function for call to ‘move(boost::unique_future >&)’
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:141:52: note: candidates are:
/usr/include/boost/thread/detail/move.hpp:44:110: note: template typename boost::enable_if >, boost::detail::thread_move_t >::type boost::move(T&)
/usr/include/boost/thread/detail/move.hpp:51:30: note: template boost::detail::thread_move_t boost::move(boost::detail::thread_move_t)
/usr/include/boost/thread/locks.hpp:490:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&&)
/usr/include/boost/thread/locks.hpp:496:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&)
/usr/include/boost/thread/locks.hpp:509:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&&)
/usr/include/boost/thread/locks.hpp:515:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&)
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp: In member function ‘void network::http::response_pimpl::set_version(const string&)’:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:156:45: error: no matching function for call to ‘move(boost::unique_future >&)’
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:156:45: note: candidates are:
/usr/include/boost/thread/detail/move.hpp:44:110: note: template typename boost::enable_if >, boost::detail::thread_move_t >::type boost::move(T&)
/usr/include/boost/thread/detail/move.hpp:51:30: note: template boost::detail::thread_move_t boost::move(boost::detail::thread_move_t)
/usr/include/boost/thread/locks.hpp:490:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&&)
/usr/include/boost/thread/locks.hpp:496:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&)
/usr/include/boost/thread/locks.hpp:509:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&&)
/usr/include/boost/thread/locks.hpp:515:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&)
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp: In member function ‘void network::http::response_pimpl::set_source_promise(boost::promise >&)’:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:169:44: error: no matching function for call to ‘move(boost::unique_future >&)’
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:169:44: note: candidates are:
/usr/include/boost/thread/detail/move.hpp:44:110: note: template typename boost::enable_if >, boost::detail::thread_move_t >::type boost::move(T&)
/usr/include/boost/thread/detail/move.hpp:51:30: note: template boost::detail::thread_move_t boost::move(boost::detail::thread_move_t)
/usr/include/boost/thread/locks.hpp:490:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&&)
/usr/include/boost/thread/locks.hpp:496:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&)
/usr/include/boost/thread/locks.hpp:509:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&&)
/usr/include/boost/thread/locks.hpp:515:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&)
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp: In member function ‘void network::http::response_pimpl::set_destination_promise(boost::promise >&)’:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:174:49: error: no matching function for call to ‘move(boost::unique_future >&)’
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:174:49: note: candidates are:
/usr/include/boost/thread/detail/move.hpp:44:110: note: template typename boost::enable_if >, boost::detail::thread_move_t >::type boost::move(T&)
/usr/include/boost/thread/detail/move.hpp:51:30: note: template boost::detail::thread_move_t boost::move(boost::detail::thread_move_t)
/usr/include/boost/thread/locks.hpp:490:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&&)
/usr/include/boost/thread/locks.hpp:496:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&)
/usr/include/boost/thread/locks.hpp:509:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&&)
/usr/include/boost/thread/locks.hpp:515:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&)
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp: In member function ‘void network::http::response_pimpl::set_headers_promise(boost::promise, std::basic_string > >&)’:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:179:45: error: no matching function for call to ‘move(boost::unique_future, std::basic_string > >&)’
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:179:45: note: candidates are:
/usr/include/boost/thread/detail/move.hpp:44:110: note: template typename boost::enable_if >, boost::detail::thread_move_t >::type boost::move(T&)
/usr/include/boost/thread/detail/move.hpp:51:30: note: template boost::detail::thread_move_t boost::move(boost::detail::thread_move_t)
/usr/include/boost/thread/locks.hpp:490:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&&)
/usr/include/boost/thread/locks.hpp:496:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&)
/usr/include/boost/thread/locks.hpp:509:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&&)
/usr/include/boost/thread/locks.hpp:515:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&)
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp: In member function ‘void network::http::response_pimpl::set_status_promise(boost::promise&)’:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:184:44: error: no matching function for call to ‘move(boost::unique_future&)’
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:184:44: note: candidates are:
/usr/include/boost/thread/detail/move.hpp:44:110: note: template typename boost::enable_if >, boost::detail::thread_move_t >::type boost::move(T&)
/usr/include/boost/thread/detail/move.hpp:51:30: note: template boost::detail::thread_move_t boost::move(boost::detail::thread_move_t)
/usr/include/boost/thread/locks.hpp:490:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&&)
/usr/include/boost/thread/locks.hpp:496:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&)
/usr/include/boost/thread/locks.hpp:509:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&&)
/usr/include/boost/thread/locks.hpp:515:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&)
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp: In member function ‘void network::http::response_pimpl::set_status_message_promise(boost::promise >&)’:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:189:52: error: no matching function for call to ‘move(boost::unique_future >&)’
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:189:52: note: candidates are:
/usr/include/boost/thread/detail/move.hpp:44:110: note: template typename boost::enable_if >, boost::detail::thread_move_t >::type boost::move(T&)
/usr/include/boost/thread/detail/move.hpp:51:30: note: template boost::detail::thread_move_t boost::move(boost::detail::thread_move_t)
/usr/include/boost/thread/locks.hpp:490:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&&)
/usr/include/boost/thread/locks.hpp:496:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&)
/usr/include/boost/thread/locks.hpp:509:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&&)
/usr/include/boost/thread/locks.hpp:515:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&)
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp: In member function ‘void network::http::response_pimpl::set_version_promise(boost::promise >&)’:
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:194:45: error: no matching function for call to ‘move(boost::unique_future >&)’
/home/mak/cpp-netlib/include/network/protocol/http/response/response.ipp:194:45: note: candidates are:
/usr/include/boost/thread/detail/move.hpp:44:110: note: template typename boost::enable_if >, boost::detail::thread_move_t >::type boost::move(T&)
/usr/include/boost/thread/detail/move.hpp:51:30: note: template boost::detail::thread_move_t boost::move(boost::detail::thread_move_t)
/usr/include/boost/thread/locks.hpp:490:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&&)
/usr/include/boost/thread/locks.hpp:496:34: note: template boost::upgrade_lock&& boost::move(boost::upgrade_lock&)
/usr/include/boost/thread/locks.hpp:509:33: note: template boost::unique_lock&& boost::move(boost::unique_lock&&)
/usr/include/boost/thread/locks.hpp:515:33: note: template boost::unique_lock

tysonite commented Oct 7, 2012

If replace boost::move with std::move, it compiles fine.

Owner

deanberris commented Oct 8, 2012

Can you send a pull request to fix this? Thanks.

tysonite commented Oct 9, 2012

Hello

Yes, I can. But what do you expect from compiler? I checked with GCC 4.4.X and it compiles fine the same source code without modifications.

Do you plan to support only modern GCC versions (or any other compiler versions)? I'm afraid, I can break compilation for other people with such kind of patch.

My expectation of compilers would be C++11 compliant compilers. I use Clang
3.2 on Mac OS X with libc++. There's no effort to support non-C++11
compilers moving forward.

Thanks

On Tue, Oct 9, 2012 at 1:18 PM, tysonite notifications@github.com wrote:

Hello

Yes, I can. But what do you expect from compiler? I checked with GCC 4.4.X
and it compiles fine the same source code without modifications.

Do you plan to support only modern GCC versions (or any other compiler
versions)? I'm afraid, I can break compilation for other people with such
kind of patch.


Reply to this email directly or view it on GitHubhttps://github.com/cpp-netlib/cpp-netlib/issues/154#issuecomment-9277382.

Dean Michael Berris
www.deanberris.com

In addition to tysonite's initial reply, you could simply run a sed to replace all the occurrences of boost::move with std::move (for your local clone):

find /path/to/cppnetlib-clone/ -type f -exec sed -i 's/boost::move/std::move/g' {} \;

Things also don't compile with g++ 4.7.2 as provided by Ubuntu 12.10. Massive issues with boost::bind() (but also std::bind()) at this places:

http/src/network/protocol/http/client/connection/async_normal.ipp:83:63
http/src/network/protocol/http/client/connection/async_normal.ipp:157:53
http/src/network/protocol/http/client/connection/async_normal.ipp:183:78
http/src/network/protocol/http/client/connection/async_normal.ipp:229:73

Well, and before talking about clang: Version 3.0 (the version available on Ubuntu 12.10) just segfaults at cpp-netlib/uri/src/uri.cpp.

Owner

glynos commented Jan 16, 2013

hasselmm, what version of cpp-netlib are you using? The problems you describe are fixed on the master branch as I have been developing myself with GCC 4.7.2 on Ubuntu.

Actually, I will close this issue, because the initial report described using GCC 4.6.3 and the minimum compiler supported on the master branch is 4.7.2. clang 3.0 will not be supported either.

glynos closed this Jan 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment