- Ubuntu 16.04 or later version
- Oracle Java SE Development Kit 10
- Apache Ant 1.10
- 8GB RAM
- CPU need to support SSE4.2
- install pre-required package
sudo apt-get update
sudo apt-get install -y git g++ cmake wget llvm-4.0 lsb-release libjsoncpp1 libjsoncpp-dev libboost1.58-all-dev libzmq5
- Clone the Aion project
git clone --recursive https://github.com/aionnetwork/aion
- Go into the folder
cd aion
- Check your environment settings are correct, including the Ant execute path, java executes PATH link to the JDK10 folder, and the JAVA_HOME.
This is the example for the building environment settings in .profile under the home path. You can reload it by source ~/.profile
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
export JAVA_HOME=$HOME/IDE/java/jdk-10.0.1
export ANT_HOME=$HOME/IDE/apache-ant-1.10.3
PATH="$ANT_HOME/bin:$JAVA_HOME/bin:$PATH"
Then you should be able to build
ant pack_build
or
ant
- Verify the code You can go through the test cases by:
ant test
- After build check your pack folder
cd pack
You should see a file named like this
aion-v<KERNEL VERSION>.<GIT REVISION>-<BUILD DATE>.tar.bz2
eg. aion-v0.1.12.2c5119a-2018-02-28.tar.bz2
If you want to build the project all from the source code. In step 4 of the How to build, you can use ant full_build to build all from source (It will take a while). make sure your Ubuntu is 16.04 release (if you want to build on top of the latest Ubuntu release, will require you to change the dependency of the build script in the aion_fastvm/script folder, the last Ubuntu release doesn't have the libboost1.58 package)
Please check the section Aion Installation in the aion/README.md
To enable the google-java style pre-commit hook, open the command prompt and simply cd
into the root of your Aion project and type:
cp .gitsettings/pre-commit .git/hooks/
Also note that to avoid style clashing with our license, at the top of each class that has a license displayed that begins with /******...
(at least two * characters), simply add a single space between the first and second * characters as so: /* *****...