riak、cpp库和构建错误
riak, cpp library and build errors
我是riak和用scons构建库的新手。我从下载cpp库https://github.com/ajtack/riak-cpp.git.我在ubuntu 64上。这是我的gcc版本:
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
从命令提示符输入:
> scons .
所以。。。我是不是把烤饼做错了?或者是代码问题。
以下是我得到的错误;
scons: Building targets ...
(compile) build/riak/client.cxx
In file included from ./riak/client.hxx:2:0,
from build/riak/client.cxx:1:
./riak/message.hxx:29:28: error: ‘error_code’ is not a member of ‘std’
./riak/message.hxx:29:76: error: functional cast expression list treated as compound expression
./riak/message.hxx:29:77: error: template argument 1 is invalid
./riak/message.hxx:29:86: error: invalid type in declaration before ‘;’ token
build/riak/client.cxx: In member function ‘void riak::client::delete_object(const riak::key&, const riak::key&, riak::delete_response_handler)’:
build/riak/client.cxx:95:105: error: cannot convert ‘std::_Bind<bool (*(std::function<void(const std::error_code&, const std::basic_string<char>&, const std::basic_string<char>&)>, std::basic_string<char>, std::basic_string<char>, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::function<void(const std::error_code&, const std::basic_string<char>&, const std::basic_string<char>&)>, const std::basic_string<char>&, const std::basic_string<char>&, const std::error_code&, long unsigned int, const std::basic_string<char>&)>’ to ‘riak::message::handler’ in initialization
build/riak/client.cxx: In member function ‘void riak::client::get_object(const riak::key&, const riak::key&, riak::get_response_handler)’:
build/riak/client.cxx:171:70: error: cannot convert ‘std::_Bind<bool (*(std::basic_string<char>, std::basic_string<char>, std::function<std::shared_ptr<RpbContent>(const google::protobuf::RepeatedPtrField<RpbContent>&)>, riak::<unnamed>::delivery_arguments, std::function<void(const std::error_code&, std::shared_ptr<RpbContent>&, std::function<void(const std::shared_ptr<RpbContent>&, std::function<void(const std::error_code&)>&)>&)>, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(const std::basic_string<char>&, const std::basic_string<char>&, std::function<std::shared_ptr<RpbContent>(const google::protobuf::RepeatedPtrField<RpbContent>&)>&, riak::<unnamed>::delivery_arguments&, std::function<void(const std::error_code&, std::shared_ptr<RpbContent>&, std::function<void(const std::shared_ptr<RpbContent>&, std::function<void(const std::error_code&)>&)>&)>, const std::error_code&, long unsigned int, const std::basic_string<char>&)>’ to ‘riak::message::handler’ in initialization
build/riak/client.cxx: In function ‘riak::message::handler riak::<unnamed>::make_resolution_response_handler(std::shared_ptr<RpbContent>&, riak::<unnamed>::resolution_response_handler_for_object)’:
build/riak/client.cxx:246:63: error: cannot convert ‘std::_Bind<std::function<bool(std::shared_ptr<RpbContent>&, const std::error_code&, long unsigned int, const std::basic_string<char>&)>(std::shared_ptr<RpbContent>, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>)>’ to ‘riak::message::handler’ in return
build/riak/client.cxx: In function ‘void riak::<unnamed>::put_cold(const riak::key&, const riak::key&, const std::shared_ptr<RpbContent>&, riak::<unnamed>::delivery_arguments&, riak::put_response_handler&)’:
build/riak/client.cxx:350:107: error: cannot convert ‘std::_Bind<bool (*(std::function<void(const std::error_code&)>, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::function<void(const std::error_code&)>, const std::error_code&, long unsigned int, const std::basic_string<char>&)>’ to ‘riak::message::handler’ for argument ‘3’ to ‘void riak::<unnamed>::send_put_request(RpbPutReq&, riak::<unnamed>::delivery_arguments&, riak::message::handler)’
scons: *** [build/riak/client.o] Error 1
scons: building terminated because of errors.
尝试升级到gcc 4.6.1,对我来说效果很好:
ivan@ubuntu:/tmp/riak-cpp$ scons .
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
(link) build/test/units/unit_tests
build/test/units/unit_tests
[==========] Running 22 tests from 4 test cases.
[----------] Global test environment set-up.
[----------] 5 tests from deleting_client
[ RUN ] deleting_client.client_survives_nonsense_reply_to_unmap
[ OK ] deleting_client.client_survives_nonsense_reply_to_unmap (1 ms)
[ RUN ] deleting_client.client_survives_wrong_code_reply_to_unmap
[ OK ] deleting_client.client_survives_wrong_code_reply_to_unmap (0 ms)
[ RUN ] deleting_client.client_survives_trailing_data_with_RpbDelResp
[ OK ] deleting_client.client_survives_trailing_data_with_RpbDelResp (0 ms)
[ RUN ] deleting_client.client_accepts_well_formed_RbpDelResp
[ OK ] deleting_client.client_accepts_well_formed_RbpDelResp (0 ms)
[ RUN ] deleting_client.client_accepts_well_formed_unmap_response_in_parts
[ OK ] deleting_client.client_accepts_well_formed_unmap_response_in_parts (0 ms)
[----------] 5 tests from deleting_client (1 ms total)
[----------] 6 tests from getting_client
[ RUN ] getting_client.client_survives_long_nonsense_reply_to_get
[ OK ] getting_client.client_survives_long_nonsense_reply_to_get (0 ms)
[ RUN ] getting_client.client_survives_wrong_code_reply_to_get
[ OK ] getting_client.client_survives_wrong_code_reply_to_get (0 ms)
[ RUN ] getting_client.client_survives_extra_data_in_empty_get_response
[ OK ] getting_client.client_survives_extra_data_in_empty_get_response (0 ms)
[ RUN ] getting_client.client_accepts_nonempty_get_response
[ OK ] getting_client.client_accepts_nonempty_get_response (1 ms)
[ RUN ] getting_client.client_accepts_empty_RbpGetResp
[ OK ] getting_client.client_accepts_empty_RbpGetResp (0 ms)
[ RUN ] getting_client.client_accepts_well_formed_response_in_parts
[ OK ] getting_client.client_accepts_well_formed_response_in_parts (0 ms)
[----------] 6 tests from getting_client (1 ms total)
[----------] 5 tests from get_and_put_client
[ RUN ] get_and_put_client.put_for_cold_object_with_well_formed_response_is_successful
[ OK ] get_and_put_client.put_for_cold_object_with_well_formed_response_is_successful (0 ms)
[ RUN ] get_and_put_client.client_survives_long_nonsense_reply_to_cold_put
[ OK ] get_and_put_client.client_survives_long_nonsense_reply_to_cold_put (0 ms)
[ RUN ] get_and_put_client.client_survives_extra_data_in_cold_put_response
[ OK ] get_and_put_client.client_survives_extra_data_in_cold_put_response (0 ms)
[ RUN ] get_and_put_client.client_accepts_well_formed_put_response_in_parts
[ OK ] get_and_put_client.client_accepts_well_formed_put_response_in_parts (1 ms)
[ RUN ] get_and_put_client.client_correctly_delivers_put_reply_with_vector_clock
[ OK ] get_and_put_client.client_correctly_delivers_put_reply_with_vector_clock (0 ms)
[----------] 5 tests from get_and_put_client (1 ms total)
[----------] 6 tests from get_with_siblings
[ RUN ] get_with_siblings.getting_siblinged_value_triggers_resolution
[ OK ] get_with_siblings.getting_siblinged_value_triggers_resolution (0 ms)
[ RUN ] get_with_siblings.resolved_sibling_is_returned_to_server
[ OK ] get_with_siblings.resolved_sibling_is_returned_to_server (0 ms)
[ RUN ] get_with_siblings.resolved_sibling_produces_get_result
[ OK ] get_with_siblings.resolved_sibling_produces_get_result (0 ms)
[ RUN ] get_with_siblings.resolving_sibling_handles_erroneous_server_reply
[ OK ] get_with_siblings.resolving_sibling_handles_erroneous_server_reply (0 ms)
[ RUN ] get_with_siblings.resolving_sibling_handles_server_failure
[ OK ] get_with_siblings.resolving_sibling_handles_server_failure (1 ms)
[ RUN ] get_with_siblings.multiple_sibling_resolutions_are_correctly_handled
[ OK ] get_with_siblings.multiple_sibling_resolutions_are_correctly_handled (0 ms)
[----------] 6 tests from get_with_siblings (1 ms total)
[----------] Global test environment tear-down
[==========] 22 tests from 4 test cases ran. (4 ms total)
[ PASSED ] 22 tests.
scons: done building targets.
ivan@ubuntu:/tmp/riak-cpp$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
相关文章:
- Agora.io 虚幻引擎插件构建错误
- 尝试将 boost::stacktrace 添加到 CMake 项目时出现构建错误
- Arch Linux.AUR 包 mysql 不能用 makepkg 构建.错误:构建 () 中出现故障
- 组件上的虚幻引擎可蓝图UFUNCTION会导致构建错误
- 尝试构建 xerces c++ 解析器。Netbeans 和命令行构建错误未定义对"xercesc_3_2..."的引用
- pair的两个构造函数几乎相同,为什么不生成构建错误?
- 发生 Qt5.11 应用插件构建错误:信号和插槽参数不兼容
- Visual Studio 2017 中的 Tesseract 3.05 构建错误
- Eclipse 构建错误在默认的 hello world 上
- C++ CMake 构建错误:未定义对"boost::throw_exception(std::exception const&)"的引用
- 在 solaris 上增加 1.64 构建错误
- xgboost 构建错误:参数包未扩展为"..":
- 使用GCC 4.8构建错误:数组用作初始化器
- 编译 Java TD 客户端时出现构建错误
- 如何修复安卓工作室中的NDK构建错误
- C++ Cassandra 构建错误
- 我在 MinGW 和 VS 代码"g++ not recognized as a cmdlet..."时遇到构建错误
- Microsoft Visual Studio 2008,版本9.0.30739.1 SP,DLL构建错误
- 使用PPConsul(C 的领事客户端)构建错误的C 项目
- WURFL nginx 构建错误