linux 编译bitcoin,编译bitcoin

download bitcoin

git clone https://github.com/bitcoin/bitcoin.git

2. run autogen.sh

./autogen.sh

3. run configure

write a shell script 'my-conf.sh' to run 'configure' script:

MY_CURPATH=`pwd`

MY_LOCAL=${MY_CURPATH}/mylocal

PREFIX=${MY_LOCAL}

echo$MY_CURPATH

echo$MY_LOCAL

./configure --prefix=${PREFIX} \

--enable-debug \

--enable-werror \

--with-gui \

--with-incompatible-bdb

Some errors took place in the configure process:

1). configure: error: Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)

resolve method: add "--with-incompatible-bdb".

2). configure: error: Qt dependencies not found

resolve method: sudo apt-get install libqt4-dev

3). checking for protoc... no

configure: error: PROTOC not found

resolve method: sudo apt-get install protobuf-compiler

4) C++ source seen but 'CXX' is undefined

sudo apt-get install libtool

5). continue to run 'my-conf.sh'. The result:

Options used to compile and link:

with wallet   = yes

with gui / qt = yes

qt version  = 4

with qr     = auto

with zmq      = no

with test     = yes

with bench    = yes

with upnp     = yes

debug enabled = yes

werror        = yes

target os     = linux

build os      =

CC            = /usr/bin/ccache gcc

CFLAGS        = -g -O2 -g3 -O0

CPPFLAGS      =  -DDEBUG -DDEBUG_LOCKORDER -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS

CXX           = /usr/bin/ccache g++ -std=c++11

CXXFLAGS      = -g -O2 -g3 -O0 -Wall -Wextra -Wformat -Wvla -Wformat-security -Wno-unused-parameter

LDFLAGS       =

ARFLAGS       = cr

4. make

5. make instal

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值