<p>Nevermind, sorry, I got past that part. I had clang as the compiler from update-alternatives, had to switch back to gcc. Currently compiling right now hopefully no more errors.</p>

CC BY-SA 3.0
2017-09-30T22:16:17.120Z
2017-09-30T22:16:17.120Z
hashguide
<p>I am trying to clone litecoin for practice and for some reason this time around my build system isn't working right.</p>

<p>Here is the error I am having after trying to compile my clone AND litecoin 8.7.4 source</p>

<pre><code>bitcoinrpc.cpp:984:52:   required from here
/usr/include/boost/thread/once.hpp:38:18: error: no matching function for     call to ‘call_once(boost::once_flag&amp;, void (*&amp;)())’
     call_once(flag,func);
              ^
In file included from /usr/include/boost/thread/once.hpp:20:0,
             from /usr/include/boost/thread.hpp:17,
             from util.h:24,
             from bignum.h:12,
             from main.h:8,
             from wallet.h:13,
             from init.h:8,
             from bitcoinrpc.cpp:6:
/usr/include/boost/thread/pthread/once_atomic.hpp:121:15: note: candidate: template&lt;class Function, class ... ArgTypes&gt; void boost::call_once(boost::once_flag&amp;, boost::detail::thread_move_t&lt;T&gt;, boost::detail::thread_move_t&lt;Args&gt;...)
   inline void call_once(once_flag&amp; flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args)
           ^
/usr/include/boost/thread/pthread/once_atomic.hpp:121:15: note:   template argument deduction/substitution failed:
In file included from /usr/include/boost/thread.hpp:17:0,
             from util.h:24,
             from bignum.h:12,
             from main.h:8,
             from wallet.h:13,
             from init.h:8,
             from bitcoinrpc.cpp:6:
/usr/include/boost/thread/once.hpp:38:18: note:   mismatched types ‘boost::detail::thread_move_t&lt;T&gt;’ and ‘void (*)()’
     call_once(flag,func);
              ^
/usr/include/boost/thread/once.hpp:35:13: note: candidate: template&lt;class         Function&gt; void boost::call_once(Function, boost::once_flag&amp;)
inline void call_once(Function func,once_flag&amp; flag)
         ^
/usr/include/boost/thread/once.hpp:35:13: note:   template argument deduction/substitution failed:
/usr/include/boost/thread/once.hpp:38:18: note:   cannot convert ‘func’   (type ‘void (*)()’) to type ‘boost::once_flag&amp;’
     call_once(flag,func);
              ^
make: *** [obj/bitcoinrpc.o] Error 1
</code></pre>

<p>Could someone please let me know what this is? I tried an issue and change a line in rpcrawtransaction.cpp </p>

<pre><code>&lt;const CScriptID &amp;&gt; 
</code></pre>

<p>to </p>

<pre><code>&lt;CScriptID&gt; 
</code></pre>

<p>and also tried code snippet from feathercoin, both unsuccussful.</p>

<p>Would be greatly appreciated if someone could help get my system buildable again.</p>

<bitcoind><development><compiling>
Error compiling litecoin clone, boost error
hashguide
# Error compiling litecoin clone, boost error

(Asked by: username_0 on 2017-09-30)

I am trying to clone litecoin for practice and for some reason this time around my build system isn't working right.

Here is the error I am having after trying to compile my clone AND litecoin 8.7.4 source

```
bitcoinrpc.cpp:984:52:   required from here
/usr/include/boost/thread/once.hpp:38:18: error: no matching function for     call to ‘call_once(boost::once_flag&, void (*&)())’
     call_once(flag,func);
              ^
In file included from /usr/include/boost/thread/once.hpp:20:0,
             from /usr/include/boost/thread.hpp:17,
             from util.h:24,
             from bignum.h:12,
             from main.h:8,
             from wallet.h:13,
             from init.h:8,
             from bitcoinrpc.cpp:6:
/usr/include/boost/thread/pthread/once_atomic.hpp:121:15: note: candidate: template<class Function, class ... ArgTypes> void boost::call_once(boost::once_flag&, boost::detail::thread_move_t<T>, boost::detail::thread_move_t<Args>...)
   inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args)
           ^
/usr/include/boost/thread/pthread/once_atomic.hpp:121:15: note:   template argument deduction/substitution failed:
In file included from /usr/include/boost/thread.hpp:17:0,
             from util.h:24,
             from bignum.h:12,
             from main.h:8,
             from wallet.h:13,
             from init.h:8,
             from bitcoinrpc.cpp:6:
/usr/include/boost/thread/once.hpp:38:18: note:   mismatched types ‘boost::detail::thread_move_t<T>’ and ‘void (*)()’
     call_once(flag,func);
              ^
/usr/include/boost/thread/once.hpp:35:13: note: candidate: template<class         Function> void boost::call_once(Function, boost::once_flag&)
inline void call_once(Function func,once_flag& flag)
         ^
/usr/include/boost/thread/once.hpp:35:13: note:   template argument deduction/substitution failed:
/usr/include/boost/thread/once.hpp:38:18: note:   cannot convert ‘func’   (type ‘void (*)()’) to type ‘boost::once_flag&’
     call_once(flag,func);
              ^
make: *** [obj/bitcoinrpc.o] Error 1

```

Could someone please let me know what this is? I tried an issue and change a line in rpcrawtransaction.cpp

```
<const CScriptID &> 

```

to

```
<CScriptID> 

```

and also tried code snippet from feathercoin, both unsuccussful.

Would be greatly appreciated if someone could help get my system buildable again.

**Tags:** bitcoind, development, compiling


---

## 1 answers

### Answer by username_0 on 2017-09-30. Score: 1

Nevermind, sorry, I got past that part. I had clang as the compiler from update-alternatives, had to switch back to gcc. Currently compiling right now hopefully no more errors.


---

