Skip to content

Building within termux fails with 'incomplete type CBlock' #11388

@esotericnonsense

Description

@esotericnonsense

Describe the issue

Building within Termux fails in validationinterface. The error is below.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Install the required dependencies in Termux using the package manager
  2. Compile libevent from source to get libevent_pthreads
  3. Wrangle a bit with chroots and so on to get autogen/configure to run through
  4. make

Expected behaviour

A copy of bitcoind to appear for me to abuse my smartphone with. Obviously not a 'supported' configuration, but it'd be a fun toy to play with.

Actual behaviour

... omitted ...
  CXX      libbitcoin_server_a-validationinterface.o                                                                  
In file included from validationinterface.cpp:6:                                                                      
In file included from ./validationinterface.h:9:                                                                      
In file included from /usr/bin/../include/c++/v1/memory:599:                                                          
/usr/bin/../include/c++/v1/type_traits:1334:59: error: incomplete type 'CBlock' used in type trait expression         
    : public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};                                                      
                                                          ^                                                           
/usr/bin/../include/c++/v1/type_traits:543:37: note: in instantiation of template class                               
      'std::__ndk1::is_base_of<std::__ndk1::allocator_arg_t, CBlock>' requested here                                  
struct __lazy_and : __lazy_and_impl<_P1::type::value, _Pr...> {};                                                     
                                    ^                                                                                 
/usr/bin/../include/c++/v1/tuple:664:9: note: in instantiation of template class                                      
      'std::__ndk1::__lazy_and<std::__ndk1::is_base_of<std::__ndk1::allocator_arg_t, CBlock>,                         
      std::__ndk1::__lazy_all<std::__ndk1::__dependent_type<std::__ndk1::is_default_constructible<const CBlock &>,    
      true>, std::__ndk1::__dependent_type<std::__ndk1::is_default_constructible<const CValidationState &>, true> > >'
      requested here                                                                                                  
        __lazy_and<                                                                                                   
        ^                                                                                                             
/usr/bin/../include/c++/v1/tuple:670:5: note: in instantiation of default argument for 'tuple<CBlock,                 
      CValidationState, true>' required here                                                                          
    tuple(_AllocArgT, _Alloc const& __a)                                                                              
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                              
/usr/include/boost/signals2/detail/variadic_slot_invoker.hpp:128:49: note: while substituting deduced template        
      arguments into function template 'tuple' [with _AllocArgT = CBlock, _Alloc = CValidationState, _Dummy =         
      (no value), $3 = (no value)]                                                                                    
        variadic_slot_invoker(Args & ... args): _args(args...)                                                        
                                                ^                                                                     
/usr/include/boost/signals2/detail/signal_template.hpp:239:34: note: in instantiation of member function              
      'boost::signals2::detail::variadic_slot_invoker<boost::signals2::detail::void_type, const CBlock &, const       
      CValidationState &>::variadic_slot_invoker' requested here                                                      
          slot_invoker invoker = slot_invoker(BOOST_SIGNALS2_SIGNATURE_ARG_NAMES(BOOST_SIGNALS2_NUM_ARGS));           
                                 ^                                                                                    
/usr/include/boost/signals2/detail/signal_template.hpp:722:16: note: in instantiation of member function              
      'boost::signals2::detail::signal_impl<void (const CBlock &, const CValidationState &),                          
      boost::signals2::optional_last_value<void>, int, std::__ndk1::less<int>, boost::function<void (const CBlock &,  
      const CValidationState &)>, boost::function<void (const boost::signals2::connection &, const CBlock &, const    
      CValidationState &)>, boost::signals2::mutex>::operator()' requested here                                       
        return (*_pimpl)(BOOST_SIGNALS2_SIGNATURE_ARG_NAMES(BOOST_SIGNALS2_NUM_ARGS));                                
               ^                                                                                                      
validationinterface.cpp:121:30: note: in instantiation of member function 'boost::signals2::signal<void (const CBlock 
      &, const CValidationState &), boost::signals2::optional_last_value<void>, int, std::__ndk1::less<int>,          
      boost::function<void (const CBlock &, const CValidationState &)>, boost::function<void (const                   
      boost::signals2::connection &, const CBlock &, const CValidationState &)>, boost::signals2::mutex>::operator()' 
      requested here                                                                                                  
    m_internals->BlockChecked(block, state);                                                                          
                             ^                                                                                        
./validationinterface.h:13:7: note: forward declaration of 'CBlock'                                                   
class CBlock;                                                                                                         
      ^                                                                                                               
1 error generated.                                                                                                    
make[2]: *** [Makefile:5891: libbitcoin_server_a-validationinterface.o] Error 1                                       
make[2]: *** Waiting for unfinished jobs....               
make[2]: Leaving directory '/home/src/bitcoin-0.15.0/src'  
make[1]: *** [Makefile:9277: all-recursive] Error 1        
make[1]: Leaving directory '/home/src/bitcoin-0.15.0/src'  
make: *** [Makefile:739: all-recursive] Error 1            

What version of bitcoin-core are you using?

v0.15.0.1, signed source package.

Other potentially relevant information

Termux doesn't ship g++ and hasn't for a while now.

$ clang -v                            
clang version 5.0.0 (tags/RELEASE_500/final)               
Target: aarch64--linux-android                             
Thread model: posix          
InstalledDir: /data/data/com.termux/files/usr/bin

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions