Unable to build Solidity Compiler in Aion FastVM - virtual-machine

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.

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.
Spin up a Ubuntu 16.04 x86-64 environment (either locally or on AWS / Azure / DigitalOcean / etc).
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
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.

Related

Error when installing a python module in Linux

I am encoutering two kinds of issues while trying to install a package called Boltztrap2.
1) Trying to install Boltztrap2 using 'pip3'. However, when I punch in the command, the process goes smoothly for a while and then spits out an error :
BoltzTraP2/sphere/frontend.cpp:32:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
I did some troubleshooting and found out that it is just a path issue - I confirmed this by typing 'locate Python.h'. However, I don't get how to manually incorporate this change since the 'pip3' command that I use downloads the program and compiles it automatically. I don't seem to have access to change any scripts, or rather I do not know how to, since I'm kind of new to all this.
PS: I do not have sudo access.
2) Trying to install Boltztrap2 by manually compiling the python setup file: This seems to work fine until the system spits out an error saying:
Error:numpy is not installed.
PS: Again, I do not have sudo access.
I would be very glad if someone could help me install this package through either method. I just want to get the software to work. Thanks in advance for any assistance.
python3 -m pip install --upgrade pip
pip3 install numpy
Check if you can upgrade pip?
If that works then you can pip install numpy.

libtiff check failed when trying to build a library that depends on it

I am using ubuntu 18.04. I have libtiff5 installed (using sudo apt install libtiff5). When trying to build a library that depends on libtiff I get the following error:
checking for TIFFOpen in -ltiff... no
configure: error: libtiff check failed
Any suggestions on how to fix this? My guess is I have to modify LD_LIBRARY_PATH, but I don't know where apt installed libtiff

Issues installing mod_wsgi - cannot find Makefile.in

I'm trying to rebuild mod_wsgi and am running into this issue? Does anyone know what's going on here?
/tmp/mod_wsgi-3.4# ls
config.log LICENCE posix-ap2X.mk.in win32-ap22py31.mk
config.status Makefile.in README
configure mod_wsgi.c win32-ap22py26.mk
configure.ac posix-ap1X.mk.in win32-ap22py27.mk
root#vps-547073:/tmp/mod_wsgi-3.4# ./configure
checking for apxs2... no
checking for apxs... no
checking Apache version... ./configure: line 1704: apxs: command not found
./configure: line 1704: apxs: command not found
./configure: line 1705: apxs: command not found
./configure: line 1708: /: Is a directory
checking for python... /usr/bin/python
./configure: line 1877: apxs: command not found
configure: creating ./config.status
config.status: error: cannot find input file: Makefile.in
See the mod_wsgi instructions:
http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide#Apache_Requirements
It says:
On Linux systems, if Apache has been installed from a package
repository, you must have installed the corresponding Apache "dev"
package as well.
For most Linux distributions, the "dev" package for Apache 2.X is
"apache2-dev" where the corresponding Apache package was "apache2".
Some systems however distinguish the "dev" package based on which MPM
is used by Apache. As such, it may also be called "apache2-worker-dev"
or "apache2-prefork-dev". If using Apache 2.X, do not mix things up
and install "apache-dev" by mistake, which is the "dev" package for
Apache 1.3 called just "apache".
You are missing that dev package for Apache. This is why 'apxs' cannot be found and subsequent issues occur.
Try to install apache-dev. Use below command in terminal to install.
sudo yum install httpd-devel
OR
Ubuntu/Debian: sudo apt-get install apache2-dev

Configuration for Java binding for ZeroMQ (0MQ) with no root privileges on Linux

