-
Notifications
You must be signed in to change notification settings - Fork 5
Build ePMC under Debian based Linux Distributions
This tutorial has been tested on the following distributions:
- Ubuntu 16.04 LTS, 64-bits
- Ubuntu 14.04 LTS, 64-bits
You can either download the packaged source code (.zip) from the GitHub website, or simply clone the repository to local file system by
git clone https://github.com/ISCAS-PMC/ePMC.git
NOTE: git
is preinstalled in most popular Linux distribution. Otherwise, you need to install it manually. For example, in Debian-based distributions, use
sudo apt-get install git
to install git
.
As some of our plugins depend on some features that openjdk doesn't support, we strongly suggest you to choose Oracle JDK instead. And the version should not be earlier than 13.0.
First, you should download JDK (13.0+) for linux from the official web site. And extract it:
tar -xvf jdk-14.0.2_linux-x64_bin.tar.gz
sudo mkdir -p /usr/lib/jvm/
sudo mv jdk-14.0.2 /usr/lib/jvm/oracle-jdk
Note that if /usr/lib/jvm/oracle-jdk
already exists in your system, then before executing sudo mv jdk-14.0.2 /usr/lib/jvm/oracle-jdk
you should rename/remove the existing directory /usr/lib/jvm/oracle-jdk
.
Then you need to set this jdk as the default one, by
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/oracle-jdk/bin/java 1
sudo update-alternatives --config java
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/oracle-jdk/bin/javac 1
sudo update-alternatives --config javac
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/oracle-jdk/bin/jar 1
sudo update-alternatives --config jar
and choose oracle jdk in the list. update-alternatives
is strongly recommended to set Oracle JDK as the default provider of java
. Because in some cases where users simply create a soft link of java
to /usr/bin
, apt-get
doesn't know that java is already installed. And as a result, OpenJDK is wrongly installed and you may find errors when running ePMC.
Besides, you still have to set up the environment variables manually in .bashrc
.
export JAVA_HOME=/usr/lib/jvm/oracle-jdk
export PATH=$JAVA_HOME/bin:$PATH
You can use source .bashrc
to set the variables in the current shell; you can also close the current shell and open a new one.
Maven is a software project management and comprehension tool. It can be downloaded from the maven website (http://maven.apache.org/). This is needed to manage the compilation of the several components of IscasMC.
We can simply use apt to install maven:
sudo apt-get install maven
We have several pre-defined distributions in ePMC. Refer to distributions to check the difference between them.
After entering the main directory of ePMC, e.g., by cd ~/ePMC
if you cloned the repository in your home directory, run
./build.sh <distribution-identifier>
to build the desired distribution with all the required dependencies. If you are new to our tool, you may want to build the standard distribution simply by
./build.sh
Well done! Now you'll find a long list of supported commands and options. You can follow our tutorial to learn how to use this model checker :)