www.prismmodelchecker.org

Installing PRISM


Instructions

Prerequisites

PRISM is known to run on Linux, Windows, Mac OS X and Solaris, including 64-bit variants of these operating systems.

You will need Java, version 8 or above. The tool is known to compile and run with both the Oracle and OpenJDK versions of Java. To run binary versions of PRISM, you only need the Java Runtime Environment (JRE), not the full Java Development Kit (JDK).

To compile PRISM from source, you need the Java Development Kit (JDK), GNU make and a C/C++ compiler (e.g. gcc/g++). For compilation under Windows, you will need Cygwin. See below for more information:


Installation on Windows (32-bit)

To install PRISM on Windows, just run the self-extracting installer which you downloaded. You do not need administrator privileges for this, just write-access to the directory chosen for installation.

If requested, the installer will place shortcuts to run PRISM on the desktop and/or start menu. If not, you can run by PRISM double-clicking the file xprism.bat (which may just appear as xprism) in the bin folder of your PRISM folder. If nothing happens, the most likely explanation is that Java is not installed or not in your path. To check, open a command prompt window, navigate to the PRISM directory, type cd bin, then xprism.bat and examine the resulting error. If you want to create shortcuts to xprism.bat manually, you will find some PRISM icons in the etc folder.

If you wish to use the command-line version of PRISM on Windows, open a command prompt window and type for example:

cd "c:\Program Files\prism-4.0-win\bin"
prism ..\examples\dice\dice.pm

You can also edit the file bin\prism.bat to allow it to be run from any location. See the instructions within the file for further details.

Problems? See the section "Common Problems And Questions''.


Installation on Windows (64-bit)

PRISM is known to run on 64-bit versions of Windows. Since we currently only provide 32-bit binary versions, you will need to install and use a 32-bit, rather than 64-bit version of Java. If not, you may see strange error messages like "Can't load IA 32-bit .dll on a AMD 64-bit platform".

You will probably also need to update bin\xprism.bat (and bin\prism.bat, if you use it), changing javaw on the last line to include the full path to the 32-bit executable.

Other than this, installing and running PRISM is as for the 32-bit case described above.

If this is not possible for some reason, an alternative is to build PRISM from source using Cygwin (See below).

Problems? See the section "Common Problems And Questions''.


Installation of Linux/Mac binary versions

To ensure compatibility, we recommend that you compile PRISM from source on non-Windows platforms. See below for instructions. However, we do provide pre-compiled binary distributions for Linux (32-bit) and, depending on availability, other operating systems such as Mac OS X and Solaris.

To install a binary distribution, unpack the tarred/zipped PRISM distribution into a suitable location, enter the directory and run the install.sh script, e.g.:

gunzip prism-4.0-linux.tar.gz
tar xf prism-4.0-linux.tar
cd prism-4.0-linux
./install.sh

You do not need to be root to install PRISM. The install script simply makes some small customisations to the scripts used to launch PRISM. The PRISM distribution is self-contained and can be freely moved/renamed, however if you do so you will need to re-run ./install.sh afterwards.

To run PRISM, execute either the xprism or prism script (for the graphical user interface or command-line version, respectively). These can be found in the bin directory. These scripts are designed to be run from anywhere and you can easily create symbolic links or aliases to them. If you want icons to create desktop shortcuts to PRISM, you can find some in the etc directory.

Problems? See the section "Common Problems And Questions''.


Building PRISM from source (non-Windows)

To compile PRISM form source code, you will need:

  • GNU make (sometimes called gmake)
  • a C/C++ compiler (e.g. gcc/g++)
  • a Java Development Kit, version 8 or above

To check that you have the development kit, type javac. If you get an error message that javac cannot be found, you probably do not have the JDK installed (or your path is not set up correctly). To check what version you have, type javac -version.

Hopefully, you can build PRISM simply by entering the PRISM directory and running make, e.g.:

gunzip prism-4.0-src.tar.gz
tar xf prism-4.0-src.tar
cd prism-4.0-src
make

For this process to complete correctly, PRISM needs to be able to determine both the operating system you are using and the location of your Java distribution. If there is a problem with either of these, you will see an error message and will need to specify one or both of these manually, such as in these examples:


make OSTYPE=linux
make JAVA_DIR=/usr/java/jdk1.8.0
make OSTYPE=cygwin JAVA_DIR="/cygdrive/c/Program Files/Java/jdk1.8.0"

Note the use of double quotes for the case where the directory contains a space. If you don't know the location of your Java installation, try typing which javac. If the result is e.g. /usr/java/jdk1.8.0/bin/javac then your Java directory is /usr/java/jdk1.8.0. Sometimes javac will be a symbolic link, in which case use "ls -l" to determine the actual location.

It is also possible to to set the environment variables OSTYPE and JAVA_DIR directly or edit their values in the Makefile directly. Note that even when you specify JAVA_DIR explicitly (in either way), PRISM still uses the versions of javac (and javah) that are in your path so make sure this is set up correctly.

64-bit OSs

PRISM should also detect when it is running on a 64-bit architecture, and building will work as above. If this does not work for some reason, you can override detection by setting ARCH to either amd64 (for AMD/Intel 64) or ia64 (for Itanium). For example:


make ARCH=amd64

If you have problems building a 64-bit version of PRISM, one option is to instead compile and run a 32-bit version of PRISM. To do this, you need to:

  1. Make sure you are using a 32-bit version of Java
  2. Override detection of the 64-bit architecture when building:

make clean_all
make ARCH=

Problems? See the section "Common Problems And Questions''.


Building PRISM from source on Windows using Cygwin

The compilation of PRISM currently relies on a Unix-like environment. On Windows, this can be achieved using the Cygwin development environment (or alternatively using MSYS - see below). Once Cygwin is installed, first ensure you have the following installed:

  • make
  • mingw64-i686-gcc-g++ (or mingw64-x86_64-gcc-g++ for 64-bit Windows)
  • binutils
  • dos2unix

Then proceed as described in the previous section. Note that the PRISM compilation process uses the MinGW libraries so that the final result is independent of Cygwin at run-time.

One thing to note: make sure you unzip the PRISM distribution from within Cygwin (e.g. using tar xfz prism-XXX-src.tar.gz). Don't use a Windows program (Winzip, etc.) since this can cause problems.

Problems? See the section "Common Problems And Questions''.


Building PRISM from source on Windows using MSYS

Compiling from source in MSYS is less obvious as this environment is currently not directly supported in the makefile. Additionally, MSYS does not handle symlinks in the same way as cygwin does. The first problem is fixed by providing a OSTYPE variable to the makefile, whereas the second problem currently has to be solved manually.


make OSTYPE=cygwin

At some point it will fail, saying that it cannot find the CUDD library, this is due to the failing symlinks. We can solve this by means of a few commands:


cd cudd/
rmdir lib/
./setup.sh
cd ..
make OSTYPE=cygwin
./install.sh

Problems? See the section "Common Problems And Questions''.


Common Problems And Questions

This section describes some of the most common problems and questions related to the installation and running of PRISM. These are grouped into the following categories:

  • Running PRISM on Windows
  • Running PRISM on non-Windows platforms
  • Compiling PRISM
  • Other issues

Running PRISM on Windows

When I try to run PRISM on Windows, I double-click the PRISM shortcut but nothing happens.

The most common cause of this is that you either do not have Java installed or the java executable is not in your path. In any case, to determine the exact problem, launch a command shell and navigate to the bin directory inside the directory where you installed PRISM (you can use the "PRISM (console)" shortcut installed in the start menu to do this). Then, type xprism.bat and see what error message is displayed.

When I try to run PRISM on Windows, I get an error of the form:
Can't load IA 32-bit .dll on a AMD 64-bit platform

You are probably running a 32-bit Windows binary using a 64-bit version of Java. You need to use a 32-bit version. Make sure you have a 32-bit version installed, and then either make sure it is first in your path or update the bin\xprism.bat (or bin\prism.bat) script, giving the full path to javaw at the end of the file.


Running PRISM on non-Windows platforms

When I try to run PRISM, I get an error of the form:
Exception in thread "main" java.lang.NoClassDefFoundError: ...

Check:

  • Did you run install.sh from the PRISM directory? (non-Windows platforms)
  • If you compiled PRISM from source code, are you sure no errors occurred during the process? To check, go into the PRISM directory, type make clean_all and then re-compile, checking the output (especially at the end) carefully for any error messages.

When I try to run PRISM, I get an error of the form:
java.lang.UnsatisfiedLinkError: no prism in java.library.path

Check:

  • Did you run install.sh from the PRISM directory? (non-Windows platforms)
  • If you compiled PRISM from source code, are you sure no errors occurred during the process? To check, go into the PRISM directory, type make clean_all and then re-compile, checking the output (especially at the end) carefully for any error messages.

Are you on a 64-bit machine? If so, make sure that you are running 64-bit versions of java and javac. (Look for "64-Bit Server VM" in the output of java -version).

When I try to run PRISM, I get an error of the form:
java.lang.UnsatisfiedLinkError: ...
Library not loaded: ../../lib/libdd.dylib

Are you running a new version of Mac OS X (notably El Capitan)? This seems to have some problems. A workaround is to change the path to the 'java' executable that runs PRISM. You should find an installation of Java somewhere like this:

/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk

(obviously the precise name will depend on the version you have) Try running PRISM with the java executable to be found there, e.g. by running:

PRISM_JAVA=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java prism

or by replacing the value of PRISM_JAVA directly in the prism script directly.

When I try to run PRISM, I get an error of the form:
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file

Your version of Java is too old. Update or install a newer version of Oracle Java and then try again.

When I try to run a (Linux) binary version of PRISM, I get an error saying that libstdc++.so.5 cannot be found or libstdc++.so.6 cannot be found.

This is usually due to a discrepancy between the version of Linux that was used to build the binary distribution and the version that you are using to run it.

