GithubHelp home page GithubHelp logo

dabura667 / libbitcoin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from libbitcoin/libbitcoin-system

0.0 2.0 0.0 5.29 MB

Bitcoin Software Development Toolkit

Home Page: https://libbitcoin.org/

License: Other

C++ 97.42% Python 0.72% Shell 1.43% Makefile 0.37% C 0.07%

libbitcoin's Introduction

Build Status

Libbitcoin

The Bitcoin Development Library

License Overview

All files in this repository fall under the license specified in COPYING. The project is licensed as AGPL with a lesser clause. It may be used within a proprietary project, but the core library and any changes to it must be published online. Source code for this library must always remain free for everybody to access.

About Libbitcoin

The libbitcoin toolkit is a set of cross platform C++ libraries for building bitcoin applications. The toolkit consists of several libraries, most of which depend on the foundational libbitcoin library. Each library's repository can be cloned and built using common automake instructions. There are no packages yet in distribution however each library includes an installation script (described below) which is regularly verified in the automated build.

Table of Contents

Installation

Debian/Ubuntu

Libbitcoin requires a C++11 compiler, currently GCC 4.8.0 minimum.

For this reason Ubuntu is not supported prior to version 12.04.

To see your GCC version:

  $ gcc --version

If necessary, upgrade your compiler as follows:

  $ sudo apt-get install g++-4.8
  $ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
  $ sudo update-alternatives --config g++

Next install the build system:

  $ sudo apt-get install build-essential autoconf automake libtool pkg-config

Next install Boost (1.50.0 or newer) and GMP (5.0.0 or newer).

  $ sudo apt-get install libboost-all-dev libgmp-dev

Finally, execute the install script. This single file will download, build, install and test libbitcoin.

  $ ./install.sh

Libbitcoin is now installed in /usr/local/.

Notes

If you intend to inspect and/or modify source code you should git clone libbitcoin and each unpackaged dependency and build them manually. The install script itself is commented so that the manual build steps for each dependency can be inferred by a developer.

You can run the install script from any directory on your system. This will build libbitcoin in a subdirectory named libbitcoin_build and install it to /usr/local/. When the build completes successfully the libbitcoin_build directory is deleted.

The install script should not normally be executed using sudo. Instead it will immediately prompt you for a super user password if required. This ensures that only the necessary installation steps are executed as a super user, as opposed to the entire build process.

The build script clones, builds and installs two unpackaged repositories, namely:

Build Options

Any set of ./configure options can be passed via the build script, for example:

  $ ./install.sh CPPFLAGS=-DDEBUG CFLAGS="-Og -g"

Compiling for Testnet

Currently libbitcoin cannot work with both testnet and mainnet. This restriction will be lifted in a future version. In order to work with testnet in the interim libbitcoin must be recompiled with the testnet option:

  $ ./install.sh --enable-testnet

Packaging Instructions

To build the Debian package execute the following commands:

  $ sudo apt-get install libboost-all-dev fakeroot
  $ dpkg-buildpackage -rfakeroot

Macintosh

The OSX installation differs from Linux in the installation of the compiler and packaged dependencies.

To upgrade GCC first set the following environment variables:

  CC=/usr/local/bin/gcc-4.8
  CXX=/usr/local/bin/g++-4.8

Next execute the following commands:

  $ brew install boost gmp
  $ brew tap homebrew/versions
  $ brew install gcc48
  $ sudo ln -sf /usr/local/bin/g++-4.8 /usr/bin/g++

Finally, invoke the install script:

  $ ./install.sh

Windows

Visual Studio solutions are maintained for all libbitcoin libraries and dependencies.

The libbitcoin execution environment supports Windows XP Service Pack 2 and newer.

Upgrade Compiler

Libbitcoin requires a C++11 compiler, which means Visual Studio 2013 minimum. Additionally a pre-release compiler must be installed as an update to Visual Studio. Download and install the following tools as necessary. Both are available free of charge:

Create Local NuGet Repository

Dependencies apart from the libbitcoin libraries are available as NuGet packages. The libbitcoin solution files are configured with references to these packages. To avoid redundancies these references expect a NuGet.config in a central location.

The required set of NuGet packages can be viewed using the NuGet package manager from the libbitcoin solution. The NuGet package manager will automatically download missing packages, either from the build scripts or after prompting you in the Visual Studio environment. For your reference these are the required packages:

The GMP for Windows project is called MPIR and has binary compatibility with GMP.

Build Libbitcoin Projects

After cloning the the repository the libbitcoin build can be performed manually (from within Visual Studio) or using the buildall.bat script provided in the builds\msvc\build\ subdirectory. The scripts automatically download the required NuGet packages.

Tip: The buildall.bat script builds all valid configurations. The build time can be significantly reduced by disabling all but the desired configuration in buildbase.bat.

The libbitcoin dynamic (DLL) build configurations do not compile, as the exports have not yet been fully implemented. These are currently disabled in the build scripts but you will encounter numerous errors if you build then manually.

Optional: Build Everything

The non-boost packages above are all sourced from GitHub repositories maintained using the same Visual Studio template as the libbitcoin libraries. If so desired each of these can be built locally, in the same manner as the libbitcoin libraries above. This allows you to avoid using the pre-built NuGet packages. The repositories for each dependency are as follows:

This change is properly accomplished by disabling the "NuGet Dependencies" in the Visual Studio properties user interface and then importing the .import.props file(s) for the corresponding dependencies.

TODO: Update libbitcoin with the .import.props files in a disabled configuration. This will allow this transition to be made entirely in the Visual Studio user interface. Then clarify the above explanation.

Arch Linux

Libbitcoin is available from the AUR.

Gentoo Linux

Libbitcoin is available in the 'bitcoin' overlay. Use layman to fetch the overlay then emerge as usual. If you want to use live build, unlock the '**' keyword for net-p2p/libbitcoin in /etc/portage/package.accept_keywords

libbitcoin's People

Contributors

genjix avatar evoskuil avatar swansontec avatar pmienk avatar kdomanski avatar phantomcircuit avatar pablocastellano avatar bobalot avatar veox avatar bardiharborow avatar changlan avatar kevinejohn avatar rafalkrupinski avatar lclc avatar

Watchers

James Cloos avatar Dabura667 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.