OpenTransactions/Protobuf 模棱两可的错误
OpenTransactions/Protobuf ambiguous error
我正在尝试编译 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
我先 运行 进入 并解决了它(我认为)。有人对此有任何见解吗?
这个问题可能与编译器有关,但我的 (gcc 4.9) 确实卡在了这一点,因为它不知道要调用哪个构造函数,所以应该做的是将 int64 转换为参数两行(OTData 开始和 OTData 在 src/client/OpenTransactions.cpp 中的第 4514 和 4515 行结束)
感谢 Chris Odom 在 push.
中的帮助,此问题今天已得到修复
我正在尝试编译 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
我先 运行 进入
这个问题可能与编译器有关,但我的 (gcc 4.9) 确实卡在了这一点,因为它不知道要调用哪个构造函数,所以应该做的是将 int64 转换为参数两行(OTData 开始和 OTData 在 src/client/OpenTransactions.cpp 中的第 4514 和 4515 行结束) 感谢 Chris Odom 在 push.
中的帮助,此问题今天已得到修复