当前位置: 首页 > 工具软件 > Bitcoin-Qt > 使用案例 >

编译bitcoin

房泉
2023-12-01
  1. 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



      本文转自FrankNie0101 51CTO博客,原文链接:http://blog.51cto.com/frankniefaquan/1953694,如需转载请自行联系原作者





 类似资料: