提交 be78dbb6 编写于 作者: A Andrianto Lie

update outdated how to build doxygen

上级 cfbe756d
......@@ -2,123 +2,6 @@
@defgroup howtobuild How To Build EOS.IO
@brief Describes how to download, compile, and configure an EOS.IO node
The following instructions overview the process of getting the software, building it, and running a simple test network that produces blocks.
### Setting up a build/development environment
This project is written primarily in C++14 and uses CMake as its build system. An up-to-date C++ toolchain (such as Clang or GCC) and the latest version of CMake is recommended. At the time of this writing, Nathan uses clang 4.0.0 and CMake 3.8.0.
### Installing Dependencies
Eos has the following external dependencies, which must be installed on your system:
- Boost 1.64
- OpenSSL
- LLVM 4.0
- [secp256k1-zkp (Cryptonomex branch)](https://github.com/cryptonomex/secp256k1-zkp.git)
```
git clone https://github.com/cryptonomex/secp256k1-zkp.git
cd secp256k1-zkp
./autogen.sh
./configure
make
sudo make install
```
### How to Build LLVM and clang for WASM
By default LLVM and clang do not include the WASM build target, so you will have to build it yourself. Note that following these instructions will create a version of LLVM that can only build WASM targets.
```
mkdir ~/wasm-compiler
cd ~/wasm-compiler
git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git
cd llvm/tools
git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/clang.git
cd ..
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=.. -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release ../
make -j4 install
```
Also, to use the WASM compiler, eos has an external dependency on
- [binaryen](https://github.com/WebAssembly/binaryen.git)
* need to checkout tag 1.37.14
* also need to run "make install"
* if installed in a location outside of PATH, need to set BINARYEN_ROOT to cmake
### Getting the code
To download all of the code, download Eos and a recursion or two of submodules. The easiest way to get all of this is to do a recursive clone:
`git clone https://github.com/eosio/eos --recursive`
If a repo is cloned without the `--recursive` flag, the submodules can be retrieved after the fact by running this command from within the repo:
`git submodule update --init --recursive`
### Configuring and building
To do an in-source build, simply run `cmake .` from the top level directory. Out-of-source builds are also supported. To override clang's default choice in compiler, add these flags to the CMake command:
`-DCMAKE_CXX_COMPILER=/path/to/c++ -DCMAKE_C_COMPILER=/path/to/cc`
For a debug build, add `-DCMAKE_BUILD_TYPE=Debug`. Other common build types include `Release` and `RelWithDebInfo`.
After successfully running cmake, simply run `make` to build everything. To run the test suite after building, run the `chain_test` executable in the `tests` folder.
### Using the WASM compiler to perform a full build of the project
The WASM_LLVM_CONFIG environment variable is used to find our recently built WASM compiler.
This is needed to compile the example contracts insde eos/contracts folder and their respective tests.
```
git clone https://github.com/eosio/eos --recursive
mkdir -p eos/build && cd eos/build
export WASM_LLVM_CONFIG=~/wasm-compiler/llvm/bin/llvm-config
cmake ..
make -j4
```
If you are doing active development on EOS.IO software you may want to add WASM_LLVM_CONFIG to your `.bash_profile`
### Creating and launching a single-node testnet
After successfully building the project, the `eosd` binary should be present in the `programs/eosd` directory. Go ahead and run `eosd` -- it will probably exit with an error, but if not, close it immediately with Ctrl-C. Note that `eosd` will have created a directory named `data-dir` containing the default configuration (`config.ini`) and some other internals. This default data storage path can be overridden by passing `--data-dir /path/to/data` to `eosd`.
Edit the `config.ini` file, adding the following settings to the defaults already in place:
```
# Load the testnet genesis state, which creates some initial block producers with the default key
genesis-json = /path/to/eos/source/genesis.json
# Enable production on a stale chain, since a single-node test chain is pretty much always stale
enable-stale-production = true
# Enable block production with the testnet producers
producer-name = inita
producer-name = initb
producer-name = initc
producer-name = initd
producer-name = inite
producer-name = initf
producer-name = initg
producer-name = inith
producer-name = initi
producer-name = initj
producer-name = initk
producer-name = initl
producer-name = initm
producer-name = initn
producer-name = inito
producer-name = initp
producer-name = initq
producer-name = initr
producer-name = inits
producer-name = initt
producer-name = initu
# Load the block producer plugin, so we can produce blocks
plugin = eos::producer_plugin
```
Now it should be possible to run `eosd` and see it begin producing blocks. At present, the P2P code is not implemented, so only single-node configurations are possible. When the P2P networking is implemented, these instructions will be updated to show how to create an example multi-node testnet.
[Check the latest instructions to build EOS.IO in Github!](https://github.com/EOSIO/eos#building-eos-and-running-a-node)
*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册