-
Notifications
You must be signed in to change notification settings - Fork 64
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
Cannot build the examples #69
Comments
Please run this command: |
Thanks liorko87. The command builds the examples successfully now. However, two examples seem to be problematic. The Yao protocol example returns only help information, while the Sigma protocol example returns Segmentation fault (core dumped). |
For the yao protocol please use this repository. For the sigma protocol I will check it, I will leave the issue open. |
No problem. Versions are as follows: Ubuntu 18.04.3 LTS |
Hello, What should I do? I am new in programming and would be grateful if you could help me with this. |
From the |
Thank you. I did and now I see the following (sorry for the long massage): ScapiTests is a Catch v1.2.1 host application. DlogGroup
|
Due to OpenSSL random generator, sometimes some of the tests are failed.
|
Thank you a thousand times, I successfully built the test and examples. Now as you said for Yao examples, I am following this repository: However, I am facing this error: zeinab@zeinab:~/libscapi/examples/Yao$ cmake . && make Can you help me again with your valuable comments? |
You need to clone the |
Thanks again, it works. |
@liorko87 after successfully compiling the main library, I get the following when trying to build the examples: ubuntu@ip-172-31-15-228:~/libscapi/examples$ cmake . && make
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/libscapi/examples
[ 11%] Building CXX object CMakeFiles/libscapi_example.dir/Commitment/CommitmentExample.cpp.o
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33:0,
from /usr/include/c++/7/bits/allocator.h:46,
from /usr/include/c++/7/string:41,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/boost/random/additive_combine.hpp:19,
from /usr/include/boost/random.hpp:36,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/../infra/Common.hpp:33,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/RandomValue.hpp:30,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/CommitmentScheme.hpp:29,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:30,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/usr/include/c++/7/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = CmtSimpleHashCommitter; _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtSimpleHashCommitter]’:
/usr/include/c++/7/bits/alloc_traits.h:475:4: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = CmtSimpleHashCommitter; _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtSimpleHashCommitter; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<CmtSimpleHashCommitter>]’
/usr/include/c++/7/bits/shared_ptr_base.h:526:39: required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtSimpleHashCommitter; _Alloc = std::allocator<CmtSimpleHashCommitter>; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:637:4: required from ‘std::__shared_count<_Lp>::__shared_count(std::_Sp_make_shared_tag, _Tp*, const _Alloc&, _Args&& ...) [with _Tp = CmtSimpleHashCommitter; _Alloc = std::allocator<CmtSimpleHashCommitter>; _Args = {std::shared_ptr<CommParty>&}; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:1295:35: required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<CmtSimpleHashCommitter>; _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtSimpleHashCommitter; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr.h:344:64: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<CmtSimpleHashCommitter>; _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtSimpleHashCommitter’
/usr/include/c++/7/bits/shared_ptr.h:690:14: required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = CmtSimpleHashCommitter; _Alloc = std::allocator<CmtSimpleHashCommitter>; _Args = {std::shared_ptr<CommParty>&}]’
/usr/include/c++/7/bits/shared_ptr.h:706:39: required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = CmtSimpleHashCommitter; _Args = {std::shared_ptr<CommParty>&}]’
/home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:63:52: required from here
/usr/include/c++/7/ext/new_allocator.h:136:4: error: invalid new-expression of abstract class type ‘CmtSimpleHashCommitter’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:34:0,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/home/ubuntu/libscapi/examples/Commitment/../../include//interactive_mid_protocols/CommitmentSchemeSimpleHash.hpp:162:7: note: because the following virtual functions are pure within ‘CmtSimpleHashCommitter’:
class CmtSimpleHashCommitter : public CmtCommitter, public SecureCommit, public CmtOnByteArray {
^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:30:0,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/CommitmentScheme.hpp:360:40: note: virtual std::shared_ptr<CmtCCommitmentMsg> CmtCommitter::generateCommitmentMsg(const std::shared_ptr<CmtCommitValue>&, biginteger, long int)
virtual shared_ptr<CmtCCommitmentMsg> generateCommitmentMsg(const shared_ptr<CmtCommitValue> & input, biginteger r, long id) = 0;
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33:0,
from /usr/include/c++/7/bits/allocator.h:46,
from /usr/include/c++/7/string:41,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/boost/random/additive_combine.hpp:19,
from /usr/include/boost/random.hpp:36,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/../infra/Common.hpp:33,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/RandomValue.hpp:30,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/CommitmentScheme.hpp:29,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:30,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/usr/include/c++/7/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = CmtElGamalOnGroupElementCommitter; _Args = {std::shared_ptr<CommParty>&, std::shared_ptr<OpenSSLDlogECF2m>&}; _Tp = CmtElGamalOnGroupElementCommitter]’:
/usr/include/c++/7/bits/alloc_traits.h:475:4: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = CmtElGamalOnGroupElementCommitter; _Args = {std::shared_ptr<CommParty>&, std::shared_ptr<OpenSSLDlogECF2m>&}; _Tp = CmtElGamalOnGroupElementCommitter; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<CmtElGamalOnGroupElementCommitter>]’
/usr/include/c++/7/bits/shared_ptr_base.h:526:39: required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {std::shared_ptr<CommParty>&, std::shared_ptr<OpenSSLDlogECF2m>&}; _Tp = CmtElGamalOnGroupElementCommitter; _Alloc = std::allocator<CmtElGamalOnGroupElementCommitter>; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:637:4: required from ‘std::__shared_count<_Lp>::__shared_count(std::_Sp_make_shared_tag, _Tp*, const _Alloc&, _Args&& ...) [with _Tp = CmtElGamalOnGroupElementCommitter; _Alloc = std::allocator<CmtElGamalOnGroupElementCommitter>; _Args = {std::shared_ptr<CommParty>&, std::shared_ptr<OpenSSLDlogECF2m>&}; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:1295:35: required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<CmtElGamalOnGroupElementCommitter>; _Args = {std::shared_ptr<CommParty>&, std::shared_ptr<OpenSSLDlogECF2m>&}; _Tp = CmtElGamalOnGroupElementCommitter; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr.h:344:64: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<CmtElGamalOnGroupElementCommitter>; _Args = {std::shared_ptr<CommParty>&, std::shared_ptr<OpenSSLDlogECF2m>&}; _Tp = CmtElGamalOnGroupElementCommitter]’
/usr/include/c++/7/bits/shared_ptr.h:690:14: required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = CmtElGamalOnGroupElementCommitter; _Alloc = std::allocator<CmtElGamalOnGroupElementCommitter>; _Args = {std::shared_ptr<CommParty>&, std::shared_ptr<OpenSSLDlogECF2m>&}]’
/usr/include/c++/7/bits/shared_ptr.h:706:39: required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = CmtElGamalOnGroupElementCommitter; _Args = {std::shared_ptr<CommParty>&, std::shared_ptr<OpenSSLDlogECF2m>&}]’
/home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:66:69: required from here
/usr/include/c++/7/ext/new_allocator.h:136:4: error: invalid new-expression of abstract class type ‘CmtElGamalOnGroupElementCommitter’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:35:0,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/home/ubuntu/libscapi/examples/Commitment/../../include//interactive_mid_protocols/CommitmentSchemeElGamal.hpp:246:7: note: because the following virtual functions are pure within ‘CmtElGamalOnGroupElementCommitter’:
class CmtElGamalOnGroupElementCommitter : public CmtElGamalCommitterCore, public PerfectlyBindingCmt, public CmtOnGroupElement {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:30:0,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/CommitmentScheme.hpp:360:40: note: virtual std::shared_ptr<CmtCCommitmentMsg> CmtCommitter::generateCommitmentMsg(const std::shared_ptr<CmtCommitValue>&, biginteger, long int)
virtual shared_ptr<CmtCCommitmentMsg> generateCommitmentMsg(const shared_ptr<CmtCommitValue> & input, biginteger r, long id) = 0;
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33:0,
from /usr/include/c++/7/bits/allocator.h:46,
from /usr/include/c++/7/string:41,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/boost/random/additive_combine.hpp:19,
from /usr/include/boost/random.hpp:36,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/../infra/Common.hpp:33,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/RandomValue.hpp:30,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/CommitmentScheme.hpp:29,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:30,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/usr/include/c++/7/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = CmtElGamalWithProofsCommitter; _Args = {std::shared_ptr<CommParty>&, int, std::shared_ptr<OpenSSLDlogECF2m>&}; _Tp = CmtElGamalWithProofsCommitter]’:
/usr/include/c++/7/bits/alloc_traits.h:475:4: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = CmtElGamalWithProofsCommitter; _Args = {std::shared_ptr<CommParty>&, int, std::shared_ptr<OpenSSLDlogECF2m>&}; _Tp = CmtElGamalWithProofsCommitter; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<CmtElGamalWithProofsCommitter>]’
/usr/include/c++/7/bits/shared_ptr_base.h:526:39: required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {std::shared_ptr<CommParty>&, int, std::shared_ptr<OpenSSLDlogECF2m>&}; _Tp = CmtElGamalWithProofsCommitter; _Alloc = std::allocator<CmtElGamalWithProofsCommitter>; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:637:4: required from ‘std::__shared_count<_Lp>::__shared_count(std::_Sp_make_shared_tag, _Tp*, const _Alloc&, _Args&& ...) [with _Tp = CmtElGamalWithProofsCommitter; _Alloc = std::allocator<CmtElGamalWithProofsCommitter>; _Args = {std::shared_ptr<CommParty>&, int, std::shared_ptr<OpenSSLDlogECF2m>&}; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:1295:35: required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<CmtElGamalWithProofsCommitter>; _Args = {std::shared_ptr<CommParty>&, int, std::shared_ptr<OpenSSLDlogECF2m>&}; _Tp = CmtElGamalWithProofsCommitter; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr.h:344:64: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<CmtElGamalWithProofsCommitter>; _Args = {std::shared_ptr<CommParty>&, int, std::shared_ptr<OpenSSLDlogECF2m>&}; _Tp = CmtElGamalWithProofsCommitter]’
/usr/include/c++/7/bits/shared_ptr.h:690:14: required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = CmtElGamalWithProofsCommitter; _Alloc = std::allocator<CmtElGamalWithProofsCommitter>; _Args = {std::shared_ptr<CommParty>&, int, std::shared_ptr<OpenSSLDlogECF2m>&}]’
/usr/include/c++/7/bits/shared_ptr.h:706:39: required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = CmtElGamalWithProofsCommitter; _Args = {std::shared_ptr<CommParty>&, int, std::shared_ptr<OpenSSLDlogECF2m>&}]’
/home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:69:69: required from here
/usr/include/c++/7/ext/new_allocator.h:136:4: error: invalid new-expression of abstract class type ‘CmtElGamalWithProofsCommitter’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:35:0,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/home/ubuntu/libscapi/examples/Commitment/../../include//interactive_mid_protocols/CommitmentSchemeElGamal.hpp:532:7: note: because the following virtual functions are pure within ‘CmtElGamalWithProofsCommitter’:
class CmtElGamalWithProofsCommitter : public CmtElGamalOnGroupElementCommitter, public CmtWithProofsCommitter {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:30:0,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/CommitmentScheme.hpp:360:40: note: virtual std::shared_ptr<CmtCCommitmentMsg> CmtCommitter::generateCommitmentMsg(const std::shared_ptr<CmtCommitValue>&, biginteger, long int)
virtual shared_ptr<CmtCCommitmentMsg> generateCommitmentMsg(const shared_ptr<CmtCommitValue> & input, biginteger r, long id) = 0;
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33:0,
from /usr/include/c++/7/bits/allocator.h:46,
from /usr/include/c++/7/string:41,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/boost/random/additive_combine.hpp:19,
from /usr/include/boost/random.hpp:36,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/../infra/Common.hpp:33,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/RandomValue.hpp:30,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/CommitmentScheme.hpp:29,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:30,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/usr/include/c++/7/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = CmtElGamalOnByteArrayCommitter; _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtElGamalOnByteArrayCommitter]’:
/usr/include/c++/7/bits/alloc_traits.h:475:4: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = CmtElGamalOnByteArrayCommitter; _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtElGamalOnByteArrayCommitter; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<CmtElGamalOnByteArrayCommitter>]’
/usr/include/c++/7/bits/shared_ptr_base.h:526:39: required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtElGamalOnByteArrayCommitter; _Alloc = std::allocator<CmtElGamalOnByteArrayCommitter>; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:637:4: required from ‘std::__shared_count<_Lp>::__shared_count(std::_Sp_make_shared_tag, _Tp*, const _Alloc&, _Args&& ...) [with _Tp = CmtElGamalOnByteArrayCommitter; _Alloc = std::allocator<CmtElGamalOnByteArrayCommitter>; _Args = {std::shared_ptr<CommParty>&}; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:1295:35: required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<CmtElGamalOnByteArrayCommitter>; _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtElGamalOnByteArrayCommitter; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr.h:344:64: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<CmtElGamalOnByteArrayCommitter>; _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtElGamalOnByteArrayCommitter]’
/usr/include/c++/7/bits/shared_ptr.h:690:14: required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = CmtElGamalOnByteArrayCommitter; _Alloc = std::allocator<CmtElGamalOnByteArrayCommitter>; _Args = {std::shared_ptr<CommParty>&}]’
/usr/include/c++/7/bits/shared_ptr.h:706:39: required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = CmtElGamalOnByteArrayCommitter; _Args = {std::shared_ptr<CommParty>&}]’
/home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:71:60: required from here
/usr/include/c++/7/ext/new_allocator.h:136:4: error: invalid new-expression of abstract class type ‘CmtElGamalOnByteArrayCommitter’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:35:0,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/home/ubuntu/libscapi/examples/Commitment/../../include//interactive_mid_protocols/CommitmentSchemeElGamal.hpp:431:7: note: because the following virtual functions are pure within ‘CmtElGamalOnByteArrayCommitter’:
class CmtElGamalOnByteArrayCommitter : public CmtElGamalCommitterCore, public PerfectlyBindingCmt, public CmtOnByteArray {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:30:0,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/CommitmentScheme.hpp:360:40: note: virtual std::shared_ptr<CmtCCommitmentMsg> CmtCommitter::generateCommitmentMsg(const std::shared_ptr<CmtCommitValue>&, biginteger, long int)
virtual shared_ptr<CmtCCommitmentMsg> generateCommitmentMsg(const shared_ptr<CmtCommitValue> & input, biginteger r, long id) = 0;
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33:0,
from /usr/include/c++/7/bits/allocator.h:46,
from /usr/include/c++/7/string:41,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/boost/random/additive_combine.hpp:19,
from /usr/include/boost/random.hpp:36,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/../infra/Common.hpp:33,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/RandomValue.hpp:30,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/CommitmentScheme.hpp:29,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:30,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/usr/include/c++/7/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = CmtElGamalHashCommitter; _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtElGamalHashCommitter]’:
/usr/include/c++/7/bits/alloc_traits.h:475:4: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = CmtElGamalHashCommitter; _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtElGamalHashCommitter; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<CmtElGamalHashCommitter>]’
/usr/include/c++/7/bits/shared_ptr_base.h:526:39: required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtElGamalHashCommitter; _Alloc = std::allocator<CmtElGamalHashCommitter>; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:637:4: required from ‘std::__shared_count<_Lp>::__shared_count(std::_Sp_make_shared_tag, _Tp*, const _Alloc&, _Args&& ...) [with _Tp = CmtElGamalHashCommitter; _Alloc = std::allocator<CmtElGamalHashCommitter>; _Args = {std::shared_ptr<CommParty>&}; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:1295:35: required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<CmtElGamalHashCommitter>; _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtElGamalHashCommitter; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr.h:344:64: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<CmtElGamalHashCommitter>; _Args = {std::shared_ptr<CommParty>&}; _Tp = CmtElGamalHashCommitter]’
/usr/include/c++/7/bits/shared_ptr.h:690:14: required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = CmtElGamalHashCommitter; _Alloc = std::allocator<CmtElGamalHashCommitter>; _Args = {std::shared_ptr<CommParty>&}]’
/usr/include/c++/7/bits/shared_ptr.h:706:39: required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = CmtElGamalHashCommitter; _Args = {std::shared_ptr<CommParty>&}]’
/home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:73:53: required from here
/usr/include/c++/7/ext/new_allocator.h:136:4: error: invalid new-expression of abstract class type ‘CmtElGamalHashCommitter’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:36:0,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/home/ubuntu/libscapi/examples/Commitment/../../include//interactive_mid_protocols/CommitmentSchemeElGamalHash.hpp:42:7: note: because the following virtual functions are pure within ‘CmtElGamalHashCommitter’:
class CmtElGamalHashCommitter : public CmtElGamalCommitterCore, public SecureCommit, public CmtOnByteArray {
^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:30:0,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/CommitmentScheme.hpp:360:40: note: virtual std::shared_ptr<CmtCCommitmentMsg> CmtCommitter::generateCommitmentMsg(const std::shared_ptr<CmtCommitValue>&, biginteger, long int)
virtual shared_ptr<CmtCCommitmentMsg> generateCommitmentMsg(const shared_ptr<CmtCommitValue> & input, biginteger r, long id) = 0;
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33:0,
from /usr/include/c++/7/bits/allocator.h:46,
from /usr/include/c++/7/string:41,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/boost/random/additive_combine.hpp:19,
from /usr/include/boost/random.hpp:36,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/../infra/Common.hpp:33,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/RandomValue.hpp:30,
from /home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/CommitmentScheme.hpp:29,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:30,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/usr/include/c++/7/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = CmtEquivocalCommitter; _Args = {std::shared_ptr<CommParty>&, int}; _Tp = CmtEquivocalCommitter]’:
/usr/include/c++/7/bits/alloc_traits.h:475:4: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = CmtEquivocalCommitter; _Args = {std::shared_ptr<CommParty>&, int}; _Tp = CmtEquivocalCommitter; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<CmtEquivocalCommitter>]’
/usr/include/c++/7/bits/shared_ptr_base.h:526:39: required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {std::shared_ptr<CommParty>&, int}; _Tp = CmtEquivocalCommitter; _Alloc = std::allocator<CmtEquivocalCommitter>; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:637:4: required from ‘std::__shared_count<_Lp>::__shared_count(std::_Sp_make_shared_tag, _Tp*, const _Alloc&, _Args&& ...) [with _Tp = CmtEquivocalCommitter; _Alloc = std::allocator<CmtEquivocalCommitter>; _Args = {std::shared_ptr<CommParty>&, int}; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr_base.h:1295:35: required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<CmtEquivocalCommitter>; _Args = {std::shared_ptr<CommParty>&, int}; _Tp = CmtEquivocalCommitter; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/usr/include/c++/7/bits/shared_ptr.h:344:64: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<CmtEquivocalCommitter>; _Args = {std::shared_ptr<CommParty>&, int}; _Tp = CmtEquivocalCommitter]’
/usr/include/c++/7/bits/shared_ptr.h:690:14: required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = CmtEquivocalCommitter; _Alloc = std::allocator<CmtEquivocalCommitter>; _Args = {std::shared_ptr<CommParty>&, int}]’
/usr/include/c++/7/bits/shared_ptr.h:706:39: required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = CmtEquivocalCommitter; _Args = {std::shared_ptr<CommParty>&, int}]’
/home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:75:55: required from here
/usr/include/c++/7/ext/new_allocator.h:136:4: error: invalid new-expression of abstract class type ‘CmtEquivocalCommitter’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:37:0,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/CommitmentSchemeEquivocal.hpp:43:7: note: because the following virtual functions are pure within ‘CmtEquivocalCommitter’:
class CmtEquivocalCommitter : public CmtCommitter, public EquivocalCmt {
^~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.hpp:30:0,
from /home/ubuntu/libscapi/examples/Commitment/CommitmentExample.cpp:29:
/home/ubuntu/libscapi/examples/Commitment/../../include/interactive_mid_protocols/CommitmentScheme.hpp:360:40: note: virtual std::shared_ptr<CmtCCommitmentMsg> CmtCommitter::generateCommitmentMsg(const std::shared_ptr<CmtCommitValue>&, biginteger, long int)
virtual shared_ptr<CmtCCommitmentMsg> generateCommitmentMsg(const shared_ptr<CmtCommitValue> & input, biginteger r, long id) = 0;
^~~~~~~~~~~~~~~~~~~~~
CMakeFiles/libscapi_example.dir/build.make:88: recipe for target 'CMakeFiles/libscapi_example.dir/Commitment/CommitmentExample.cpp.o' failed
make[2]: *** [CMakeFiles/libscapi_example.dir/Commitment/CommitmentExample.cpp.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/libscapi_example.dir/all' failed
make[1]: *** [CMakeFiles/libscapi_example.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2 commit 02423cd, Ubuntu 18.04.4 LTS. can you assist? thank you. |
I checkout the master and follow the docs, installing libscapi. However, when I build the examples, I've got some header file include error.
After I resolve these header file error, I've met another error.
It seems that the current examples do not match the docs. I think the code structure has been changed. SO, how can I actually run the examples or which branch is stable and matches the docs? Any suggestion would be appreciated. Thanks.
The text was updated successfully, but these errors were encountered: