Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/thread/context.hpp: fix to build with boost 1.62 #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

piem
Copy link

@piem piem commented Nov 12, 2017

This change was all it took to build fc against libboost-all-dev 1.62.0.1 (debian stable).

See also bitshares#5

@piem
Copy link
Author

piem commented Nov 12, 2017

212a749 in include/fc/rpc/state.hpp avoids this error when building with g++ 6:

[ 10%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/rpc/state.cpp.o
cd «builddir»/libraries/fc && /usr/lib/ccache/g++   -DHAS_BZIP2 -DHAS_ZLIB -I«builddir»/libraries/fc/include -I«builddir»/libraries/fc/vendor/diff-match-patch-cpp-stl -I«builddir»/libraries/fc/vendor/websocketpp -I«builddir»/libraries/fc -I«builddir»/libraries/fc/vendor/boost_1.51/include -I«builddir»/libraries/fc/vendor/cyoencode-1.0.2/src -I«builddir»/libraries/fc/vendor/secp256k1-zkp -I«builddir»/libraries/fc/vendor/equihash -I«builddir»/libraries/fc/vendor/equihash/include -isystem «builddir»/libraries/fc/vendor/secp256k1-zkp/include  -DIS_LOW_MEM -DCHAINBASE_CHECK_LOCKING -DCLEAR_VOTES -std=c++11 -Wall -fno-builtin-memcmp  -Wall -fnon-call-exceptions -DWEBSOCKETPP_STRICT_MASKING -DBOOST_ASIO_HAS_STD_CHRONO -DLOG_LONG_API -DLOG_LONG_API_MAX_MS=1000 -DLOG_LONG_API_WARN_MS=750 -O3 -DNDEBUG   -Wall -fnon-call-exceptions -o CMakeFiles/fc.dir/src/rpc/state.cpp.o -c «builddir»/libraries/fc/src/rpc/state.cpp
«builddir»/libraries/fc/src/rpc/state.cpp: In member function ‘fc::rpc::request fc::rpc::state::start_remote_call(const string&, fc::variants)’:
«builddir»/libraries/fc/src/rpc/state.cpp:47:69: error: no matching function for call to ‘fc::rpc::request::request(<brace-enclosed initializer list>)’
    request request{ "2.0", _next_id++, method_name, std::move(args) };
                                                                     ^
In file included from «builddir»/libraries/fc/src/rpc/state.cpp:1:0:
«builddir»/libraries/fc/include/fc/rpc/state.hpp:7:11: note: candidate: fc::rpc::request::request()
    struct request
           ^~~~~~~
«builddir»/libraries/fc/include/fc/rpc/state.hpp:7:11: note:   candidate expects 0 arguments, 4 provided
«builddir»/libraries/fc/include/fc/rpc/state.hpp:7:11: note: candidate: fc::rpc::request::request(const fc::rpc::request&)
«builddir»/libraries/fc/include/fc/rpc/state.hpp:7:11: note:   candidate expects 1 argument, 4 provided
«builddir»/libraries/fc/include/fc/rpc/state.hpp:7:11: note: candidate: fc::rpc::request::request(fc::rpc::request&&)
«builddir»/libraries/fc/include/fc/rpc/state.hpp:7:11: note:   candidate expects 1 argument, 4 provided
libraries/fc/CMakeFiles/fc.dir/build.make:926: recipe for target 'libraries/fc/CMakeFiles/fc.dir/src/rpc/state.cpp.o' failed
make[2]: *** [libraries/fc/CMakeFiles/fc.dir/src/rpc/state.cpp.o] Error 1
make[2]: Leaving directory '«builddir»'
CMakeFiles/Makefile2:199: recipe for target 'libraries/fc/CMakeFiles/fc.dir/all' failed
make[1]: *** [libraries/fc/CMakeFiles/fc.dir/all] Error 2
make[1]: Leaving directory '«builddir»'
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

@abitmore
Copy link

I'd rather change request request{ "2.0", _next_id++, method_name, std::move(args) }; to use a simple multi-field constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants