Tuesday, February 17, 2015

How to build cpp-ethereum PoC-7

Please use the instructions at this page instead -- I was never able to get a return value from a contract using the setup described below.


The instructions at this page:
https://github.com/ethereum/cpp-ethereum/wiki/Building-on-Ubuntu
are excellent, but are missing a few steps.

Before you begin, create a VirtualBox VM with Ubuntu 14.04.1 installed in it.
Also, take a snapshot of the basic OS install.

I've compacted the instructions for someone who wants to only install a headless version (no GUI) of PoC-7:

sudo apt-get -y update && sudo apt-get -y install language-pack-en-base
sudo dpkg-reconfigure locales
sudo apt-get -y install software-properties-common
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository -y "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.5-binaries main"
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo add-apt-repository -y ppa:ethereum/ethereum-dev
sudo apt-get -y update && sudo apt-get -y upgrade
sudo apt-get -y install build-essential g++-4.8 git cmake libboost-all-dev automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons libncurses5-dev libcurl4-openssl-dev wget libjsoncpp-dev libargtable2-dev libcryptopp-dev libjson-rpc-cpp-dev libmicrohttpd-dev clang-3.5 lldb-3.5
 
mkdir -p ~/src
cd ~/src
git clone https://github.com/cinemast/libjson-rpc-cpp
cd libjson-rpc-cpp && git checkout tags/v0.3.2
mkdir -p build && cd build && cmake .. && make
sudo make install
sudo ldconfig

cd ~/src && git clone https://github.com/ethereum/cpp-ethereum
cd cpp-ethereum && git checkout poc-7
mkdir -p build && cd build
cmake .. -DHEADLESS=1 -DEVMJIT=1
make -j2

Take a snapshot of the VM. Name it "cpp-ethereum poc7".
Now play around with the "eth" command.

No comments:

Post a Comment