Contenuto principale

Install Polyspace Server Products at Command Line

This topic describes how to install the Polyspace® Server products at the command line. Alternatively, you can create a Docker image to run the Polyspace Server products.

The Polyspace Server products support automated Polyspace runs on a Continuous Integration (CI) server. You might be accessing this server through a terminal or using cloud computing platforms such as Azure® or AWS®. Use one of the two installation methods described below to perform a command-line installation.

Installation Method 1 — Use MATLAB Package Manager

Use MATLAB® Package Manager (mpm) to install Polyspace Server products from the operating system command line. If you plan on running Polyspace from within a container, you can use the Polyspace Dockerfile to build a customized Polyspace Docker® container.

Prerequisites

Before beginning installation using mpm:

  • Confirm that your computer has internet access. This example uses mpm to download the product files from mathworks.com. If you have already completed a download of products using the interactive installer, or have a mounted product ISO image, you can use the --source argument to select the installation source instead.

  • Download MATLAB Package Manager. For information on downloading the latest version of MATLAB Package Manager, see Get MATLAB Package Manager.

  • The network license manager must be installed. For more information on installing a network license manager, see How do I install the Network Licence Manager?

  • For Linux installations, install all Polyspace dependencies on your computer. Starting in R2024a, Polyspace dependencies required to run Polyspace products in containers are included in the Dockerfile for the corresponding products. See Polyspace Bug Finder Server and Polyspace Code Prover Server.

    If installing R2023b, R2023a, or R2022b, view the list of dependencies by going to the Polyspace dependencies repository on GitHub®. Then, open the file base-dependencies.txt located in the folder release/system, where release is your Polyspace release version and system is your operating system, for example, r2023b/ubuntu22.04.

Installation Steps

Run the mpm install command to install the Polyspace Server products using a Linux terminal or Windows command line. For options and Windows command examples, see mpm install.

To run the mpm install command and install the R2025a release on Linux, run this command.

./mpm install --release=R2025a --destination=/home/<USER>/polyspace \
--products Polyspace_Bug_Finder_Server Polyspace_Code_Prover_Server

Create a network license file on the client machine that points to the license server.

  1. Create a plain-text file named network.lic.

  2. In the first line of this file, copy the SERVER line from the license.dat file located on your license server. This line includes the hostname and host ID of the license server and the network port that the license manager runs on.

  3. In the second line of this file, add the text USE_SERVER.

    Your file should look similar to the following:

    network.lic
    SERVER my-license-server-hostname 00A1B2C3D4E5 27000
    USE_SERVER
  4. Place this file in the productroot/licenses folder of each installed product.

Add the installation to your PATH variable.

export PATH=<polyspaceroot>/polyspace/bin/:$PATH

Test your installation by running the polyspace-bug-finder-server or polyspace-code-prover-server (Polyspace Code Prover) command to perform a Polyspace analysis. Navigate to polyspaceroot/polyspace/bin where polyspaceroot is your installation folder and run this command:

./polyspace-bug-finder-server \
-sources ../examples/cxx/Bug_Finder_Example/sources/main.c -results-dir /tmp/BF_result

Installation Method 2 — Silent Installer

Use the silent installer method to install Polyspace Server products in situations where MATLAB Package Manager cannot be used.

To run the Polyspace Server products, you have to install the products and the network license manager for managing licenses.

Prerequisites

Before beginning installation from the command line, note the following:

  • You must have a license file (.lic file) from MathWorks® and a File Installation Key for this license. To obtain the license file and File Installation Key, activate Polyspace in License Center.

  • The network license server must be installed. For more information on installing a network license manager, see How do I install the Network Licence Manager?

Installation Steps

Follow the instructions to Install Products Programmatically.

After installation, cd to polyspaceroot/polyspace/bin where polyspaceroot is your installation folder and run this command:

./polyspace-bug-finder-server -help
If you do not see this subfolder or run into other errors, the installation might not have completed successfully. Check the installation log.

Test your installation by running the polyspace-bug-finder-server or polyspace-code-prover-server (Polyspace Code Prover) command to perform a Polyspace analysis. Navigate to polyspaceroot/polyspace/bin where polyspaceroot is your installation folder and run this command:

./polyspace-bug-finder-server \
-sources ../examples/cxx/Bug_Finder_Example/sources/main.c -results-dir /tmp/BF_result

See Also

External Websites