I am a novice with zeroMQ and I am stuck at binding ØMQ with java on a server running CentOS release 5.9.
Unfortunately, I do not have super user/root privileges on the server and am trying to install ØMQ as a normal user with restricted privileges. I have installed ØMQ by following instructions on http://www.zeromq.org/area:download
Make sure that libtool, autoconf, automake are installed.
Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed.
Unpack the .tar.gz source archive.
Run ./configure, followed by make.
Could not run the following obviously
To install ØMQ system-wide run sudo make install.
On Linux, run sudo ldconfig after installing ØMQ.
Then I attempted to install jzmq.
Cloned [git clone https://github.com/zeromq/jzmq.git]
Ran autogen.sh
Ran configure
At this point I get the following error
checking for ZeroMQ... no
checking zmq.h usability... no
checking zmq.h presence... no
checking for zmq.h... no
configure: error: cannot find zmq.h
As a result of the above error I am not able to run java tests and get error "no jzmq in java.library.path".
Can anybody help/direct me to how to get java binding for zeromq work when you dont have root privileges to install it? Its difficult to get IT department to install a new software on servers.
Appreciate your help.
Note: I do not have write permissions to /usr directory
Thanks
GBP
This can be overcome by adding --with-zeromq=/home/user/zeromq (installation directory of zeromq)
./configure --with-zeromq=/home/user/zeromq
Other steps include
export LD_LIBRARY_PATH=/home/user/zeromq/lib
You can also use JeroMQ (https://github.com/zeromq/jeromq) which is a pure Java implementation of ZeroMQ
I got this working by running autogen.sh on OEL 6 then running configure / compiling / installing on CentOS 5.9. I briefly looked into why autogen.sh was failing and the problem was the tool chain was too old. Since I had a more up-to-date system with a modern tool chain available running autogen.sh on something other than CentOS 5 was the easiest path for me. I'm sure it works fine with other modern Linux variants, I had OEL 6 at my finger tips.
I also did not have access to a standard directory for installation. To get that working I added zmq.jar to my class path, and the run-time linker needed to be able to find the zeromq and jzmq run-time libraries.
I faced the same issue on CentOS 6.5 and found that you need to install "gcc-c++" for this to work.
I used the following to install dependencies:
yum -y install jdk zeromq-devel unzip libtool gcc autoconf automake gcc-c++ python
Note that "jdk" comes from our private repository and it's same what can be downloaded from java.com
The following public repositories are installed on server:
atomic
Actually, I ended up having this same issue, and the following script worked for me, where I installed zeromq into ~ (so that I have ~/lib contains libzmq.a libzmq.la libzmq.so libzmq.so.3 libzmq.so.3.1.0 pkgconfig)
./autogen.sh ./configure --prefix=$HOME \ #because you don't have root privileges
--with-zeromq=$HOME --includedir=$HOME/include/ --libdir=$HOME/lib/
./make
./make -n install
#to check to see if it installs it to the right location
make install

Apache installation; libpcre error

When installing Apache on Ubuntu 11.10, I get the following error:
configure: error: APR not found. Please read the documentation.
I followed the instructions here, then, I get the error below:
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
What am I doing wrong and how can I resolve it?
1. Download PCRE from PCRE.org
2. Compile it with a prefix and install it:
./configure --prefix=/usr/local/pcre
make
make install
3. Go back to where your Apache installation is and compile Apache with PCRE:
--with-pcre=/usr/local/pcre
For me (Fedora Linux), it was enough to just install the pcre-devel: yum install -y pcre-devel. Didn't even have to use --with-pcre afterwards.
Debian
In a clean installation of Debian 9.5, during the installation of Apache it is necessary to have some packages and libraries to avoid errors. Next I show the type of error and its respective solution
Configuration
configure: error: no acceptable C compiler found in $PATH
$ sudo apt-get install build-essential
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
$ sudo apt-get install libpcre3-dev
Then I make the configuration indicating that it is installed in the path /usr/local and not in /usr/local/apache2, otherwise I will have library errors. The idea is that the libraries created for httpd end in /usr/local/lib so that the dynamic linker knows them.
$ configure --prefix /usr/local
Compilation
And for the compilation the following the installation of some packages also would avoid us errors in a clean installation of Debian.
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory.
$ sudo apt-get install libexpat1-dev.
It is recommended to use the -j3 parameter to make the compilation faster. Although it could also be ignored.
$ make -j3
I was other problem compiling apache2 in CentOS with pcre. I installed pcre in other location "/custom/location/pcre" and configure command throw the following error
configure: error: Did not find pcre-config script at "/custom/location/pcre"
to solve it changing the flag --with-pcre=/custom/location/pcre to --with-pcre=/custom/location/pcre/bin/pcre2-config
BTW, on CentOS 7.6 before building httpd, please install pcre-devel
`$ sudo yum install pcre-devel`
In RHEL 3 is not necessary setting parameter --with-pcre pointing to pcre-config. Only need pcre path
My configure command:
./configure --prefix=/usr/local/apache2 --with-pcre=/usr/local/pcre
This worked for me:
sudo apt-get install libpcre3-dev
In ubuntu
This worked for me
./configure --prefix /u01/apache --with-included-apr --with-pcre=/usr/local/pcre/bin/pcre2-config