Open lemonviv opened 4 years ago
Please run this command: cmake . -DSCAPI_BASE_DIR=<path_to_libscapi> && make
SCAPI_BASE_DIR
is the location of libscapi
folder
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. Can you specify your operating system and OpenSSL version?
No problem. Versions are as follows:
Ubuntu 18.04.3 LTS OpenSSL 1.1.1 11 Sep 2018
Hello, I have a similar problem. When I try to run this command: ./tests.exe I see this error: bash: ./tests.exe: No such file or directory
What should I do? I am new in programming and would be grateful if you could help me with this.
From the libscapi
folder please try this command: ./tests/ScapiTests
Thank you. I did and now I see the following (sorry for the long massage):
ScapiTests is a Catch v1.2.1 host application. Run with -? for options
/home/zeinab/libscapi/tests/tests.cpp:398 ...............................................................................
/home/zeinab/libscapi/tests/tests.cpp:407: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/tests.cpp:398 ...............................................................................
/home/zeinab/libscapi/tests/tests.cpp:412: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/tests.cpp:398 ...............................................................................
/home/zeinab/libscapi/tests/tests.cpp:421: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/tests.cpp:851 ...............................................................................
/home/zeinab/libscapi/tests/tests.cpp:903: FAILED: due to unexpected exception with message: Unknown exception
/home/zeinab/libscapi/tests/tests.cpp:923 ...............................................................................
/home/zeinab/libscapi/tests/tests.cpp:1001: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/tests.cpp:923 ...............................................................................
/home/zeinab/libscapi/tests/tests.cpp:1021: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:68 ...............................................................................
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:70: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:68 ...............................................................................
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:88: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:68 ...............................................................................
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:107: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:68 ...............................................................................
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:133: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:68 ...............................................................................
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:156: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:68 ...............................................................................
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:179: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:68 ...............................................................................
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:198: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:68 ...............................................................................
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:221: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:68 ...............................................................................
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:239: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:68 ...............................................................................
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:269: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:68 ...............................................................................
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:381: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:68 ...............................................................................
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:431: FAILED: due to unexpected exception with message: does not exist
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:68 ...............................................................................
/home/zeinab/libscapi/tests/interactiveMidProtocolsTests.cpp:474: FAILED: due to unexpected exception with message: does not exist
=============================================================================== test cases: 18 | 14 passed | 4 failed assertions: 454 | 435 passed | 19 failed
Due to OpenSSL random generator, sometimes some of the tests are failed.
Run make
command at libscapi
dir and tell me if you are still getting the same errors.
This is the output I received at my machine:
user@user-Latitude-5580:~/libscapi$ make
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/libscapi/tests
make[1]: Entering directory '/home/user/libscapi/tests'
make[2]: Entering directory '/home/user/libscapi/tests'
make[3]: Entering directory '/home/user/libscapi/tests'
Scanning dependencies of target ScapiTests
make[3]: Leaving directory '/home/user/libscapi/tests'
make[3]: Entering directory '/home/user/libscapi/tests'
[ 33%] Building CXX object CMakeFiles/ScapiTests.dir/tests.cpp.o
[ 66%] Building CXX object CMakeFiles/ScapiTests.dir/interactiveMidProtocolsTests.cpp.o
[100%] Linking CXX executable ScapiTests
make[3]: Leaving directory '/home/user/libscapi/tests'
[100%] Built target ScapiTests
make[2]: Leaving directory '/home/user/libscapi/tests'
make[1]: Leaving directory '/home/user/libscapi/tests'
===============================================================================
All tests passed (498 assertions in 18 test cases)
Thank you a thousand times, I successfully built the test and examples.
Now as you said for Yao examples, I am following this repository: https://github.com/cryptobiu/MPC-Benchmark/tree/master/SemiHonestYao
However, I am facing this error:
zeinab@zeinab:~/libscapi/examples/Yao$ cmake . && make CMake Error: The source directory "/home/zeinab/libscapi/examples/Yao" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.
Can you help me again with your valuable comments?
You need to clone the MPC-Benchmark
repository from here to your home directory.
run this command afterwards:
cd ~/MPC-Benchmark/ SemiHonestYao && cmake . && make
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 02423cd6ec1c49792d1f8e3dcbb6bd68644aa733, 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.