If the error message is about libstdc++.so.5, you will just need to install an old version of the libstdc++ library. This should be quite easy to find for most Linux distributions. On Fedora Core, for example, just type: yum install compat-libstdc++-33 as root.

If the error message is about libstdc++.so.6, you are running an older version of Linux than the binary release was compiled for. The easiest solution is to compile PRISM yourself from the source code version instead.

When I try to run PRISM, I get an error of the form:
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.initializeClass(libgcj.so.7)
at prism.PrismSettings.<init>(PrismSettings.java:297)

You are not running the Oracle version of Java. You will need to install it.

When I try to run PRISM, I get an error of the form:
java.lang.UnsatisfiedLinkError: libprism: ... cannot restore segment prot after reloc: Permission denied

This is likely to be caused by the default settings of SELinux on newer versions of Linux. Open up the "Security Level Configuration" (on Fedora, for example, this is found under "Administration | Security Level and Firewall" under the main menu or by running system-config-securitylevel). Look in the "Compatibility" section of the SELinux Policy settings and make sure "Allow the use of shared libraries with Text Relocation" is ticked. You may need to reboot for changes to take effect.

Do I have to use Oracle's version of Java to build/run PRISM?

Currently, this seems to be the case. We will aim to address this in the future.


Compiling PRISM

When I try to compile PRISM, make seems to get stuck in an infinite loop

This is probably due to the detection of Java failing. Specify the location of your Java directory by hand, e.g. make JAVA_DIR=/usr/java/jdk1.6.0. See the Instructions page for more on this.

When I try to compile PRISM, I get errors of the form:
/usr/bin/libtool: for architecture: cputype (16777234) cpusubtype (0) file: -lSystem is not an object file (not allowed in a library)

Are you compiling PRISM on Max OS X? If so, the likely explanation is that you have upgraded to a new version of Mac OS X but have not upgraded the developer tools (eg. XCode). Upgrade and try again.

When I try to compile PRISM, nothing seems to happen

Perhaps you are not using the GNU version of make. Try typing make -v to find out. On some systems, GNU make is called gmake.

When I try to compile PRISM, I get errors of the form:
Unexpected end of line seen...
or:
make: Fatal error in reader: Makefile, line 58: Unexpected end of line seen...

Perhaps you are not using the GNU version of make. Try typing make -v to find out. On some systems, GNU make is called gmake.

When I try to compile PRISM, I get an error of the form:
./setup.sh: line 33: syntax error: unexpected end of file

Are you building on Cygwin? And did you unpack PRISM using WinZip? If so, unpack from Cygwin, using tar xfz (or similar) instead.

When I try to compile PRISM, I get an error of the form:
Assembler messages: Fatal error: can't create ../../obj/dd/dd_abstr.o: No such file or directory

Did you unpack PRISM using a graphical tool or file manager? If so, unpack using tar xfz (or similar) instead.

When I try to compile PRISM, I get errors of the form:
dirname: extra operand `Files/Java/jdk1.6.0_09/bin/javac' Try `dirname --help' for more information.

This error occurs if the path to your Java distribution contains a space (a common example is when it is somewhere in "Program Files" on Windows). Hopefully, this will be fixed soon. A workaround is to move the java installation to e.g. C:\java.

When I try to compile PRISM, I get an error of the form:
/bin/sh: line 43: [: :/cygdrive/c/Program: binary operator expected...

See answer to previous question.

Do I have to use GNU make to build PRISM?

Strictly speaking, no, but you will have to modify the various PRISM Makefiles manually to overcome this.

Can I build PRISM on operating systems other than those currently supported?

PRISM should be suitable for any Unix/Linux variant.

The first thing you will need to do is compile CUDD (the BDD library used by and included in PRISM) on that platform. Fortunately, CUDD has already been successfully built on a large number of operating systems. Have a look at the sample Makefiles we provide (i.e. the files cudd/Makefile.*) which are slight variants of the original Makefile provided with CUDD (found here: cudd/modified/orig/Makefile). They contain instructions on how to modify it for various platforms. You can then call your new modified makefile something appropriate (cudd/Makefile.$OSTYPE) and proceed to build PRISM as usual. To just build CUDD, not PRISM, type make cuddpackage instead of make.

Next, look at the main PRISM Makefile, in particular, each place where the variable $OSTYPE is referred to. Most lines include comments and further instructions. Once you have done this, proceed as usual.

If you do successfully build PRISM on other platforms, please let us know so we can include this information in future releases. Thanks.


Other issues

How do I uninstall PRISM?

If you installed PRISM on Windows using the self-extracting installer, you can uninstall it using the option on the start menu. If you didn't add these shortcuts, just run uninstall.exe from the directory where you installed PRISM.

For older versions of PRISM on Windows or on any other platform, simply delete the directory containing it.

The only thing that is not removed via either of these methods is the .prism file containing your PRISM settings which is in your home directory (see the section "Configuring PRISM"). You may wish to retain this when upgrading.

I still have a problem installing/running PRISM. What can I do?

Please post a message in the discussion group (see the support section of the PRISM website).

PRISM Manual

Installing PRISM

[ View all ]