OpenTransactions / Protobuf模糊错误

时间:2015-12-27 18:15:45

标签: transactions protocol-buffers blockchain

我正在尝试编译OpenTransactions但我必须首先安装一些其他项目,编译器在某个时刻停止并向我显示这个错误日志:

[ 91%] Building CXX object src/client/CMakeFiles/opentxs-client.dir

/OpenTransactions.cpp.o
cd  /home/otx/opentxs/build/src/client && /usr/bin/c++    -DCHAISCRIPT_NO_THREADS -DEXPORT="" -DOT_CASH_USING_LUCRE  -DOT_CRYPTO_SUPPORTED_KEY_RSA -DOT_CRYPTO_SUPPORTED_KEY_SECP256K1  -DOT_CRYPTO_USING_LIBSECP256K1 -DOT_CRYPTO_USING_OPENSSL  -DOT_CRYPTO_USING_TREZOR -DOT_CRYPTO_WITH_BIP32 -DOT_CRYPTO_WITH_BIP39  -DOT_PREFIX_PATH=\"/usr/local\" -DPROTOBUF_INLINE_NOT_IN_HEADERS=NULL  -Dopentxs_client_EXPORTS -std=c++11 -pthread -fPIC -Wall -Werror -Wextra  -pedantic -Wno-missing-braces -Wcast-align -Wctor-dtor-privacy  -Wdisabled-optimization -Winit-self -Wmissing-include-dirs  -Wswitch-default -Wold-style-cast -Wredundant-decls -Woverloaded-virtual  -Wmissing-declarations -Wunused-macros -Wundef -Wformat=2  -Wno-format-nonliteral -Wnoexcept -Wstrict-null-sentinel -Wlogical-op  -Wuseless-cast -O3 -DNDEBUG -fPIC -I/home/otx/opentxs/build/deps/include  -isystem /home/otx/opentxs/src/../deps -isystem  /home/otx/opentxs/src/../deps/ChaiScript/include -isystem  /home/otx/opentxs/src/../deps/lucre/include  -I/home/otx/opentxs/build/src/../include  -I/home/otx/opentxs/src/../include -isystem  /home/otx/opentxs/deps/czmq/include    -o  CMakeFiles/opentxs-client.dir/OpenTransactions.cpp.o -c  /home/otx/opentxs/src/client/OpenTransactions.cpp
/home/otx/opentxs/src/client/OpenTransactions.cpp:  In member function ‘opentxs::OT_API::ClaimSet  opentxs::OT_API::GetClaims(const opentxs::Nym&) const’:
/home/otx/opentxs/src/client/OpenTransactions.cpp:4514:38:  error: call of overloaded ‘OTData(google::protobuf::int64)’ is  ambiguous
             OTData start(item.start());
                                      ^
/home/otx/opentxs/src/client/OpenTransactions.cpp:4514:38: note: candidates are:
In file included from /home/otx/opentxs/src/../include/opentxs/core/Identifier.hpp:43:0,
                 from /home/otx/opentxs/src/../include/opentxs/core/Contract.hpp:45,
                 from /home/otx/opentxs/src/../include/opentxs/core/crypto/Credential.hpp:45,
                 from /home/otx/opentxs/src/../include/opentxs/core/crypto/NymParameters.hpp:46,
                 from /home/otx/opentxs/src/../include/opentxs/client/OpenTransactions.hpp:44,
                 from /home/otx/opentxs/src/client/OpenTransactions.cpp:43:
/home/otx/opentxs/src/../include/opentxs/core/OTData.hpp:60:12: note: opentxs::OTData::OTData(opentxs::OTData&&)
     EXPORT OTData(OTData&& other);
            ^
/home/otx/opentxs/src/../include/opentxs/core/OTData.hpp:57:12: note: opentxs::OTData::OTData(const opentxs::OTData&)
     EXPORT OTData(const OTData& source);
            ^
/home/otx/opentxs/src/../include/opentxs/core/OTData.hpp:55:21: note: opentxs::OTData::OTData(int64_t)
     EXPORT explicit OTData(const int64_t num);
                     ^
/home/otx/opentxs/src/../include/opentxs/core/OTData.hpp:54:21: note: opentxs::OTData::OTData(uint32_t)
     EXPORT explicit OTData(const uint32_t num);
                     ^
/home/otx/opentxs/src/client/OpenTransactions.cpp:4515:34:  error: call of overloaded ‘OTData(google::protobuf::int64)’ is  ambiguous
             OTData end(item.end());
                                  ^
/home/otx/opentxs/src/client/OpenTransactions.cpp:4515:34: note: candidates are:
In file included from /home/otx/opentxs/src/../include/opentxs/core/Identifier.hpp:43:0,
                 from /home/otx/opentxs/src/../include/opentxs/core/Contract.hpp:45,
                 from /home/otx/opentxs/src/../include/opentxs/core/crypto/Credential.hpp:45,
                 from /home/otx/opentxs/src/../include/opentxs/core/crypto/NymParameters.hpp:46,
                 from /home/otx/opentxs/src/../include/opentxs/client/OpenTransactions.hpp:44,
                 from /home/otx/opentxs/src/client/OpenTransactions.cpp:43:
/home/otx/opentxs/src/../include/opentxs/core/OTData.hpp:60:12: note: opentxs::OTData::OTData(opentxs::OTData&&)
     EXPORT OTData(OTData&& other);
            ^
/home/otx/opentxs/src/../include/opentxs/core/OTData.hpp:57:12: note: opentxs::OTData::OTData(const opentxs::OTData&)
     EXPORT OTData(const OTData& source);
            ^
/home/otx/opentxs/src/../include/opentxs/core/OTData.hpp:55:21: note: opentxs::OTData::OTData(int64_t)
     EXPORT explicit OTData(const int64_t num);
                     ^
/home/otx/opentxs/src/../include/opentxs/core/OTData.hpp:54:21: note: opentxs::OTData::OTData(uint32_t)
     EXPORT explicit OTData(const uint32_t num);
                     ^
src/client/CMakeFiles/opentxs-client.dir/build.make:2472:  recipe for target  'src/client/CMakeFiles/opentxs-client.dir/OpenTransactions.cpp.o' failed
make[2]: *** [src/client/CMakeFiles/opentxs-client.dir/OpenTransactions.cpp.o] Error 1
make[2]: Leaving directory '/home/otx/opentxs/build'
CMakeFiles/Makefile2:1044: recipe for target 'src/client/CMakeFiles/opentxs-client.dir/all' failed
make[1]: *** [src/client/CMakeFiles/opentxs-client.dir/all] Error 2
make[1]: Leaving directory '/home/otx/opentxs/build'
Makefile:150: recipe for target 'all' failed
make: *** [all] Error 2

我先遇到this issue然后解决了(我认为)。任何人对此都有任何见解吗?

1 个答案:

答案 0 :(得分:1)

这个问题可能与编译器有关,但我的(gcc 4.9)确实遇到了问题,因为它不知道要调用哪个构造函数,所以应该做的是将int64转换为两个参数行(OTData start和OTData在第4514行结束,在src / client / OpenTransactions.cpp中为4515) 今天感谢克里斯·奥多姆在push中已经解决了这个问题。