Search code examples
virtual-machineblockchainsolidityubuntu-18.04aion

Unable to build Solidity Compiler in Aion FastVM


I'm using the steps on the FastVM guide to build it. I'm stuck on the part where you have to build the Solidity compiler. I've installed the prerequisites but when I run make I get the following:

compilation terminated.
In file included from ./libsolidity/interface/ABI.cpp:21:0:
./libsolidity/interface/ABI.h:25:10: fatal error: json/json.h: No such file or directory
 #include <json/json.h>
          ^~~~~~~~~~~~~
compilation terminated.
In file included from ./libsolidity/interface/Exceptions.h:27:0,
                 from ./libsolidity/interface/ErrorReporter.h:25,
                 from ./libsolidity/interface/ErrorReporter.cpp:23:
./libdevcore/Exceptions.h:20:10: fatal error: boost/exception/exception.hpp: No such file or directory
 #include <boost/exception/exception.hpp>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
^CMakefile:9: recipe for target 'all' failed
make: *** [all] Interrupt

I'm not sure where I'm going wrong.


Solution

  • It looks like the Aion FastVM is built to run on Ubuntu 16.04, not 18.04. Here's the steps I took to get it up and running. I used the steps on Aion's Github for reference.

    1. Spin up a Ubuntu 16.04 x86-64 environment (either locally or on AWS / Azure / DigitalOcean / etc).
    2. SSH into your new environment and run the following line-by-line:

    cd ~ git clone https://github.com/aionnetwork/aion_fastvm.git sudo apt install build-essential llvm-4.0-dev make cd solidity sudo apt install build-essential libboost-all-dev libjsoncpp-dev make

    1. Reboot the VM: sudo reboot now.

    I did get a few warnings while building the Solidity compiler, but they were just warning. Nothing was terminated.