MATLAB: Do I get a java error “libXt.so.6: cannot open shared object file: No such file or directory” when installing PolySpace on a Linux workstation

installjavalibxplibxtpolyspacePolyspace Client for C/C++Polyspace Code ProverPolyspace Code Prover Serverxorg-x11-libs

When trying to install PolySpace on a Linux workstation with command '/mnt/install.sh', I get the following java error:
...
java.lang.UnsatisfiedLinkError:
/tmp/install.dir.23636/Linux/resource/jre/lib/i386/libawt.so: libXt.so.6:
cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
...
It could also happen:
– when launching a verification using the report generation:
*** Beginning Report generation
... Fatal error loading library /usr/local/PolySpace/PolySpace_Common/ReportGenerator/MCR/x86-linux/bin/glnx86/libmwmclmcr.so Error: libXp.so.6: cannot open shared object file: No such file or directory
– when using Polyspace Metrics and trying to load some results using web browser. In catalina.out file we can see a message like the following:
SEVERE: Servlet.service() for servlet PolySpaceWebUI threw exception
java.lang.LinkageError: libXpm.so.4: cannot open shared object file: No such file or directory
at com.mathworks.toolbox.javabuilder.internal.DynamicLibraryUtils.dlopen(Native Method)
at com.mathworks.toolbox.javabuilder.internal.DynamicLibraryUtils.loadLibraryAndBindNativeMethods(DynamicLibraryUtils.java:131)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.<clinit>(MWMCR.java:1574)
...

Best Answer

This error is due to the PolySpace installer not finding xorg-x11-libs packages. PolySpace installer or Polyspace report generation require some libraries like libXt.so to continue installation or to generate reports.
To resolve this issue, we need to check if all the necessary packages are installed in the system (32-Bits X11 libraries). The following 32-Bits packages are required:
libX11.so,
libXau.so,
libXcursor.so,
libXdmcp.so,
libXext.so,
libXfixes.so,
libXi.so,
libXmu.so,
libXp.so,
libXpm.so,
libXrender.so,
libXt.so, and
libXtst.so.
The easiest method to see the installed packages would be to use graphical package managers. Different distributions use different package managers. For example, 'Ubuntu' uses 'Synaptic package manager' whereas 'Suse' uses 'SMART package manager'.
You can also use command-line commands to list out the installed packages.
1. In a Debian based Linux distribution, you can use the command
'dpkg -l'
to list out the installed packages.
2. Similarly, in a Redhat distribution, you can use the command
'rpm -qa'
to list out the installed packages
Install any missing packages and then launch the PolySpace installer again to install PolySpace or relaunch your verification asking for a report generation.