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.

1 Answer 1


Some background on this error can be found here: link. 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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.