Skip to content

Make examples error #80

Description

@thucgn

error when cd examples && make

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/g/install/libscapi-master/examples/Commitment/../../include/interactive_mid_protocols/../infra/Common.hpp:33,
                 from /home/g/install/libscapi-master/examples/Commitment/../../include/interactive_mid_protocols/RandomValue.hpp:30,
                 from /home/g/install/libscapi-master/examples/Commitment/../../include/interactive_mid_protocols/CommitmentScheme.hpp:29,
                 from /home/g/install/libscapi-master/examples/Commitment/CommitmentExample.hpp:30,
                 from /home/g/install/libscapi-master/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/g/install/libscapi-master/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/gw/install/libscapi-master/examples/Commitment/CommitmentExample.hpp:37:0,
                 from /home/gw/install/libscapi-master/examples/Commitment/CommitmentExample.cpp:29:
/home/gw/install/libscapi-master/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/gw/install/libscapi-master/examples/Commitment/CommitmentExample.hpp:30:0,
                 from /home/gw/install/libscapi-master/examples/Commitment/CommitmentExample.cpp:29:
/home/gw/install/libscapi-master/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:107: recipe for target 'CMakeFiles/libscapi_example.dir/Commitment/CommitmentExample.cpp.o' failed

Machine details

  • ubuntu 18.04
  • gcc 7.5
  • boost 1.71.0, and I tried boost 1.69.0, but the error remains.

Thank You

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions