IBM Support

Installing XL C/C++ compiler updates on Linux

Question & Answer


Question

How to install an XL C/C++ compiler update on Linux?

Answer

This document explains how to install XL C/C++ compiler updates on Linux distributions supported by the XL C/C++ Advanced Edition compilers. Click here for information about supported distributions.

There are two options for upgrading the compiler:

  • Upgrade the current default or non-default installation
  • Install the update to a new non-default location.


Upgrade the current default or non-default compiler installation:

1.Download, unzip (with gunzip), and untar the rpm package that make up the update.
    gunzip vacpp.<version>.<os>.<mmmyyyy>.update.tar.gz
    tar -xvf vacpp.<version>.<os>.<mmmyyyy>.update.tar

.
2.Uninstall the currently installed versions of all of the packages that you will be upgrading. (Note: do not uninstall rpms that you are not going to be upgrading). The uninstallation of a package is done with the command "rpm -e <package name>". This will need to be done for each of the rpm packages included in the update, in the following order:
.
    rpm -e vacpp.help-x.x.x-x
    rpm -e vacpp.samples-x.x.x-x
    rpm -e vacpp.cmp-x.x.x-x
    rpm -e vacpp.lib-x.x.x-x
    rpm -e vacpp.rte.lnk-x.x.x-x
    rpm -e vacpp.rte-x.x.x-x
    rpm -e vac.cmp-x.x.x-x
    rpm -e vac.lib-x.x.x-x
    rpm -e xlmass.lib-x.x.x-x
    rpm -e xlsmp.lib-x.x.x-x
    rpm -e xlsmp.rte-x.x.x-x
    rpm -e xlsmp.msg.rte-x.x.x-x

Notes:
(a) The value of x.x.x-x represents the level of the package that you have installed on your system. You can find out this by querying the package as "rpm -q vacpp.cmp"

(b) Some packages above may not uninstall if they are required by other packages. For example, if XL Fortran compiler is installed on the system, the xlsmp.* and xlmass.* packages will be shared with XL C/C++. If this is the case and you still wish to upgrade these packages, the rpm option --nodeps will need to be used. For example:
rpm -e --nodeps xlsmp.lib.x.x.x-x

.
3.Install the update packages. This is done with the command 'rpm -ivh <package name>'. If updating a non-default location, the --prefix option must also be specified.

Example 1 (default location):
    rpm -ivh vacpp.cmp-x.x.x-x.ppc64.rpm

Example 2 (non-default location):
    rpm -ivh vacpp.cmp-x.x.x-x.ppc64.rpm --prefix /home/current_nondefault_location

This will need to be done for each of the rpm packages included in the update, in the following order:
.
    rpm -ivh xlsmp.msg.rte-x.x.x-x.ppc64.rpm
    rpm -ivh xlsmp.rte-x.x.x-x.ppc64.rpm
    rpm -ivh xlsmp.lib-x.x.x-x.ppc64.rpm
    rpm -ivh xlmass.lib-x.x.x-x.ppc64.rpm
    rpm -ivh vac.lib-x.x.x-x.ppc64.rpm
    rpm -ivh vac.cmp-x.x.x-x.ppc64.rpm
    rpm -ivh vacpp.rte-x.x.x-x.ppc64.rpm
    rpm -ivh vacpp.rte.lnk-x.x.x-x.ppc64.rpm
    rpm -ivh vacpp.lib-x.x.x-x.ppc64.rpm
    rpm -ivh vacpp.cmp-x.x.x-x.ppc64.rpm
    rpm -ivh vacpp.help-x.x.x-x.ppc64.rpm
    rpm -ivh vacpp.samples-x.x.x-x.ppc64.rpm

.
4.Generate a new configuration file.

A new configuration file will need to be generated for this new installation. Otherwise when the compiler is invoked, the configuration file from an earlier installation will be used, which could lead to the compiler behaving unexpectedly.

To generate a new configuration file, if you have GNU compiler and headers installed in the default location, use the new_install command located at /opt/ibmcmp/vac/<version>/bin. Alternatively, you can use the vac_configure tool located at /opt/ibmcmp/vac/<version>/bin . For help using the vac_configure tool, 'vac_configure -h' will provide assistance.



Install the update to a new non-default location:


1.Install the update packages.

To install a package to a non-default location, the rpm option --prefix must be specified. The --prefix option allows a non-default install location to be specified. This is done with the command "rpm -ivh <package name> --prefix <new location>".

Example:
    rpm -ivh vacpp.cmp-x.x.x-x.ppc64.rpm --prefix /home/new_location

This will need to be done for each of the rpm packages included in the update, in the following order:
    rpm -ivh xlsmp.msg.rte-x.x.x-x.ppc64.rpm
    rpm -ivh xlsmp.rte-x.x.x-x.ppc64.rpm
    rpm -ivh xlsmp.lib-x.x.x-x.ppc64.rpm
    rpm -ivh xlmass.lib-x.x.x-x.ppc64.rpm
    rpm -ivh vac.lib-x.x.x-x.ppc64.rpm
    rpm -ivh vac.cmp-x.x.x-x.ppc64.rpm
    rpm -ivh vacpp.rte-x.x.x-x.ppc64.rpm
    rpm -ivh vacpp.rte.lnk-x.x.x-x.ppc64.rpm
    rpm -ivh vacpp.lib-x.x.x-x.ppc64.rpm
    rpm -ivh vacpp.cmp-x.x.x-x.ppc64.rpm
    rpm -ivh vacpp.help-x.x.x-x.ppc64.rpm
    rpm -ivh vacpp.samples-x.x.x-x.ppc64.rpm

.
2.Generate a new configuration file.

A new configuration file will need to be generated for this new installation. Otherwise when the compiler is invoked, the configuration file from the base installation will be used, which could lead to the compiler behaving unexpectedly.

To generate a new configuration file, use the vac_configure tool located at <new_location>/vac/<version>/bin/vac_configure. The -o option must be specified with vac_configure to ensure that the old config file is not overwritten by the new one. For help using the vac_configure tool, 'vac_configure -h' will provide assistance.

To compile using the new update installation, the -F option will need to be specified in order to pick up the new configuration file.


Note about configuration files
The default configuration file gets overwritten during the update process. If you wish to preserve customized configuration file settings between updates, then you must set up a user configuration file. This feature is available only in Version 8 starting with the September 2006 updates. Click here to learn more.

[{"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"Install\/Setup\/Configuration","Platform":[{"code":"PF016","label":"Linux"}],"Version":"7.0;8.0;9.0","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
08 August 2018

UID

swg21215572