<p>Some background on this error can be found here: <a href="https://stackoverflow.com/q/50198319/8253658">link</a>. To fix it, you could either subtract 1 from the length being copied, or disable the warning.</p>
<p>However, this library is certainly not maintained. As you observed, the last commit was in 2016, and the highest supported version of Bitcoin Code is listed as v0.12. Bitcoin Code released v22 recently so this is very out of date and the API will have changed significantly.</p>

CC BY-SA 4.0
2021-12-25T07:00:30.757Z
Thanks! But do you have an alternative library for RPC-calls?
zerotobtc
CC BY-SA 4.0
2021-12-25T08:04:02.670Z
Perhaps take a look here: https://bitcoin.stackexchange.com/q/43937/51948
meshcollider
CC BY-SA 4.0
2021-12-23T10:32:17.823Z
2021-12-23T10:42:02.157Z
2021-12-23T10:42:02.157Z
meshcollider
<p>I'm trying to install the <a href="https://github.com/gitmarek/libbitcoinrpc" rel="nofollow noreferrer">libbitcoin-rpc</a> but I'm getting the following error when I try to install with <code>make</code>:</p>
<pre><code>gcc -fPIC -O3 -g -Wall -Werror -Wextra -std=c99 -D VERSION=\&quot;0.2\&quot; -o src/bitcoinrpc_err.o -c src/bitcoinrpc_err.c
src/bitcoinrpc_err.c: In function ‘bitcoinrpc_err_set_’:
src/bitcoinrpc_err.c:39:9: error: ‘strncpy’ specified bound 1000 equals destination size [-Werror=stringop-truncation]
   39 |         strncpy(e-&gt;msg, msg, BITCOINRPC_ERRMSG_MAXLEN);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:87: src/bitcoinrpc_err.o] Error 1
</code></pre>
<p>I have installed all dependencies and I have also already tried changing the <code>Makefile</code> and the <code>PATH</code> according to the <code>README</code> but nothing worked.</p>
<p>I think the issue is related to <a href="https://stackoverflow.com/questions/59250031/strncpy-gcc-gives-werror-stringop-truncation">this question</a>. Is the libbitcoin library still maintained? Last changes were in 2016 and the <code>strncpy</code> error exists only since 2019 I think.</p>

<error><installation><libbitcoin>
Unable to `make` libbitcoin on Debian VPS
zerotobtc
# Unable to `make` libbitcoin on Debian VPS

(Asked by: username_0 on 2021-12-23)

I'm trying to install the libbitcoin-rpc but I'm getting the following error when I try to install with make:
gcc -fPIC -O3 -g -Wall -Werror -Wextra -std=c99 -D VERSION=\"0.2\" -o src/bitcoinrpc_err.o -c src/bitcoinrpc_err.c
src/bitcoinrpc_err.c: In function ‘bitcoinrpc_err_set_’:
src/bitcoinrpc_err.c:39:9: error: ‘strncpy’ specified bound 1000 equals destination size [-Werror=stringop-truncation]
   39 |         strncpy(e->msg, msg, BITCOINRPC_ERRMSG_MAXLEN);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:87: src/bitcoinrpc_err.o] Error 1

I have installed all dependencies and I have also already tried changing the Makefile and the PATH according to the README but nothing worked.
I think the issue is related to this question. Is the libbitcoin library still maintained? Last changes were in 2016 and the strncpy error exists only since 2019 I think.

**Tags:** error, installation, libbitcoin


---

## 1 answers

### Answer by username_1 on 2021-12-23. Score: 2 | Accepted answer

Some background on this error can be found here: [link](https://stackoverflow.com/q/50198319/8253658). To fix it, you could either subtract 1 from the length being copied, or disable the warning.

However, this library is certainly not maintained. As you observed, the last commit was in 2016, and the highest supported version of Bitcoin Code is listed as v0.12. Bitcoin Code released v22 recently so this is very out of date and the API will have changed significantly.

> **Comments:**
> **username_0**: Thanks! But do you have an alternative library for RPC-calls?  
> **username_1**: Perhaps take a look here: https://bitcoin.stackexchange.com/q/43937/51948  

---

