Skip to content

Compile Source Codes on Amazon Linux AMI

zhanxw edited this page Sep 15, 2017 · 2 revisions

Compile on Amazon Linux AMI

(Edited on September 15, 2017, based on Amazon Linux AMI release 2017.03)

Log in to your amazon instance, and run the following commands:

sudo yum -y groupinstall "Development Tools"
sudo yum -y install wget zlib-devel

git clone https://github.com/zhanxw/rvtests
cd rvtests
# compile dynamic-linked executables
make STATIC_FLAG=""

If you encounter problems related to memory, for example, “virtual memory exhausted: Cannot allocate memory”, please try to allocate more swap space and compile again.

# allocate swap space
sudo fallocate -l 1G /mnt/1GB.swap
sudo mkswap /mnt/1GB.swap
sudo swapon /mnt/1GB.swap
# compile again
make STATIC_FLAG=""

After compilation, the executable file can be found under rvtests/executable. You can start with:
rvtests/executable --help