Operating Systems Compatibility
This tutorial describes how to test operating systems for binary compatibility using the ABI Compliance Checker tool. The tool is able to find all C/C++ libraries and appropriate header files in system directories, create dump of system ABI (API + compiler ABI) including ABIs of all found libraries and then compare dumps created on different operating systems to produce the HTML report containing detailed comparison results.
Contents |
Setting Up Environment
The first step is to setup development environment on target operating systems:
- Install G++, Perl, Binutils, Ctags and File utility
- Install all "devel" packages or SDK.
Apt-based OS (Ubuntu, Debian, Maemo)
apt-get update
apt-cache search "\-dev"|awk '{print $1;}'>install.txt
for i in `cat install.txt`;do sudo apt-get --force-yes -y install $i;done
sudo apt-get install gcc perl binutils file ctags
Zypper-based OS (Fedora, openSUSE, MeeGo)
zypper search -u dev|awk '{print $2;}'|grep "dev">install.txt
for i in `cat install.txt`;do sudo zypper -n install $i;done
sudo zypper install gcc-c++ perl binutils file ctags
Urpmi-based OS (Mandriva, ROSA, Mageia)
urpmq|grep "\-devel">install.txt
for i in `cat install.txt`;do sudo urpmi --auto --force $i;done
sudo urpmi install gcc-c++ perl binutils file ctags
Apk-based OS (Alpine Linux)
apk update
apk search|grep "\-dev\-"|sed s/-dev-.*$/-dev/>install.txt
for i in `cat install.txt`;do sudo apk add $i;done
sudo apk add perl
Other Systems (Symbian, Windows)
Download and install the SDK.
Dumping System ABI
The next step is to create an XML-descriptor of target OS.
Then enter to the target operating system and dump the system ABI using the following command:
abi-compliance-checker -dump-system <descriptor.xml>
If you want to analyze libraries from /usr/include and /usr/lib, then you may use the following short command instead:
abi-compliance-checker -dump-system <name> -sysroot /
The system ABI dump will be generated to:
sys_dumps/<name>/<arch>/
Repeat this step for other operating system or other version of the same system if you want to check backward compatibility.
Compare ABI Dumps
The last step is to compare ABI dumps of two operating systems:
abi-compliance-checker -cmp-systems -d1 sys_dumps/<name1>/<arch> -d2 sys_dumps/<name2>/<arch>
The compatibility report will be generated to:
sys_compat_reports/<name1>_to_<name2>/<arch>/abi_compat_report.html
Examples
See examples for Maemo, MeeGo and Symbian operating systems on this page.